What Is BxAgents?

Why conventions over configuration, and why assembly happens once at build time.

On this page

What Is BxAgents?

Most agent frameworks wire tools, skills, routes and schedules together at request time, on every boot. BxAgents does the opposite: bxAgents build runs discovery, validation and code generation exactly once, producing a plain ColdBox application in .build/, laid out like the ColdBox BoxLang template: the code in app/, the web root in public/.

Starting it afterwards - via bxAgents serve, a real boxlang-miniserver process, or a portable .bxa deployed anywhere BoxLang runs - is then just booting an ordinary app. No convention scanning, no dynamic file walking, no build-time work deferred into the request path.

flowchart LR
    A["your convention tree<br/>Agent.yml, tools/, skills/, ..."] -->|"bxAgents build"| B[".build/<br/>app/ + public/: a plain ColdBox application"]
    B -->|"bxAgents serve / chat / invoke"| C["running agent"]
    B -->|"bxAgents package"| D["dist/name-version.bxa"]
    D -->|"bxAgents deploy"| E["a real target"]

    style B fill:#d4edda,stroke:#155724

Folders are the API

Agent.yml and instructions.md are the only files that matter to get started. Every other convention folder - tools/, skills/, subagents/, gateways/, schedules/, mcp/, interceptors/, extensions/, modules/ - is optional and only shapes the generated output if it exists and has content in it. You add conventions as you actually need them, not up front.

Agent.yml defines the agent

Agent.yml is plain settings - a name, a model, and any optional extras - and the build turns it into a real BX AI agent. No code is needed for most agents. You'll write your first one in The Agent Definition - Agent.yml.

When the definition itself needs code (hooks, dynamic instructions, tools registered in code), there is an advanced option: a class-based Agent.bx that extends BX AI's own AiAgent, which the build instantiates as-is. The Agent Definition ends with when to reach for it.

What build actually produces

Your convention tree on the left, the plain ColdBox application build turns it into on the right:

your-agent/
β”œβ”€β”€ Application.bx
β”œβ”€β”€ Agent.yml
β”œβ”€β”€ instructions.md
β”œβ”€β”€ tools/
β”œβ”€β”€ skills/
β”œβ”€β”€ subagents/
β”œβ”€β”€ gateways/
β”œβ”€β”€ schedules/
β”œβ”€β”€ mcp/
β”œβ”€β”€ interceptors/
└── modules/
.build/
β”œβ”€β”€ miniserver.json
β”œβ”€β”€ app/                  the code (not served)
β”‚   β”œβ”€β”€ bxagents/         Application.bx  Scheduler.bx
β”‚   β”œβ”€β”€ config/           Coldbox.bx  WireBox.bx  Router.bx
β”‚   β”œβ”€β”€ schedules/  agent/  tools/  skills/  mcp/
β”‚   └── handlers/  interceptors/
β”œβ”€β”€ public/               the web root: the only served folder
β”‚   β”œβ”€β”€ Application.bx
β”‚   └── index.bxm
β”œβ”€β”€ lib/                  coldbox/  modules/
└── runtime/              boxlang.json  modules/bx-agents

What build does not produce: the data home

A built agent also keeps things while it runs: conversations, notes, access tokens, routines and their reports, the sealed vault, usage counts and logs. They are not in the project and not in .build/: they live in the agent's data home, ~/.bxagents/<agent name>/, so rebuilding or redeploying never loses them and a backup can copy them.

~/.bxagents/acme-support/
β”œβ”€β”€ chat.db        conversations, notes, tokens, accounts, routines, the sealed vault
β”œβ”€β”€ files/         what the agent writes
β”œβ”€β”€ skills/        skills the agent saved for itself
β”œβ”€β”€ routines/      the reports of each routine
β”œβ”€β”€ logs/          agent, gateways, routines, heartbeat, api
└── backups/       made by bxAgents backup

That split (what you ship, and what accumulates) comes back in Logs, Usage and Backups.

Why this matters

Rebuilding an unchanged project produces byte-identical output, down to a hash- stamped manifest recording exactly what went into the build (more on that in Packaging, Deploying, and Wrapping Up). That's the whole point of paying the assembly cost once, at build time, rather than deferring any of it into request handling.

See BxAgents home and The Build Pipeline for more detail whenever you want it.

Next: Installing BxAgents

Edit this page Download Markdown Last updated Nov 26, 2026, 8:45:51 AM Report an issue
Lesson 2 of 29 - Introduction to BxAgents