bindufy(config, handler) echo — identical to a local example. The interesting part is the deploy step: bindu deploy agent.py --runtime=boxd packages this directory, ships it to a boxd microVM, installs deps, and serves the agent at its own public URL with persistent disk across suspend/resume.
Code
Createagent.py with the code below, or save it directly from your editor.
How It Works
Agent code (unchanged)- Same
bindufy(config, handler)shape as every other Bindu example - Binds to
0.0.0.0:3773so the boxd proxy can reach it inside the VM - No deploy logic in the script — that lives in the
bindu deployCLI
bindu deploy agent.py --runtime=boxd --on-exit=suspend- Packages this directory and ships it to a fresh boxd microVM
- Installs bindu + the agent’s deps inside the VM
- Starts the agent and prints a public URL like
https://runtime-boxd-example.boxd.sh - Host process streams VM logs and supervises until Ctrl-C
- Ctrl-C on the local terminal suspends the VM (preserves memory + disk + DID keys)
- Re-running
bindu deployresumes in ~1s — vector store, conversation history, and DID identity all intact
bindu logs runtime-boxd-example— fetch logs after suspendbindu destroy runtime-boxd-example— stop and discard the VM (loses disk + DID keys)
Dependencies
Environment Setup
Run
Local dev:✓ runtime-boxd-example serving at https://..., the VM is live:
Example API Calls
Message Send Request
Message Send Request
Task get Request
Task get Request
http://localhost:3773 while running locally, or at the public https://<agent-name>.boxd.sh URL printed by bindu deploy.