Skip to contentSkip to Content
Architecture

Knowledge base MCP tools

Agents reach the knowledge base through the Model Context Protocol — 13 tools across four jobs: priming context, searching, learning from failure, and remembering across sessions.

ToolWhat it does
kb_contextThe first call of any task: decomposes the request into optimized queries, retrieves across all tiers in parallel, returns a synthesized briefing (~1,500 tokens instead of 6,000+)
kb_searchNarrow follow-up queries on a specific topic after initial context is loaded
kb_statusHealth and index state of the knowledge base

Ingestion and outputs

ToolWhat it does
kb_ingestAdds new documents to the knowledge base
kb_submit_outputRecords project output data (Tier 3) for later evaluation
kb_submit_outcomeRecords how an output performed, closing the optimization loop

Error memory and learnings — the self-annealing surface

ToolWhat it does
kb_check_errorsCalled BEFORE risky operations (deploys, migrations, bulk sends): returns known errors matching the planned action, with root causes and prevention rules
kb_log_errorCalled AFTER resolving any non-trivial failure: severity (S1 prod-down / S2 blocked / S3 friction) plus exactly one resolution — prevention-rule, check-added, or accepted-risk
kb_update_learningAppends durable discoveries to the relevant directive’s Learnings section

Session memory

ToolWhat it does
memory_savePersists a discovery for future sessions
memory_searchRecalls relevant past work
memory_timelineReviews session history chronologically

Vault writes

ToolWhat it does
vault_writeFiles notes into the bot-writable vault areas: errors, learnings, sessions, reviews, and inbox

The two-lane rule

Writes follow two lanes. Lane A (automatic): errors, learnings, sessions, and reviews go straight to the vault through the tools above. Lane B (reviewed): changes to directives and SOPs — the normative documents — go through a pull request in the owning repository, reviewed by a human. Agents record what happened freely; they don’t rewrite the rules without review.

Next steps

Last updated on