Your First Agent
Scaffold the folder, write a boot prompt, add a tool, write a script. That's the whole loop.
Scaffold the folder
axon init my-agent
cd my-agent
This creates a working agent. Not a stub — a real agent that boots, runs sessions, and accepts scripts. Open it in your editor:
my-agent/
├── axon.config.ts # identity, engine, policy
├── src/
│ ├── boot.vue # who the agent is
│ ├── tools/ # what it can do
│ └── scripts/ # automations that orchestrate work
├── server/
│ └── api/ # HTTP routes (optional)
├── data/ # durable storage and knowledge
└── modules/ # installed capabilities
Three things you author
Identity. src/boot.vue is the agent's standing system prompt — present for every
session. Write who the agent is, how it operates, what it's working on.
<!-- src/boot.vue -->
<template>
<h1>My Agent</h1>
<p>You are a coding assistant working in this repository.</p>
<p>You have access to the filesystem and can run shell commands.</p>
</template>
Tools. Async TypeScript functions the agent can call. Each file in src/tools/
becomes a namespace. Write them like any other function — the agent sees the type
signatures and JSDoc, the capsule runs the implementation.
// src/tools/fs.ts
/** Read a file from the repository. */
export async function readFile(path: string): Promise<string> {
return Bun.file(path).text()
}
Scripts. The primary authoring unit. TypeScript files that load prompts, call the agent, and process results. This is where your automation logic lives — not in routes, not in tools.
// src/scripts/review.ts — axon run review --file src/index.ts
const { file } = defineArgs<{ file: string }>()
const content = await axon.tools.fs.readFile(file)
const prompt = await axon.prompt("review", { file, content })
const { stream } = axon.stream({ prompt })
for await (const entry of stream) {
if (entry.type === "text") process.stdout.write(entry.content)
}
Run it
axon run review --file src/index.ts
The agent boots, the script runs, the agent exits. No server, no persistent process. This is the fastest feedback loop — write a script, run it, see what the agent does.
Open the TUI for interactive sessions:
axon

Reference
- Identity & Boot —
boot.vue, the Vuedown prompt format - Tools — tool functions, typing, the capsule boundary
- Scripts — the full script authoring reference
- axon API —
axon.request,axon.stream, threads, prompts - Agent Structure — the complete folder reference