Skip to main content

Module brain

Module brain 

Source
Expand description

Brain Module

The core intelligence layer — LLM providers, agent services, tools, tokenizer, dynamic system prompt assembly, user-defined slash commands, and self-update.

Re-exports§

pub use commands::CommandLoader;
pub use commands::UserCommand;
pub use prompt_builder::BrainLoader;
pub use self_update::SelfUpdater;
pub use agent::AgentContext;
pub use agent::AgentError;
pub use agent::AgentService;
pub use provider::AnthropicProvider;
pub use provider::ContentBlock;
pub use provider::LLMRequest;
pub use provider::LLMResponse;
pub use provider::Message;
pub use provider::Provider;
pub use provider::ProviderError;
pub use provider::ProviderStream;
pub use provider::Role;
pub use provider::StopReason;
pub use provider::StreamEvent;
pub use provider::TokenUsage;
pub use provider::Tool;
pub use tools::ToolError;
pub use tools::ToolRegistry;
pub use tools::ToolResult;

Modules§

agent
Agent Service Module
commands
User-Defined Slash Commands
dedup_scan
Periodic brain-file deduplication scanner.
filter
Read-time content filter for brain files.
mission_control
Mission Control — data services
plans
Bundled reference plan files for the plan tool.
prompt_builder
Brain Loader & Prompt Builder
provider
LLM Provider Abstraction Layer
rsi
RSI (Recursive Self-Improvement) background engine.
rsi_git_history
Git-history helpers used by the RSI loop to suppress stale alerts.
rsi_proposals
RSI Proposed Tools / Commands inbox.
rsi_pruned
Pruned Sections Tracker
rsi_subsystem
Bash command subsystem classifier for RSI pattern detection.
rsi_sync
RSI Template Sync — Upstream brain file template synchronization.
self_update
Self-Update Module
skills
Skill loader — embedded built-in skills with user-directory overlay.
tokenizer
Token counting using tiktoken (cl100k_base encoding).
tools
Tool Execution Framework