{"id":49251475,"url":"https://github.com/pacifio/cersei","last_synced_at":"2026-04-25T00:40:39.392Z","repository":{"id":349282700,"uuid":"1199724854","full_name":"pacifio/cersei","owner":"pacifio","description":"The Rust SDK for building coding agents. Tool execution, LLM streaming, graph memory, sub-agent orchestration, MCP — as composable library functions.","archived":false,"fork":false,"pushed_at":"2026-04-23T15:54:53.000Z","size":78355,"stargazers_count":275,"open_issues_count":3,"forks_count":55,"subscribers_count":9,"default_branch":"main","last_synced_at":"2026-04-23T17:34:21.235Z","etag":null,"topics":["agent","antrophic","claude-code","codex","coding-agent","openai","opencode","rust"],"latest_commit_sha":null,"homepage":"https://cersei.pacifio.dev/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pacifio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-02T16:35:42.000Z","updated_at":"2026-04-23T16:15:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pacifio/cersei","commit_stats":null,"previous_names":["pacifio/cersei"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pacifio/cersei","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacifio%2Fcersei","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacifio%2Fcersei/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacifio%2Fcersei/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacifio%2Fcersei/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pacifio","download_url":"https://codeload.github.com/pacifio/cersei/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacifio%2Fcersei/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32246404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","antrophic","claude-code","codex","coding-agent","openai","opencode","rust"],"created_at":"2026-04-25T00:40:38.886Z","updated_at":"2026-04-25T00:40:39.386Z","avatar_url":"https://github.com/pacifio.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cersei\n\nThe complete Rust SDK for building coding agents.\n\nCersei gives you every building block of a production coding agent — tool execution, LLM streaming, sub-agent orchestration, persistent memory, skills, MCP integration — as composable library functions. Build a Claude Code replacement, embed an agent in your app, or create something entirely new.\n\n```rust\nuse cersei::prelude::*;\n\n#[tokio::main]\nasync fn main() -\u003e anyhow::Result\u003c()\u003e {\n    let output = Agent::builder()\n        .provider(Anthropic::from_env()?)\n        .tools(cersei::tools::coding())\n        .permission_policy(AllowAll)\n        .run_with(\"Fix the failing tests in src/\")\n        .await?;\n\n    println!(\"{}\", output.text());\n    Ok(())\n}\n```\n\n**MIT License** | Built by [Adib Mohsin](https://github.com/pacifio) | [Docs](https://cersei.pacifio.dev/docs) | [GitHub](https://github.com/pacifio/cersei)\n\n---\n\n## Why Cersei\n\n| | Claude Code | OpenCode | **Cersei SDK** | **Abstract CLI** |\n|---|---|---|---|---|\n| Form factor | CLI app | CLI app | **Library** | **CLI app** |\n| Embeddable | No | No | **Yes** | No (uses SDK) |\n| Provider | Anthropic only | Multi-provider | **Multi-provider** | **Multi-provider** |\n| Language | TypeScript | TypeScript | **Rust** | **Rust** |\n| Custom tools | Plugins | Plugins | **`impl Tool` / `#[derive(Tool)]`** | Via SDK |\n| Startup | ~269ms | ~300ms | N/A (library) | **~34ms** |\n| Binary / RSS | 174MB / 330MB | — | N/A | **5.8MB / 4.9MB** |\n| Memory | File-based | SQLite | **File + Graph** | **File + Graph** |\n| Skills | `.claude/commands/` | `.claude/skills/` | **Both formats** | **Both formats** |\n\nCersei is built from the architecture of Claude Code (reverse-engineered Rust port) and designed so that anyone can build a complete, drop-in replacement for Claude Code, OpenCode, or any coding agent — as a library call.\n\n---\n\n## Abstract — The CLI\n\n**Abstract** is a complete CLI coding agent built on Cersei. One binary, zero runtime dependencies, graph memory by default.\n\n```bash\n# Install\ncargo install --path crates/abstract-cli\n\n# Use\nabstract                           # Interactive REPL\nabstract \"fix the failing tests\"   # Single-shot\nabstract --resume                  # Resume last session\nabstract --model opus --max        # Opus with max thinking\nabstract --no-permissions --json   # CI mode with NDJSON output\n```\n\n### Abstract vs Claude Code\n\nAll numbers from `run_tool_bench.sh --full`.\n\n| Metric | Abstract | Claude Code | Winner |\n|--------|----------|-------------|--------|\n| Startup (warm) | **32ms** | 266ms | Abstract (8.2x) |\n| Binary size | **6.0 MB** | 174 MB | Abstract (29x) |\n| Memory (RSS) | **4.9 MB** | 333 MB | Abstract (68x) |\n| Tool dispatch | **0.02-17ms** | 5-265ms+ | Abstract |\n| Memory recall | **98us** (graph) | 7,545ms (LLM) | Abstract (77,000x) |\n| Memory write | **30us** (graph) | 20,687ms (agent) | Abstract (689,000x) |\n| MEMORY.md load | **9.6us** | 17.1ms | Abstract (1,781x) |\n| Sequential throughput | **906ms/req** | 12,079ms/req | Abstract (13.3x) |\n| System prompt tokens | **~2,200** | ~8,000+ | Abstract (3.6x fewer) |\n| LLM call for recall | **Not needed** | Required (Sonnet) | Abstract |\n\n\u003e Claude Code's memory recall calls Sonnet every turn to rank the top 5 files by relevance (7.5s measured).\n\u003e Abstract's graph does indexed lookups in 98 microseconds — same capability, no LLM call, no API cost.\n\nFull benchmark: [`crates/abstract-cli/benchmarks/REPORT.md`](crates/abstract-cli/benchmarks/REPORT.md)\n\n### Features\n\n- 34 built-in tools (file, shell, web, planning, orchestration, scheduling)\n- Multi-provider: Anthropic + OpenAI (+ Ollama, Azure, vLLM)\n- Graph memory (Grafeo) on by default\n- Auto-compact, auto-dream, effort levels (Low/Medium/High/Max)\n- MCP server support\n- Session persistence (Claude Code-compatible JSONL)\n- Interactive permissions with session caching\n- 12 slash commands (`/help`, `/commit`, `/review`, `/memory`, `/model`, `/diff`, etc.)\n- Streaming markdown rendering with syntax highlighting\n- TOML config: `~/.abstract/config.toml` + `.abstract/config.toml`\n- JSON output mode for piping (`--json`)\n\n---\n\n## Install\n\n```toml\n[dependencies]\ncersei = { git = \"https://github.com/pacifio/cersei\" }\ntokio = { version = \"1\", features = [\"full\"] }\nanyhow = \"1\"\n```\n\nFor graph-backed memory (optional):\n```toml\ncersei-memory = { git = \"https://github.com/pacifio/cersei\", features = [\"graph\"] }\n```\n\n---\n\n## Architecture\n\n```\ncersei                    Facade crate — use cersei::prelude::*;\n  cersei-types            Provider-agnostic messages, errors, stream events\n  cersei-provider         Provider trait + Anthropic/OpenAI implementations\n  cersei-tools            30+ tools, permissions, bash classifier, skills, git utils\n  cersei-tools-derive     #[derive(Tool)] proc macro\n  cersei-agent            Agent builder, agentic loop, compact, coordinator, effort\n  cersei-memory           Memory trait, memdir, CLAUDE.md, sessions, Grafeo graph\n  cersei-hooks            Hook/middleware system\n  cersei-mcp              MCP client (JSON-RPC 2.0, stdio transport)\nabstract-cli              CLI coding agent (\"abstract\") — REPL, commands, config, permissions\n```\n\n---\n\n## Core Concepts\n\n### Provider\n\nAny LLM backend. Built-in: Anthropic (with OAuth), OpenAI (compatible with Ollama, Azure, vLLM).\n\n```rust\nAgent::builder().provider(Anthropic::from_env()?)           // Anthropic API key\nAgent::builder().provider(OpenAi::builder()\n    .base_url(\"http://localhost:11434/v1\")                   // Ollama\n    .model(\"llama3.1:70b\").api_key(\"ollama\").build()?)\nAgent::builder().provider(MyCustomProvider)                  // impl Provider\n```\n\n### Tools (30+)\n\nEvery tool a coding agent needs, organized into sets:\n\n```rust\ncersei::tools::all()           // 30+ tools\ncersei::tools::coding()        // filesystem + shell + web\ncersei::tools::filesystem()    // Read, Write, Edit, Glob, Grep, NotebookEdit\ncersei::tools::shell()         // Bash, PowerShell\ncersei::tools::web()           // WebFetch, WebSearch\ncersei::tools::planning()      // EnterPlanMode, ExitPlanMode, TodoWrite\ncersei::tools::scheduling()    // CronCreate/List/Delete, Sleep, RemoteTrigger\ncersei::tools::orchestration() // SendMessage, Tasks (6 tools), Worktree\n```\n\nCustom tools in 10 lines:\n\n```rust\n#[derive(Tool)]\n#[tool(name = \"search\", description = \"Search docs\", permission = \"read_only\")]\nstruct SearchTool;\n\n#[async_trait]\nimpl ToolExecute for SearchTool {\n    type Input = SearchInput; // derives Deserialize + JsonSchema\n    async fn run(\u0026self, input: SearchInput, ctx: \u0026ToolContext) -\u003e ToolResult {\n        ToolResult::success(format!(\"Found: {}\", input.query))\n    }\n}\n```\n\n### Sub-Agent Orchestration\n\nSpawn parallel workers, coordinate tasks, pass messages between agents:\n\n```rust\n// AgentTool — model spawns sub-agents autonomously\nAgent::builder()\n    .tool(AgentTool::new(|| Box::new(Anthropic::from_env()?), cersei::tools::coding()))\n\n// Coordinator mode — orchestrate parallel workers\nAgent::builder()\n    .tools(cersei::tools::all())  // includes Agent, Tasks, SendMessage\n    // Workers get filtered tools (no Agent — prevents recursion)\n\n// Task system\n// TaskCreate → TaskUpdate → TaskGet → TaskList → TaskStop → TaskOutput\n```\n\n### Memory (Three-Tier)\n\n```rust\nuse cersei::memory::manager::MemoryManager;\n\nlet mm = MemoryManager::new(project_root)\n    .with_graph(Path::new(\"./memory.grafeo\"))?;  // optional graph layer\n\n// Tier 1: Flat files (~/.claude/projects/\u003croot\u003e/memory/)\nlet metas = mm.scan();                    // scan .md files with frontmatter\nlet content = mm.build_context();         // build system prompt injection\n\n// Tier 2: CLAUDE.md hierarchy (managed \u003e user \u003e project \u003e local)\n// Automatically merged into build_context()\n\n// Tier 3: Graph memory (Grafeo, optional)\nlet id = mm.store_memory(\"User prefers Rust\", MemoryType::User, 0.9)?;\nmm.tag_memory(\u0026id, \"preferences\");\nlet results = mm.recall(\"Rust\", 5);       // graph query with fallback to text match\n\n// Session persistence (JSONL, append-only, tombstone soft-delete)\nmm.write_user_message(\"session-1\", Message::user(\"Hello\"))?;\nlet messages = mm.load_session_messages(\"session-1\")?;\n```\n\n### Skills (Claude Code + OpenCode Compatible)\n\n```rust\n// Auto-discovers skills from:\n//   .claude/commands/*.md      (Claude Code format)\n//   .claude/skills/*/SKILL.md  (OpenCode format)\n//   ~/.claude/commands/*.md    (user-level)\n//   Bundled skills             (simplify, debug, commit, verify, stuck, remember, loop)\n\nlet skill_tool = SkillTool::new().with_project_root(\".\");\n// skill=\"list\" → lists all available skills\n// skill=\"debug\" args=\"tests are flaky\" → expands $ARGUMENTS template\n```\n\n### Realtime Events\n\nThree observation mechanisms:\n\n```rust\n// 1. Callback\nAgent::builder().on_event(|e| match e {\n    AgentEvent::TextDelta(t) =\u003e print!(\"{}\", t),\n    AgentEvent::ToolStart { name, .. } =\u003e eprintln!(\"[{}]\", name),\n    _ =\u003e {}\n})\n\n// 2. Broadcast (multi-consumer)\nlet agent = Agent::builder().enable_broadcast(256).build()?;\nlet mut rx = agent.subscribe().unwrap();\ntokio::spawn(async move { while let Ok(e) = rx.recv().await { /* ... */ } });\n\n// 3. Stream (bidirectional control)\nlet mut stream = agent.run_stream(\"Deploy\");\nwhile let Some(e) = stream.next().await {\n    if let AgentEvent::PermissionRequired(req) = e {\n        stream.respond_permission(req.id, PermissionDecision::Allow);\n    }\n}\n```\n\n### Context Management\n\n```rust\nAgent::builder()\n    .auto_compact(true)          // summarize old messages at 90% context usage\n    .compact_threshold(0.9)      // trigger threshold\n    .tool_result_budget(50_000)  // truncate oldest tool results above 50K chars\n    .thinking_budget(8192)       // extended thinking tokens\n    .effort(EffortLevel::High)   // Low/Medium/High/Max\n```\n\n### MCP (Model Context Protocol)\n\n```rust\nlet mcp = McpManager::connect(\u0026[\n    McpServerConfig::stdio(\"db\", \"npx\", \u0026[\"-y\", \"@my/db-mcp\"]),\n    McpServerConfig::sse(\"docs\", \"https://mcp.example.com\"),\n]).await?;\n\nAgent::builder().tools(mcp.tool_definitions().await)\n```\n\n### OAuth (Anthropic Native)\n\n```rust\n// Opens browser, PKCE flow, token storage, refresh\ncargo run --example oauth_login\n```\n\n---\n\n## Agent Builder — Complete API\n\n```rust\nAgent::builder()\n    // Provider (required)\n    .provider(Anthropic::from_env()?)\n\n    // Tools\n    .tool(MyTool)\n    .tools(cersei::tools::coding())\n\n    // Model \u0026 generation\n    .model(\"claude-sonnet-4-6\")\n    .max_turns(10)\n    .max_tokens(16384)\n    .temperature(0.7)\n    .thinking_budget(8192)\n\n    // Prompt\n    .system_prompt(\"You are a helpful assistant.\")\n    .append_system_prompt(\"Extra context.\")\n\n    // Environment\n    .working_dir(\"./my-project\")\n    .permission_policy(AllowAll)          // or AllowReadOnly, DenyAll, RuleBased, Interactive\n\n    // Memory\n    .memory(JsonlMemory::new(\"./sessions\"))\n    .session_id(\"my-session\")\n\n    // Hooks \u0026 events\n    .hook(CostGuard { max_usd: 5.0 })\n    .on_event(|e| { /* ... */ })\n    .enable_broadcast(256)\n    .reporter(ConsoleReporter { verbose: true })\n\n    // Context management\n    .auto_compact(true)\n    .compact_threshold(0.9)\n    .tool_result_budget(50_000)\n\n    // Execute\n    .build()?                             // -\u003e Agent\n    .run_with(\"Fix the tests\")            // -\u003e AgentOutput (shorthand)\n```\n\n---\n\n## Benchmarks\n\nMeasured on Apple Silicon, release build, 100 iterations with 3 warmup runs.\n\n### Tool I/O\n\n| Tool | Avg | Min | Max |\n|------|-----|-----|-----|\n| Edit | 0.04ms | 0.02ms | 0.05ms |\n| Glob | 0.05ms | 0.05ms | 0.07ms |\n| Write | 0.09ms | 0.07ms | 0.11ms |\n| Read | 0.09ms | 0.08ms | 0.11ms |\n| Grep | 5.85ms | 5.34ms | 8.51ms |\n| Bash | 15.64ms | 14.50ms | 16.19ms |\n\n### vs Claude Code CLI\n\n\u003e **Note:** Cersei is a library — tool dispatch happens in-process. Claude Code is a CLI where\n\u003e each sub-agent fork pays full startup cost. These are different layers; the comparison below\n\u003e shows the gap between in-process dispatch and CLI process overhead.\n\n| Metric | Cersei (SDK) | Claude Code (CLI) | Notes |\n|--------|-------------|-------------------|-------|\n| Tool dispatch (Read) | 0.09ms | ~5-15ms (est.) | In-process vs Node.js fs |\n| CLI startup | N/A (library) | 269ms | Claude `--version` warm avg |\n| Sub-agent spawn | ~1ms (in-process) | ~300ms (fork) | Agent tool overhead |\n\nFor an apples-to-apples CLI comparison, see [Abstract CLI benchmarks](crates/abstract-cli/benchmarks/REPORT.md).\n\n### Memory I/O\n\n| Operation | Abstract (Cersei) | Claude Code (measured) | Ratio |\n|-----------|------------------|----------------------|-------|\n| Scan 100 files | **1.2ms** | 26.6ms (`find`) | 22x |\n| Load MEMORY.md | **9.6μs** | 17.1ms | 1,781x |\n| Memory recall (graph) | **98μs** | 7,545ms (LLM call) | 77,000x |\n| Memory recall (text) | **1.3ms** | 17.5ms (`grep`) | 13x |\n| Session write | **27μs/entry** | N/A | — |\n| Session load (100) | **268μs** | N/A | — |\n| Graph store | **30μs/node** | N/A (no graph) | — |\n| Topic query | **77μs** | N/A (no graph) | — |\n\n### Benchmark suites\n\nEach bench lives in its own self-contained directory with its own runner and result schema. Add new benches as siblings.\n\n| Suite | Path | What it measures | Runner |\n|---|---|---|---|\n| **General-agent frameworks** | [`bench/general-agents/`](bench/general-agents/) | Per-agent memory, instantiation time, max concurrent agents — Cersei vs Agno / PydanticAI / LangGraph / CrewAI. | `./bench/general-agents/run.sh` |\n| **Terminal Bench 2.0** | [`bench/term-bench/`](bench/term-bench/) | End-to-end coding tasks inside Daytona sandboxes using the full `abstract` CLI (Linux x86_64 / arm64 binaries shipped in-tree). | `./bench/term-bench/run.sh` |\n| **LongMemEval (long-term memory)** | [`bench/long-mem/`](bench/long-mem/) | Recall accuracy on the ICLR-25 LongMemEval 500-question benchmark — head-to-head vs Mastra / Zep / Supermemory with identical prompts and LLM-as-judge rubric. Four Cersei configs: full-context baseline, usearch-HNSW semantic, grafeo-graph substring, hybrid w/ LLM fact extraction + RRF fusion. | `cargo run --release -p longmem-bench -- --dataset s --config all` |\n| **Compression (real LLMs)** | `crates/cersei-agent/tests/e2e_openai_compression.rs` | Input-token savings from `cersei-compression` on OpenAI (`gpt-4o-mini`) and Gemini (`gemini-2.5-flash`). `#[ignore]`, runs with real API keys. | `cargo test -p cersei-agent --test e2e_openai_compression -- --ignored --nocapture` |\n| **SDK Tool I/O** | `examples/benchmark_io.rs` | In-process tool dispatch latency for Read / Write / Edit / Grep / Bash / Glob. | `cargo run --example benchmark_io --release` |\n| **SDK Memory I/O** | `crates/abstract-cli/examples/memory_bench.rs` | Graph-memory vs filesystem vs Claude Code-style paths. | `cargo run -p abstract-cli --example memory_bench --release` |\n| **vs Claude Code CLI** | `run_tool_bench_claude.sh` · `run_tool_bench_codex.sh` | CLI-vs-CLI startup, memory, and dispatch overhead. | `./run_tool_bench.sh --iterations 20 --full` |\n\n### Run benchmarks\n\n```bash\n# Rust-side SDK benches (no external services)\ncargo run --example benchmark_io --release\ncargo run --release -p abstract-cli --example memory_bench\n\n# vs Claude Code / Codex CLIs\n./run_tool_bench.sh --iterations 20 --full\n\n# Python-harness benches (uv-managed; each dir self-contained)\n./bench/general-agents/run.sh          # Cersei vs Agno / PydanticAI / LangGraph / CrewAI\n./bench/term-bench/run.sh              # Terminal Bench 2.0 via Daytona\n\n# LongMemEval memory benchmark (head-to-head vs Mastra / Zep / Supermemory)\n./bench/long-mem/setup.sh              # downloads oracle + s datasets\nOPENAI_API_KEY=sk-… cargo run --release -p longmem-bench -- \\\n  --dataset s --config all --concurrency 8\n\n# Real-LLM compression savings (requires API keys)\nOPENAI_API_KEY=sk-… cargo test -p cersei-agent \\\n  --test e2e_openai_compression -- --ignored --nocapture\n```\n\n---\n\n## Stress Tests\n\n```bash\ncargo run --example stress_core_infrastructure --release  # system prompt, compact, context, bash classifier\ncargo run --example stress_tools --release                 # all 30+ tools, registry, performance\ncargo run --example stress_orchestration --release         # sub-agents, coordinator, tasks, messaging\ncargo run --example stress_skills --release                # bundled + disk skills, Claude Code + OpenCode format\ncargo run --example stress_memory --release                # memdir, CLAUDE.md, sessions, extraction, auto-dream\n```\n\n---\n\n## Examples\n\n| Example | Description |\n|---------|-------------|\n| [`simple_agent`](examples/simple_agent.rs) | Minimal agent in 3 lines |\n| [`custom_tools`](examples/custom_tools.rs) | Define and register custom tools |\n| [`streaming_events`](examples/streaming_events.rs) | Real-time `run_stream()` with colored output |\n| [`multi_listener`](examples/multi_listener.rs) | Broadcast channel with multiple consumers |\n| [`resumable_session`](examples/resumable_session.rs) | Persist and resume with `JsonlMemory` |\n| [`custom_provider`](examples/custom_provider.rs) | Echo provider + OpenAI-compatible endpoints |\n| [`hooks_middleware`](examples/hooks_middleware.rs) | Cost guard + audit logger + tool blocker |\n| [`benchmark_io`](examples/benchmark_io.rs) | Full I/O benchmark suite |\n| [`usage_report`](examples/usage_report.rs) | Token/cost tracking and billing estimates |\n| [`coding_agent`](examples/coding_agent.rs) | Build a Python todo CLI (end-to-end) |\n| [`oauth_login`](examples/oauth_login.rs) | Anthropic OAuth PKCE login flow |\n\n```bash\ncargo run --example simple_agent --release\n```\n\n---\n\n## Test Suite\n\n```bash\n# Run all 160 unit tests\ncargo test --workspace\n\n# Run with graph memory (requires grafeo)\ncargo test --workspace --features graph\n\n# Run specific crate\ncargo test -p cersei-tools\ncargo test -p cersei-agent\ncargo test -p cersei-memory\ncargo test -p cersei-mcp\n```\n\n**160 unit tests** | **262 stress checks** | **0 failures** | **Zero I/O regression**\n\n---\n\n## Extension Points\n\n| What | How | Example |\n|------|-----|---------|\n| Custom provider | `impl Provider` | Local LLM, Azure, Bedrock |\n| Custom tool | `#[derive(Tool)]` or `impl Tool` | DB query, deploy, search |\n| Custom permissions | `impl PermissionPolicy` | RBAC, OAuth-scoped |\n| Custom memory | `impl Memory` | PostgreSQL, Redis, S3 |\n| Custom hooks | `impl Hook` | Cost gating, audit logging |\n| Custom reporters | `impl Reporter` | Dashboards, WebSocket relay |\n| MCP servers | `McpServerConfig` via builder | Any MCP-compatible server |\n| Skills | `.claude/commands/*.md` | Custom prompt templates |\n| Graph memory | `features = [\"graph\"]` | Grafeo relationship tracking |\n\n---\n\n## Documentation\n\n**[cersei.pacifio.dev/docs](https://cersei.pacifio.dev/docs)** — full docs with API reference, architecture, cookbooks, benchmarks, and llms.txt support.\n\n| Section | Content |\n|---------|---------|\n| [Quick Start](https://cersei.pacifio.dev/docs/quick-start) | First agent in 10 lines |\n| [API Reference](https://cersei.pacifio.dev/docs/api-agent) | Agent, Provider, Tools, Memory, Hooks, MCP |\n| [Architecture](https://cersei.pacifio.dev/docs/architecture) | Crate map, data flow, design principles |\n| [Cookbooks](https://cersei.pacifio.dev/docs/cookbook-custom-tools) | Custom tools, deployment, embedding |\n| [Abstract CLI](https://cersei.pacifio.dev/docs/abstract) | Reference CLI built on Cersei |\n| [Benchmarks](https://cersei.pacifio.dev/docs/bench-vs-claude-code) | vs Claude Code vs Codex |\n\n---\n\n## License\n\nMIT License\n\nCopyright (c) 2025 Adib Mohsin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacifio%2Fcersei","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpacifio%2Fcersei","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacifio%2Fcersei/lists"}