A trust firewall for an AI coding agent's long-term memory, built on Cognee. Puts the memory firewall inside the coding agent via MCP, exposing six tools for governed memory recall, storage, auditing, and rule distillation.
ContextFirewall exposes 6 well-named tools with strong, LLM-optimized descriptions (avg 180 chars, all >100 chars). All tools have clear verb-noun naming (get_*, audit_*, remember, forget_*, improve_*, list_*). Input schemas are present with type definitions and descriptions for all parameters. However, output schemas are not documented in the visible code, the MCP server returns results but does not declare the structure of those results in the tool definition. Error handling is minimal; no recovery guidance or actionable error messages are visible. The remember tool accepts a 'kind' enum but does not validate it at runtime. Overall, strong naming and descriptions offset by missing output schema documentation and weak error handling.
Show the firewall's per-memory verdicts for a task (the transparency view). Returns which recalled memories were APPROVED and which were BLOCKED, with the failing check and a plain-language reason for each block, plus the memory_id you can pass to forget_memory. Use this to explain to a human *why* a memory was withheld, or to decide what to retract.
Governance (Cognee forget): delete a memory from the graph and vector store so it can never resurface in recall or a future trusted context pack.
Return a TRUSTED context pack for a task, governed by ContextFirewall. Only memories that pass all four audit checks (staleness, contradiction, secret, evidence) are included. Stale, contradicted, secret-bearing, and unsupported memories are withheld. Call this BEFORE acting on a task to get governed context instead of raw, ungoverned recall.
Distil durable, reusable coding rules from the recorded sessions (Cognee improve / memify). Runs Cognee's coding-rule-association task over the stored session transcript to mint higher-order Rule nodes, then returns the current rule set. This is memory that improves itself: raw events become reusable guidance.
Retrieve the distilled coding rules that have been learned from sessions.
Output schemas not documented. Tools return results but the MCP tool definitions do not declare the structure of those results (fields, types, nested objects). LLMs cannot plan downstream tool calls or extract specific fields without knowing the response schema.
No error handling guidance. Tool descriptions do not explain what errors can occur, how to recover, or what the LLM should do if a call fails. No actionable error messages visible in the code.
remember tool accepts 'kind' enum but no runtime validation visible. The code checks _SAFE_KIND_LABELS but the validation logic is cut off in the provided source. If validation is missing, LLMs can pass invalid kind values.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 68 | 2026-07-28+ | v2 |
Remember a durable fact so future trusted-context requests can audit it (Cognee remember). Secrets are redacted at ingest, so a credential is never stored and will be blocked on the next audit. Returns the new memory_id.
improve_rules and list_coding_rules have empty input schemas ({}). While this is valid for zero-parameter tools, the descriptions do not explain what triggers rule improvement or how many rules are returned, limiting LLM planning.
No pagination or result limits documented. get_trusted_context and audit_context accept top_k but do not specify max value, whether results are sorted, or how to handle large result sets. LLMs may request unbounded results.