Inspiration
What it does
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for Hippocampus Duo: mammalian memory for GitLab Duo agents
Inspiration. Every Duo session starts from zero, while a human reviewer remembers that "we saw this flaky test twice last month." The mammalian hippocampus solves this problem. It writes episodes quickly, recalls them by association, and consolidates them during sleep into compact schemas, while it protects emotionally important memories.
What it does. Hippocampus Duo plugs a brain-inspired memory MCP server into the GitLab Duo Agent Platform:
- An MCP config for GitLab Duo (
.gitlab/duo/mcp.public.example.json→~/.gitlab/duo/mcp.json) connects Duo Agentic Chat in VS Code and the Duo CLI to six memory tools:remember,recall,sleep,compress_preview,memory_statsandinspect. (GitLab.com lets agents and flows in the web UI attach only allowlisted MCP servers, so the memory tools are used from the IDE / CLI.) - Memory Steward agent plus the MR memory-recall flow (Assisted). On a merge request, it builds a cue from the title, the description and the failing job log. It then recalls similar past defects and fixes by spreading activation, proposes a next step that cites memory ids, and waits for a human to approve. It never merges, pushes or deletes anything on its own. In the IDE it recalls through the memory tools; when the flow runs on the GitLab web platform it has no memory key, says "memory not connected" and works from GitLab context only.
- Skills
hippocampus-recallandhippocampus-sleep. The nightly consolidation run previews, then sleeps, then posts the tier report. - GitLab CI runs the test suite on every push, and the pipeline history is visible.
How it's bio-inspired.
- Hebbian edge strengthening: memories recalled together wire together.
- The spacing effect.
- Sleep-time schema consolidation with a dual check.
- Synaptic-style edge decay.
- Salience protection: important memories stay byte-exact.
Older memories move from the lossless tiers to "schema + residual" tiers, guarded by floors for ROUGE-L, character similarity and semantic similarity. Recall says honestly when details may have faded.
Measured (current engine, re-measured 2026-10-19, 5 runs each; 290-memory synthetic test corpus of 47.9 KB, then one simulated year):
| Tier | Storage | Content ratio | Fidelity |
|---|---|---|---|
| hot | raw | 1.0× | lossless |
| warm | lossless dictionary compression | 2.6–2.9× | lossless |
| cool | schema + residual | 4.9–5.2× | ROUGE-L ≥0.90, char ≥0.85, semantic ≥0.80; QA retention 87–89% (rule probe, checked facts) |
| cold | lossy residual | 7.4–8.7× | ROUGE-L mean 0.76 / min 0.65; QA retention 61% after 1 year (rule probe, checked facts) |
- Whole store including the index after one year: 2.6× on the synthetic corpus (47.9 KB → 18.3 KB). On a set of real personal notes it is 1.5× (cold tier about 2.1×), because real notes rarely repeat a template.
- The QA retention figures come from a rule-based probe with no LLM involved: accuracy on the reconstruction ÷ accuracy on the original, asked only about checked facts (numbers, dates, entities, relations). We expect it to be optimistic.
- 31/31 tests pass; CI is green on
main.
Pre-existing vs new. The core MCP server was first committed on 2026-10-14 for the Amazon Alexa+ hackathon (MIT) and imported to GitLab on 2026-10-16: https://github.com/denyanna7-design/hippocampus-memory. Built for Transcend on or after Oct 5: the Duo MCP wiring, the Memory Steward agent and flow, the skills, CI, and the public deployment.
Lifecycle stages: verify (CI runs the full test suite on every push and MR), create (the review flow posts an MR comment), govern (a human approves each proposed action; a memory-budget alert raises the decision to the human instead of deleting).
Autonomy: Assisted (a human approves each proposed action).
Try it.
- Health check: https://keg-nutty-judgingly.ngrok-free.dev/health should return
{"ok":true}. The root/returns 404 by design, because the demo brain view is disabled on the public deployment. - MCP endpoint (Streamable HTTP):
https://keg-nutty-judgingly.ngrok-free.dev/mcp. It requires anAuthorization: Bearer <key>header. Judges get the key in the private testing instructions; it is never published. - The public store is pre-loaded with 99 synthetic demo memories (generated by the project's test-corpus generator), so a first
recallreturns results. Writes are capped at 2,000 memories and 8,000 bytes per memory. - The deployment runs behind ngrok's free plan. A browser may first show an ngrok notice page; click "Visit Site" to continue. Scripts and MCP clients can skip that page by sending the header
ngrok-skip-browser-warning: 1.
Links: GitLab repo https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/43384489/hippocampus-duo (main @ df516385; code unchanged since a5bb072, which the live service runs) · Demo MR https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/43384489/hippocampus-duo/-/merge_requests/1 · Pipelines https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/43384489/hippocampus-duo/-/pipelines · Deployed MCP https://keg-nutty-judgingly.ngrok-free.dev/mcp · Video https://youtu.be/dFOoh5zgNko · Original project: https://github.com/denyanna7-design/hippocampus-memory
Built With
- gitlab-ci
- gitlab-duo-agent-platform
- mcp
- ngrok
- node.js
- typescript
Log in or sign up for Devpost to join the conversation.