A function.
An endpoint.
Export your JavaScript function. Run it on Veloce. Use the same app from every client.
Browser / JavaScript / curl


A backend in a few lines.
Your tokens are already configured.
Pick where you want to start.
Give your agent access to this app
Download credentials for the app selected in Your workspace. Save the file as .dehook/credentials.json in your project. Keep it private and add /.dehook/ to your .gitignore.
Copy this instruction to your agent
The guide defines the file structure, publishing steps and checks. Your agent uses the existing project runtime and the same app.
Preparing your agent instructionAdd Dehook to your HTML
Copy this configured snippet into your development page.
Preparing your browser snippetExport a function. Then run it.
Use your page's console, or try it in the sandbox.
dehook.export(function hello(data) {
return { response: `Hello ${data.name}!` };
});
dehook.run('hello', { name: 'Ada' }, (response, error) => {
if (error) return console.error(error.message);
console.log(JSON.parse(response));
});The development snippet includes your private token. Remove it from HTML before sharing your app.
Download your configured client
The same app, functions, and documents as your browser. Tokens are included.
Preparing your downloadWrite your app
Same API. Save this next to dehook.js.
const dehook = require('./dehook.js');
dehook.export(function hello(data) {
return { response: `Hello ${data.name}!` };
});
dehook.run('hello', { name: 'Ada' }, (response, error) => {
if (error) return console.error(error.message);
console.log(JSON.parse(response));
});Local JavaScript works with Veloce and Node.js with built-in fetch. Choose one runtime.
node app.jsveloce --allow-read=. --allow-net=dehook.me app.jsExport hello with curl
This ready-to-copy request publishes the function to your active app.
Preparing your publish requestCall your backend from anywhere
After the export request above succeeds, call hello with this request.
Preparing your function URL{"response":"Hello Ada!"}Start locally with require.
Copy, paste, run.
The same app as your browser.
Download the client for this app
The same app, functions, and documents as your browser. Tokens are included.
Preparing your downloadCopy this into app.js
Same API. Save this next to dehook.js.
const dehook = require('./dehook.js');
dehook.export(function hello(data) {
return { response: `Hello ${data.name}!` };
});
dehook.run('hello', { name: 'Ada' }, (response, error) => {
if (error) return console.error(error.message);
console.log(JSON.parse(response));
});node app.jsveloce --allow-read=. --allow-net=dehook.me app.jsSmall API. Room to build.
JSON documents
Store JSON documents. Search, update, and remove them from either runtime.
dehook.query({ put: { title: 'Hello' } })Browser sessions
Browser session state is available inside your backend functions.
session.visits += 1Native Veloce
Explore native modules and understand the sandbox's permission boundaries.
crypto.sha256Hex(text)