ElephantBroker: A Knowledge-Grounded Cognitive Runtime for Trustworthy AI Agents
Organizations: Elephant Broker, 050141 Bucharest, Romania
Abstract
Large Language Model based agents increasingly operate in high stakes, multi turn settings where factual grounding is critical, yet their memory systems typically rely on flat key value stores or plain vector retrieval with no mechanism to track the provenance or trustworthiness of stored knowledge. We present ElephantBroker, an open source cognitive runtime that unifies a Neo4j knowledge graph with a Qdrant vector store through the Cognee SDK to provide durable, verifiable agent memory. The system implements a complete cognitive loop (store, retrieve, score, compose, protect, learn) comprising a hybrid five source retrieval pipeline, an eleven dimension competitive scoring engine for budget constrained context assembly, a four state evidence verification model, a five stage context lifecycle with goal aware assembly and continuous compaction, a six layer cheap first guard pipeline for safety enforcement, an AI firewall providing enforceable tool call interception and multi tier safety scanning, a nine stage consolidation engine that strengthens useful patterns while decaying noise, and a numeric authority model governing multi organization identity with hierarchical access control. Architectural validation through a comprehensive test suite of over 2,200 tests spanning unit, integration, and end to end levels confirms subsystem correctness. The modular design supports three deployment tiers, five profile presets with inheritance, multi gateway isolation, and a management dashboard for human oversight, enabling configurations from lightweight memory only agents to full cognitive runtimes with enterprise grade safety and auditability.
Figures & tables
| Capability | Ours | Zep | Mem0 | MemGPT | L.C. | QMD | S.M. |
|---|---|---|---|---|---|---|---|
| Knowledge graph | ✓ | ✓ | Opt. | — | — | — | — |
| Vector store | ✓ | ✓ | ✓ | — | — | ✓ | ✓ |
| Evidence tracking | ✓ | — | — | — | — | — | — |
| Goal-aware scoring | ✓ | — | — | — | — | — | — |
| Working set budget | ✓ | — | — | ✓ | — | — | — |
| Multi-agent actors | ✓ | — | Part. | — | — | — | Part. |
| Scope | Visibility | Decay Cadence | Promotion Target |
|---|---|---|---|
| GLOBAL | All gateways in org | Monthly | Terminal |
| ORGANIZATION | Matching org_id | Weekly | GLOBAL |
| TEAM | Matching team_id | Weekly | ORGANIZATION |
| ACTOR | Owner actor only | Daily | TEAM |
| SESSION | Current session | Hourly | ACTOR |
| TASK | Current task | Hourly | SESSION |
| Class | Typical Content | Decay | Promotable | Compaction |
|---|---|---|---|---|
| EPISODIC | Events, decisions | Yes | SEMANTIC (3+ sessions) | Summarizable |
| SEMANTIC | Durable knowledge | Slow | Terminal | Mergeable |
| PROCEDURAL | Workflows, SOPs | None | Terminal | Preserve |
| POLICY | Constraints, rules | None | Terminal | Always inject |
| WORKING_MEMORY | Transient context | Session-only | — | Drop at session end |
| Entity Type | Schema Source | Indexed Fields | Vector Collection |
|---|---|---|---|
| Fact | Fact assertion | text | Fact_text |
| Actor | Actor reference | display name | Actor_display_name |
| Goal | Goal state | title, description | Goal_title |
| Procedure | Procedure def. | name, description | Procedure_name |
| Claim | Claim record | claim text | Claim_claim_text |
| Evidence | Evidence ref. | reference value | Evidence_ref_value |
| Parameter | Coding | Research | Manager | Worker | Personal |
|---|---|---|---|---|---|
| turn_relevance | 1.5 | 0.8 | 0.7 | 1.3 | 1.0 |
| session_goal_rel. | 1.2 | 1.0 | 1.5 | 1.4 | 0.8 |
| global_goal_rel. | 0.3 | 0.8 | 1.0 | 0.3 | 0.4 |
| recency | 1.2 | 0.5 | 0.6 | 1.3 | 0.9 |
| successful_use | 0.8 | 0.6 | 0.5 | 0.7 | 0.9 |
| confidence | 0.3 | 0.8 | 0.5 | 0.4 | 0.3 |
| Dimension | Procedures | Guards | Evidence |
|---|---|---|---|
| Nature | Prescriptive | Restrictive | Accountable |
| Timing | When activated | Every action | After action |
| Question | How to do it? | Is it safe? | Can you prove it? |
| Scope | Per-workflow | Per-session | Per-claim |
| Failure mode | Incomplete step | Blocked action | Unverified claim |
| Storage | Cognee graph | Redis + graph | Cognee graph |
LLM Agent Memory
Large language model agent memory lets agents retain, organize, retrieve, and update information across interactions and long-running tasks.
See all 373 papers