Skip to main content

codeboltjs Reference

The codeboltjs SDK is what agent authors use to write agents. It provides all ctx.* API methods, tool utilities, MCP bridging, and the type system. The entire Codebolt editor is controllable through it — filesystem, git, browser, terminal, LLM, memory, and 60+ more modules.

Three access patterns

Every capability is available in three forms depending on who is consuming it:

PatternHowUse when
API Formatimport codebolt from '@codebolt/codeboltjs'You're writing a codeboltjs agent in TypeScript
Tool FormatTool calls over Model Context ProtocolYour agent is model-native and not using codeboltjs directly
CLI Formatexecute_command strings intercepted by the pseudo CLI registryYour agent issues shell-style commands that the SDK routes to modules

What's in this section

SectionWhat it covers
Direct API AccessEvery ctx.* method — fs, git, browser, memory, llm, and 60+ more
MCP AccessThe same APIs exposed as MCP tools for non-codeboltjs agents
Pseudo CLICommand-shaped SDK access for intercepted execute_command calls
Type ReferenceFull TypeScript types — codeboltjs classes, providers, shared types
Utility FunctionspromptBuilder, llmOutputHandler, followupQuestionBuilder

See also