Skip to main content

Agent Framework Reference

The @codebolt/agent package is the framework agents run on top of. It provides the agent loop, processor pipeline, tool system, and conversation management — everything that makes an agent tick.

Package Exports

The framework currently ships two sub-path exports:

ExportImportWhat it provides
Unified@codebolt/agent/unifiedCore agent classes: CodeboltAgent, Agent, AgentStep, ResponseExecutor, InitialPromptGenerator, Tool, Workflow, loop detection, compaction services
Processor Pieces@codebolt/agent/processor-piecesReusable message modifiers and processors for the agent pipeline

Quick Start

import codebolt from '@codebolt/codeboltjs';
import { CodeboltAgent } from '@codebolt/agent/unified';
import { FlatUserMessage } from '@codebolt/types/sdk';

const agent = new CodeboltAgent({
instructions: 'You are a helpful coding assistant.',
enableLogging: true,
});

codebolt.onMessage(async (reqMessage: FlatUserMessage) => {
const result = await agent.processMessage(reqMessage);

if (!result.success) {
throw new Error(result.error ?? 'Agent failed');
}

return result.finalMessage;
});

What's in this section

SectionWhat it covers
Type ReferenceFull TypeScript types — agent classes, processor pipeline, team coordination

See also