2026 · AI agents · In progress
frobou-memory
An MCP server that gives AI agents long-term memory, with layered semantic search and isolation between accounts, and a web panel for organizations and teams.
- Role
- Design and development
- Period
- May 2026 — present
- Stack
- Astro · Docker · Hono · LLM · MCP · Node.js · Ollama · pgvector · PostgreSQL · React · TypeScript
- Team
- Solo, with AI agents
The problem
An AI agent starts every session from scratch and redoes the investigation that was already done. Keeping context in repository files helps little: they lose nuance, mix different projects and force the agent to read everything again. And the document that should prevent this ages on its own, because writing after the work is the task that always gets left for tomorrow.
frobou-memory is an MCP server that stores what the agent decides and returns only what matters for the task at hand. The agent itself records it, at the moment of the decision, following a protocol that skips no step. I use it every day: on August 5, 2026, my instance had 11 projects, 531 live memories and 2599 tool calls over 49 days of use.
The memory
- Memories per project, per feature and per run, each scope with its own expiry. Every memory carries a mandatory summary: the agent has to say why it deserves to stay. The summary is what semantic search indexes, and a short question finds a short summary better than a long text.
- Search in four layers, from cheapest to most expensive: index, metadata filter, semantic search that returns only a summary and a score, and the full content on demand.
- Hybrid ranking that weighs similarity, importance, recency and the focus of the feature in progress. A memory superseded by another one moves down.
- Governance against rot: pinned memories have a cap, refused right at write time, a run's memory expires on its own, and duplicates can be diagnosed.
/memory-setupwires a project in a single command: it creates the project on the server, writes the protocol to a.frobou-memory.mdfile and loads it throughCLAUDE.mdorAGENTS.md, for Claude Code and Codex. Other commands open and close features and runs.
Measured recall
Search quality is measured, not estimated. A harness of its own writes memories into an empty PostgreSQL through the same tools the agent uses, runs the searches and computes precision@k, nDCG@k and MRR. The evaluation sets are versioned: one reproduces the size and shape of real memories, another holds adversarial cases across features. On the realistic set, nDCG@5 stands at 0.83.
In CI, a drop of more than 5% from the last approved measure fails the change, and the ranking weights come from sweeps over those same sets.
Isolation between accounts
Several accounts and projects fit in a single instance. The token is the identity: no tool takes the account identifier, the server resolves it from the credential, and a request that names another account's project gets an explicit refusal. A dedicated test suite covers the isolation, the code that enforces it requires 100% coverage, and static gates in CI reject a change that removes the scope check from a query.
A panel for organizations and teams
A web panel brings frobou-memory to teams: people and organizations manage accounts, tokens and access from the browser, with no command line and no admin token, which stays with whoever runs the server.
- A control plane separate from the MCP, with accounts for people: sign-up with a verified email, password reset and a cookie session with CSRF protection.
- Organizations: creating one creates the account on the MCP and issues the first token in the same transaction; later tokens are shown only once and can be revoked. A five-milestone activation checklist comes from what the database records, not from boxes someone ticks by hand.
- Teams, with invitations that expire in seven days and roles checked on the server.
- Single sign-on through SAML, with the account created on first access and emergency codes for the day the identity provider goes down.
- An audit trail the database only lets you append to, with CSV export, and personal data requests, with a portability package and anonymization.
The panel does not read what the agents store. The role the control plane uses in the database has no access to the memory tables, only to views with counts, such as the store's health: live memories, pending vectors and what expires within the week. On startup, the service checks which role it is connected as and stops if it is not that one.
The panel's interface is in Portuguese and English. The landing page, also in both languages, publishes the health signals of my own store with the date of each reading, and a number that goes past its deadline is taken down.
How it is built
The MCP server is TypeScript on Node 22, with the official SDK over HTTP. PostgreSQL 16 with pgvector stores memories and vectors, in an HNSW index, and embeddings come from bge-m3 running on Ollama, on the same machine. The control plane is Hono, the panel is React with TanStack Router and Query, the landing page is Astro, and the shared schemas are Drizzle and Zod. At the edge, Caddy handles TLS; everything runs on Docker Compose, and a systemd service brings the whole stack up when the machine boots.
Tests run with Vitest and against a real PostgreSQL in Testcontainers, and the panel and the landing page go through axe and Lighthouse in CI.
30
MCP tools
4
search layers, from cheapest to most expensive
100%
test coverage required on the code that isolates accounts