Skip to main content

Crate cersei_agent

Crate cersei_agent 

Source
Expand description

cersei-agent: The high-level Agent API with builder pattern, agentic loop, realtime event streaming, broadcast channels, and reporters.

Re-exports§

pub use events::AgentStream;
pub use events::CompactReason;
pub use events::WarningState;
pub use reporters::Reporter;

Modules§

agent_tool
AgentTool: spawn a sub-agent to handle complex sub-tasks.
auto_dream
Auto-dream: background memory consolidation daemon.
compact
Auto-compact: context window management for long conversations.
context_analyzer
Context analyzer: token breakdown by category with compaction recommendations.
coordinator
Coordinator mode: multi-agent orchestration.
delegate
Parallel delegation primitive — spawn N isolated subagents with restricted toolsets and collect their summaries.
delegate_tool
DelegateTool — a batch/parallel variant of AgentTool.
effort
Effort levels: control thinking budget and temperature.
events
Agent events: the full event enum, AgentStream, and control messages.
reporters
Built-in reporters for structured event consumption.
session_memory
Session memory extraction: extract key facts from conversations.
system_prompt
Modular system prompt assembly with conditional components.

Structs§

Agent
AgentBuilder
AgentOutput
ToolCallRecord

Functions§

apply_tool_result_budget
Truncate oldest tool results when cumulative size exceeds budget. Modifies messages in place.