Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/elara-labs/code-context-engine/pigit clone --depth 1 https://github.com/elara-labs/code-context-engineWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00010 | $0.00527 |
| Opus 5 | $0.00005 | $0.00264 |
| Sonnet 5 | $0.00002 | $0.00105 |
| Haiku 4.5 | $0.00001 | $0.00053 |
Grade A, and why
pi scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pi does not support MCP natively. CCE provides the standard .mcp.json config (consumed by a companion adapter) and writes AGENTS.md (loaded automatically by Pi at startup).
Quick setup
cce init # Auto-detects Pi if .pi/ exists in the project
cce init --agent pi # Explicitly configure Pi
cce init --agent all # Includes Pi alongside all other editors
Adapter required
Because Pi has no built-in MCP client, you need a companion adapter extension that reads .mcp.json and bridges Pi to the CCE MCP server. One option is pi-mcp-adapter.
Without the adapter, Pi can still read AGENTS.md and follow the CCE usage instructions, but it cannot call context_search as an MCP tool.
Files created
.mcp.json
Registers the CCE MCP server. Shared with Claude Code if both are configured.
{
"mcpServers": {
"context-engine": {
"command": "cce",
"args": ["serve", "--project-dir", "/path/to/your/project"]
}
}
}
AGENTS.md
Contains instructions for Pi to prefer context_search for code retrieval. The CCE block is wrapped in markers so your own content is preserved during upgrades.
Auto-detection
cce init (without --agent) detects Pi when a .pi/ directory exists in the project root.
Verify it's working
- Install and activate the MCP adapter for Pi
- Restart Pi after running
cce init - Ask Pi a question about your code
- Run
cce savingsto confirm queries are being tracked
Troubleshooting
Pi doesn't call context_search
Pi needs a MCP adapter to forward tool calls. Confirm the adapter is installed and points at the .mcp.json in your project root.
"cce: command not found"
Ensure cce is on your PATH. Add ~/.local/bin to your shell profile if installed with uv tool install.
Auto-detection doesn't find Pi
CCE looks for a .pi/ directory in the project root. If it doesn't exist, use cce init --agent pi to force configuration.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 67 lines · 10 tokens per session scan A 26b99bdac645
pi is an agent published in the GitHub repository elara-labs/code-context-engine (407 stars, last pushed 8d ago), licensed MIT. It adds 10 tokens to every session and 527 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
ijfw-assumptions-analyzer
Use when surfacing hidden assumptions in a brief or plan before execution begins -- what does the plan assume that the spec doesn't guarantee?
ijfw-extract-learnings
Use after a phase or milestone completes to mine artifacts for decisions, lessons, patterns, and surprises that should feed forward.
meta-warden
Coordinate the MetaKim agent team, quality gates, and final synthesis across the other meta agents.
nopua-mentor-ja
Agent Team メンター役 — 他のチームメイトの実行状況を観察し、恐怖ではなく知恵で導く。行き詰まり、放棄、受け身に陥ったときは道徳経の知恵で啓発。5人以上のチーム推奨。.
scout
Fast exploration agent. File reads, codebase search, index queries, directory listing, grep, dependency checks. Use when speed matters more than depth.
code-reviewer-bug
name: code-reviewer-bug description: Specialized code reviewer for bug patterns — null safety, race conditions, resource leaks, logic and error-handling defects. Returns scored findings (severity × impact × confidence). skills: code-review model: inherit.