Build on Codebolt
This section is for developers extending Codebolt. If you want to use Codebolt, start at Using Codebolt. If you want to follow a specific how-to, try Guides. Everything here is for people writing code that plugs into the server.
If you are new to the builder-facing architecture, read Architecture for Builders first. It explains how the server, clients, agents, plugins, and agent extensions fit together.
The system at a glance
The Codebolt server is the execution engine. It owns files, memory, sub-agents, tool execution, the event log, guardrails — everything stateful. Around it, four external surfaces let you build on top without forking the server. Inside it, a handful of internal extension points let you reshape the agent loop without rewriting it.
- Custom Interfaces — build your own chat panel, CLI, or editor extension using the
clientsdk, a wrapper over the server's WebSocket protocol and HTTP routes. - Custom Agents — write agents with
codeboltjs, or bring your own framework (Vercel AI SDK, LangChain) via the adapter layer. Agents drive the server over WebSocket. - Plugins — extend the application itself with the
pluginSdk: gateway integrations, execution plugins, UI extensions, hooks, and custom LLM providers. Plugins live alongside the server and talk to it over the plugin bus. - Remote Environment Providers — federate across machines. A remote environment provider is typically another Codebolt server instance (e.g.
e2b, a remote sandbox, or a peer workstation) that the local server proxies work to.
Inside the server, you can also extend the agent loop without rewriting it — capabilities, skills, action blocks, agent blocks, and more are all configurable from the same .codebolt/ project surface. See Agent Extensions.
The extension surface at a glance
Codebolt exposes these extension points. Agent customization now splits into two top-level sections: create a new agent, or extend existing agents without rewriting them.
| Extension point | What it is | Start here |
|---|---|---|
| Architecture for Builders | The server-centered mental model and SDK split | Architecture for Builders |
| Creating Agents | Write or wrap agents that show up in the picker | Creating Agents |
| Agent Extensions | Shared primitives agents consume: skills, capabilities, MCP tools, and blocks | Agent Extensions |
| Custom Interfaces | Build your own interface on top of the server | Custom Interfaces |
| Plugins | Extend the application runtime — gateways, execution plugins, UI panels, hooks, providers | Plugins |
| Remote Environment Providers | LLM, embedding, or remote execution backends | Remote Environment Providers |
| Evaluation & Optimization | Measure, refine, and tune agents | Evaluation & Optimization |
| Multi-Agent Orchestration | Multi-agent coordination design — swarms, flows, roles, and review patterns. | Multi-Agent Orchestration |
| Multi-Environment Orchestration | Provider-driven execution across remote or alternate environments. | Multi-Environment Orchestration |
| Internals | How the server works — for devs who need to extend intelligently. | Internals |
Plus Self-Hosting for teams running the server themselves and Remote Execution for distributed agent runs.
Which one do I need?
A decision guide:
- I want an AI specialised for my codebase. → Creating Agents. Start at level 0 (remix), graduate to level 1 (framework) only if you need to.
- I want my agents to gain a capability without rewriting them. → Agent Extensions. Capabilities, skills, MCP tools, action blocks.
- I want to give agents access to my internal APIs / databases / tools. → Agent Extensions → MCP Tools. MCP server is usually the right answer.
- I want to run Claude Code (or similar) as a Codebolt agent. → Third-Party Agents.
- I want to build agents using Vercel AI SDK or LangChain. → Framework Adapters.
- I want a new LLM provider or a local inference backend. → LLM Provider.
- I want to intercept or modify application behaviour project-wide (gateways, hooks, execution routing, provider registration, embedded panels). → Plugins.
- I want to build my own UI on top of Codebolt. → Custom Interfaces.
- I want to measure and tune my agent systematically. → Evaluation & Optimization.
- I want several agents to cooperate on a task. → Multi-Agent Orchestration. Read When to use multi-agent first.
- I want runs to cross into remote or alternate environments. → Multi-Environment Orchestration.
- I need to run the server myself. → Self-Hosting.
- I want to understand the whole system. → Internals → Architecture Overview. Then pick subsystems as you need them.
The level-zero mindset
Codebolt is designed so you almost never need to modify it to get what you want. The extension points, in order of effort:
- Configuration.
.codebolt/files in your project: rules, context rules, hook definitions, flow graphs. Often enough for real use cases. No code at all. - Install an MCP server or capability. Every agent in the project gains new tools / behaviour. See Agent Extensions.
- Remix an existing agent. Change its prompt, tools, or model without forking its code. See Level 0 — Remix.
- Write a plugin. Extend one part of the application without forking the server. See Plugins.
- Build a skill or action block. Reusable competency any agent can call. See Skills.
- Build an MCP server. Give agents new capabilities. Usually a small standalone program.
- Build a custom agent from the framework. Full control over the loop but with batteries included. See Level 1 — Framework.
- Build on
codeboltjsdirectly. Everything the framework gives you and nothing you don't want. Level 2. - Write against the raw WebSocket protocol. Only if you need something no level above allows. Level 3.
Start at the top and stop as soon as you have what you need. Most extensions live at level 1-6.
Writing for agents vs writing for humans
One mental shift to make early: the code you write in Build is consumed by an LLM in addition to (or instead of) humans. That changes what "good" means:
- Tool descriptions matter more than doc comments. An LLM chooses which tool to call based on its description. A vague description means wrong tool choices.
- Error messages are data for a reasoning loop. "Failed to read file" is useless; "Failed to read file: path does not exist, nearest matches: …" lets the agent recover.
- Schemas are contracts with the LLM. If your tool takes
{ path: string }but the agent keeps passing{ file: string }, your schema is the bug, not the agent. - Idempotency is a feature. Agents retry. Tools that are safe to call twice are better than tools that aren't.
These aren't rules, just things to keep in mind as you write.
See also
- Architecture for Builders — the builder-facing system map
- Architecture Overview — the mental model of the server
- Creating Agents — build or wrap agents
- Agent Extensions — shared capabilities agents consume
- Agent Extensions → MCP Tools
- Multi-Agent Orchestration
- Multi-Environment Orchestration