Inspiration

AI coding assistants forget everything the moment a session ends. We built Imprint months ago to fix that — a persistent memory layer that lets agents like Claude Code, Cursor, and Codex remember facts about you across sessions instead of starting from zero every time. When the CockroachDB × AWS "Build with Agentic Memory" hackathon came up, it was an obvious fit: the brief asks for exactly what Imprint already is — an agentic application backed by a persistent memory layer — so the work became re-plumbing Imprint's storage onto CockroachDB and shipping it on AWS, rather than inventing a new idea under time pressure.

What it does

Imprint gives any MCP-compatible AI coding agent a durable memory. As you work, it silently extracts durable facts from the conversation — preferences, decisions, project context — and stores them. On your next session, in any IDE, the relevant memories get injected back in automatically. For this build, that memory now lives in CockroachDB: embeddings are stored in a native VECTOR(1024) column and ranked via CockroachDB's distributed vector index for semantic recall, with row-level TTL handling automatic memory expiry. The app is deployed as a container on AWS (Amazon ECS), and the agent itself can reach into CockroachDB directly through the CockroachDB Cloud Managed MCP Server.

How we built it

We rewrote Imprint's storage layer: lib/cockroach.ts replaces lib/dynamodb.ts with identical exported function signatures, backed by pg instead of the AWS SDK, so ~20 of the ~25 API routes needed zero logic changes. db/schema.sql defines the relational schema, with embedding VECTOR(1024) plus a CREATE VECTOR INDEX doing cosine-distance ANN ranking server-side. We provisioned a CockroachDB Cloud cluster on AWS (us-east-1), built the app into a container, pushed it to Amazon ECR, and deployed with Amazon ECS Express Mode. We also registered the CockroachDB Cloud Managed MCP Server against the cluster so the agent can query schema and index health directly.

Challenges we ran into

Two things ate most of our time. First, AWS App Runner — our original deploy target — stopped accepting new customers as of April 30, 2026, discovered mid-deploy. We pivoted to ECS Express Mode instead. Second, CREATE VECTOR INDEX kept failing with unimplemented: vector index build not supported with the legacy schema changer. It turned out CockroachDB Cloud's web SQL Shell runs each statement as a stateless one-shot call, so SET use_declarative_schema_changer = 'on' never persisted to the next statement. The fix was connecting with a real persistent pg client instead, so the SET and the CREATE VECTOR INDEX shared one session.

Accomplishments that we're proud of

Getting the vector index requirement verified end-to-end against a live CockroachDB v25.3 cluster — real ANN ranking on real embeddings. We also caught the App Runner deprecation ourselves mid-build and adapted instead of shipping a broken deploy guide.

What we learned

Managed SQL shells aren't neutral — CockroachDB Cloud's stateless execution model cost real debugging time before we recognized it as a client-side quirk, not a database limitation. Cloud platform docs can go stale fast — App Runner guidance from a few months back no longer applied by launch day.

What's next for Imprint

Wiring the CockroachDB Cloud MCP Server into Imprint's contradiction-detection and dedup logic so the agent reasons about memory conflicts by querying CockroachDB directly. Benchmarking the distributed vector index against the original pool-and-cosine approach at scale, and using row-level TTL for access-pattern-based memory decay.

Built With

Share this project:

Updates

Submission history