BX Agents

Describe an agent in folders and files; build it into a real ColdBox application.

BX Agents is a conventions-based AI agent framework for BoxLang, built on ColdBox and BX AI. You describe an agent with files and folders - not a framework's API surface - and bxAgents build assembles a real, runnable ColdBox application out of it.

Build one in four steps

1
Install
install-bx-module bx-ai bx-agents
box install bx-ai,bx-agents
2
Scaffold
bxAgents new my-agent --model=openai/gpt-5

Then edit instructions.md and add whichever convention folders you need.

3
Build
bxAgents build

Discovery, validation, manifest, code generation - into .build/app/.

4
Talk to it
bxAgents chat
# or serve it over HTTP:
bxAgents serve --port=8080

What build actually produces

Your convention tree, and the plain ColdBox application build turns it into.

your-agent/
β”œβ”€β”€ Agent.bx           # name, model, description
β”œβ”€β”€ instructions.md    # the system prompt
β”œβ”€β”€ tools/             # @AITool functions
β”œβ”€β”€ skills/            # SKILL.md capabilities
β”œβ”€β”€ subagents/         # nested agent trees
β”œβ”€β”€ models/            # named model configs
β”œβ”€β”€ gateways/          # HTTP/MCP/chat exposure
β”œβ”€β”€ schedules/         # a real ColdBox scheduler
β”œβ”€β”€ mcp/               # MCP servers you host
β”œβ”€β”€ interceptors/      # lifecycle hooks
└── modules/           # module dependencies
.build/app/
β”œβ”€β”€ Application.bx
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ ColdBox.bx
β”‚   β”œβ”€β”€ WireBox.bx
β”‚   β”œβ”€β”€ Router.bx
β”‚   └── Scheduler.bx
β”œβ”€β”€ agent/
β”‚   └── GeneratedAgentFactory.bx
β”œβ”€β”€ tools/  skills/  mcp/
β”œβ”€β”€ handlers/  interceptors/
└── index.bxm
Why assemble at build time instead of at request time?

Most agent frameworks wire tools, skills, routes and schedules together at request time, on every boot. BX Agents does the opposite: bxAgents build runs discovery, validation and code generation exactly once, producing a plain ColdBox application under .build/app/.

Starting it - 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.

Start with one file

Only Agent.bx is required. instructions.md is optional - set instructions directly in the class, or drop the file in and let the build wire it in. Every other folder only affects the generated output if it exists and has content in it - so you add conventions as you actually need them.

Agent.bx IS the agent

Agent.bx extends BX AI's own AiAgent directly - the build instantiates your class rather than rebuilding one from a config struct, so what you write is what runs, and an IDE can introspect it like any other class. See Agent.bx.

Reach it from anywhere

Where to go next

Every convention folder also has a working, buildable sample under examples/.

Warning

BX Agents is under active development. Known Limitations tracks the honest gaps - what's tested against a real running app, what still only runs against BX AI's "mock" provider, and one real upstream ColdBox quirk this project ran into and worked around.

Edit this page Download Markdown Last updated Aug 21, 2026, 6:33:28 PM