Skip to main content
The agent code is a plain 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

Create agent.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:3773 so the boxd proxy can reach it inside the VM
  • No deploy logic in the script — that lives in the bindu deploy CLI
Deploy command
  • 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
Suspend / resume
  • Ctrl-C on the local terminal suspends the VM (preserves memory + disk + DID keys)
  • Re-running bindu deploy resumes in ~1s — vector store, conversation history, and DID identity all intact
Logs and teardown
  • bindu logs runtime-boxd-example — fetch logs after suspend
  • bindu destroy runtime-boxd-example — stop and discard the VM (loses disk + DID keys)

Dependencies

Environment Setup

Run

Local dev:
Deploy to a boxd microVM:
When you see ✓ runtime-boxd-example serving at https://..., the VM is live:

Example API Calls

Point requests at http://localhost:3773 while running locally, or at the public https://<agent-name>.boxd.sh URL printed by bindu deploy.

Frontend Setup

Open http://localhost:5173 and try to chat with the runtime-boxd agent.