Agent
Four things. Identity, tools, scripts, policy. That's the entire authoring surface. The loop, context assembly, tool dispatch, session persistence, stop conditions — you write none of it.
An agent is a TypeScript project with a shape Axon knows how to read.
my-agent/
├── axon.config.ts # identity, engine, policy
├── src/ # boot prompt, tools, prompts, scripts
├── server/ # HTTP routes and plugins
├── data/ # durable storage and knowledge
└── modules/ # installed capabilities
Boot it in the TUI on your laptop, run it headless in CI, deploy it as a live cloud service with a public URL and API key. The folder is the same in every case.
What you build
You write four things: identity, tools, scripts, and policy.
Identity — src/boot.vue is the agent's standing system prompt. Who it is, what
it knows, how it operates. Written once, present for every session. Composed from Vue
components and Markdown so complex prompts stay readable and maintainable.
Tools — async TypeScript functions in src/tools/. Export a function and the agent
can call it. Axon reads the signatures and JSDoc at boot and exposes them to the model
as typed, documented calls. The agent decides when to use them.
Scripts — TypeScript files in src/scripts/ that orchestrate work. Load context,
call the agent, process the output, write files. The same script runs from the terminal,
the TUI, a route, or another script — without changing.
Policy — declared in axon.config.ts, enforced in a separate subprocess before
any tool runs. Not a prompt hint. The agent process has no direct access to the
filesystem, network, or shell — every call goes through the policy gate.
You write none of the infrastructure. The loop, context assembly, tool dispatch, session persistence, stop conditions — that's the runtime's job.
Modules extend it
Capabilities you need but didn't write are installed, not implemented.
axon install @axon/github
axon install @axon/linear
axon install @axon/discord
Each module contributes typed tools, prompts, webhook routes, and boot-time setup. Subscribe to its hooks in a plugin. The integration work is already done.
Where to go
Building Agents — the full authoring surface with real code. Identity, tools, scripts, policy, and the server layer.
The Managed Runtime — what Axon owns, what you own, and why the boundary exists where it does.
How It Works — state model, threads, sessions, routes and hooks. The mental models every builder needs.
Agent Structure — every file and directory in the agent folder, what it does, and what Axon does with it at boot and runtime.
Going Deeper — capsule internals, Vuedown, testing patterns. For when you want the full picture.