Inspiration
I have been building agent products where the agent is supposed to do real work — on-call, coding fleets, incident response — and the failure mode is always the same. The agent is sharp for one session, then the process dies, and the next spawn is an amnesiac with a pager.
That is not a model problem. It is a memory problem. Chat history is not a system of record. Sidecar vector stores drift from the ticket. If the memory layer goes down, the agent does not degrade. It stops.
The CockroachDB × AWS brief named that exactly: agents spawn autonomously, write constantly, and need memory that survives regions and process death. Relic is the product I wished those agents already had — especially after watching on-call agents repeat a rollback they had already “learned” an hour earlier.
What it does
Relic is durable memory for on-call AI agents.
When checkout p99 explodes, Relic does not start from a blank prompt. It:
- Stores the incident as a transactional episode in CockroachDB (working memory).
- Recalls similar outages and runbooks with CockroachDB distributed vector search on
memories.embedding. - Acts — checks that the memory database itself is healthy (
ccloud), writes an investigation packet to Amazon S3, optionally reasons with Bedrock. - Commits the lesson as episodic + semantic rows so the next agent, tonight or in another region, inherits the fix.
Memory kinds are explicit: working, episodic, semantic, procedural. Artifacts stay on S3. Secrets never go in payload JSONB. Tenant-prefixed VECTOR indexes keep one customer’s incidents from leaking into another agent’s retrieval.
Nearest-neighbor recall is ordinary pgvector-compatible distance on the same database as the ticket:
$$ \hat{m} = \arg\min_{m \in M_t} \lVert e(m) - e(q) \rVert_2 $$
where (M_t) is tenant (t)’s memories and (e(\cdot)) is the embedding. No second store. Same commit.
How we built it
- CockroachDB as the system of record:
episodes,traces,memories(VECTOR(384)+CREATE VECTOR INDEX (tenant_id, embedding)),artifacts,audit_log. - Distributed vector indexing (C-SPANN) for retrieval; prefix column
tenant_idfor isolation. - Agent Skills (
skills/cockroachdb-agent-memory) so the next coding agent does not invent a sidecar. - ccloud CLI on every incident (
cluster list --output json) before the agent trusts memory. - Managed MCP config for Cursor/Claude (
mcp/cockroachdb.mcp.json); local read-only contract atGET /api/mcp/tools. - AWS: S3 (MinIO locally) for investigation JSON, Lambda handler for serverless turns, Bedrock Converse when keys are present.
- App: Next.js console — page an incident, watch the trace, search memory.
Local path: Docker Cockroach + MinIO, npm run db:migrate && npm run db:seed && npm run dev. Cloud path: point DATABASE_URL at CockroachDB Cloud (sslmode=verify-full).
Challenges we ran into
Vector indexes are off until feature.vector_index.enabled is set — easy to miss, fatal for the demo. Node pg against Cockroach Cloud needs TLS (verify-full), and migrate scripts do not load .env unless you force them. SQL users can create relic or get stuck on defaultdb; the migrator has to survive both.
The product trap was worse: a trailer voice and jargon slides that never said what Relic is. We rewrote the demo to lead with the sentence: memory for on-call agents, not a chatbot.
Time was the other constraint. Bedrock and live ccloud credentials are wired but optional; the loop still resolves from retrieved memories when AWS is local MinIO.
Accomplishments that we're proud of
- Memory is not a bolt-on. VECTOR search and the incident row share CockroachDB.
- A live SEV-1 path that actually retrieves the prior checkout outage, writes S3, and commits a lesson.
- Tenant-prefixed indexes as a multi-tenant contract, not a footnote.
- A public MIT repo, a sub-3-minute demo that explains the product, and a 3:2 thumbnail that states store / recall / act.
What we learned
Agentic systems fail like distributed systems: the unit of loss is a spawn, not a user session. If memory is not transactional and always-on, “the agent remembered” is a lie.
Cockroach’s vector index is the point only if embeddings live next to operational state. The prefix column is how you keep RAG from becoming a cross-tenant leak. MCP read-only-by-default is the correct default for coding agents sitting on production memory.
What's next for Relic
- Point production
DATABASE_URLat multi-region CockroachDB Cloud and kill a node mid-turn on camera. - Real Titan/Bedrock embeddings instead of local hash vectors.
- Service-account
ccloud+ Managed MCP in the judged environment, not only the local contract. - Memory compaction: decay low-importance working rows, keep procedural runbooks hot.
- Plug Relic into an actual agent fleet (coding + on-call) as the shared memory bus, not a demo tenant.
Built With
- amazon-bedrock
- amazon-web-services
- artificial-intelligence
- aws-lambda
- cockroachdb
- cockroachdb-cloud
- cursor
- docker
- elevenlabs
- github
- langchain
- machine-learning
- mcp
- minio
- next.js
- node.js
- postgresql
- rag
- react
- rest-api
- sql
- typescript
- vector-database

Log in or sign up for Devpost to join the conversation.