Documentation menu
Start here
IntroductionGetting startedWrite an agentProject anatomyUnderstand Ayjnt
Harness engineeringTwo runtimesHuman interfacesHow agents workHost bridgeAgent capabilities
Callable methodsState & SQLiteSessions & memorySchedulingWorkflowsDurable executionInter-agent RPCSub-agentsToolsInterfaces & integrations
Browser clientRouting & middlewareVoiceBrowser toolsMCPEmailObservabilityCLI
Command overviewnewdevrunbuildcompilemigratedeployAPI reference
AgentAgentClientWorkflow classesLocal & cloudMigrationsExamplesTools
Give models small capabilities with explicit schemas, descriptions, and execution boundaries.
Start from a fresh project
This guide is self-contained. Create an empty Ayjnt project, then replace the starter agent with the files shown below. Run commands from the new project directory unless a step says otherwise.
bunx ayjnt new try-tools --empty
cd try-tools
bun install
# remove agents/alive once you are ready to add the guide's filesTwo tool locations
Call agentTools(this) to receive one AI SDK ToolSet containing local agent tools plus allowed host proxies. Worker-side tools win name collisions.
| File | Runtime | Good for |
|---|---|---|
| tools.ts | workerd | fetch, bindings, durable state, deployable services |
| tools.host.ts | Bun | files, shell, processes, local databases, native connectors |
Design for a person to supervise
- Describe the effect, not just the function name.
- Validate every model-produced argument.
- Confine paths and use argument arrays instead of shell interpolation.
- Separate preparing an action from committing it.
- Put approval immediately before consequential writes or execution.
Run it and verify the result
Give the exported tools to your model, ask for the demonstrated action, and inspect which runtime executed it.
bun run build
bun run dev
# the local app is now available at http://localhost:8787