Connect webhooks
let your agent do it
Register my HTTPS receiver for Hermitbox sandbox lifecycle events.
Paste it into your agent. It follows this page as Markdown: webhooks.md
Register an HTTPS endpoint for sandbox lifecycle events and save its signing secret to a private file.
- Prepare your HTTPS receiver and choose a new file in an existing private directory for its signing secret.
- Set
HERMITBOX_API_URL,HERMITBOX_API_KEY,HERMITBOX_WEBHOOK_URLandHERMITBOX_WEBHOOK_FILEprivately; installhermitboxin the Node program that registers the receiver. - Run this once. Keep the saved file private: the signing secret is returned only at registration.
import { writeFileSync } from 'node:fs'
import { Hermitbox } from 'hermitbox'
// The receiver and the secret's file come from the environment.
const receiver = process.env.HERMITBOX_WEBHOOK_URL
const file = process.env.HERMITBOX_WEBHOOK_FILE
if (!receiver || !file) {
throw new Error('Set HERMITBOX_WEBHOOK_URL and HERMITBOX_WEBHOOK_FILE')
}
// Connect with HERMITBOX_API_URL and HERMITBOX_API_KEY from the environment.
const hb = new Hermitbox()
// Register the receiver for sandbox creation and deletion.
const hook = await hb.webhook({ url: receiver, kinds: ['created', 'deleted'] })
try {
// Save the signing secret once, to a new private file.
const saved = JSON.stringify({ id: hook.id, secret: hook.secret }) + '\n'
writeFileSync(file, saved, { mode: 0o600, flag: 'wx' })
} catch (error) {
// Without the saved secret the registration is useless, so remove it.
await hook.delete()
throw error
}
console.log('Webhook registered')The file is created without overwriting an existing path; the block never prints the secret. Verify timestamp and HMAC on the exact received bytes, deduplicate delivery IDs and acknowledge promptly. Signing, retries and dead letters describe the receiver contract.
Private destinations need the host’s allowlist; a caller cannot relax it. Events still reflect the selected tier’s lifecycle limits.
run it yourself
$curl -fsSL https://hbx.sh | shor ask your agent
Install Hermitbox and set it up for me
or add to your agent
Linux (x86_64 or aarch64), no root, no Docker. Agents can read every page: llms.txt · llms-full.txt
the floor · nothing below this line