CockroachDB × AWS Agent Hackathon — "Build with Agentic Memory"
An autonomous web-data agent whose entire memory lives in CockroachDB:
- Episodic memory: every run (source, row count, schema, gate result) — append-only
- Working memory: the last N runs + active goals — the agent's context window
- Decision log: what it decided and why, per run
- Semantic memory: extracted facts (schema-extensible)
The agent can only write to memory when its verifier gate passes (rows > 0, schema matches, no duplicate run). Failed runs leave no trace — memory is never poisoned, so the agent always reasons over trustworthy state.
- SQL = queryable memory (recall is
SELECT, not vector plumbing) - Serverless free tier = zero-ops persistence on AWS-deployed workloads
- The same schema works for single-agent and fleet deployments (row-level scale)
pip install -r requirements.txt
python3 agent_memory.py --target https://news.ycombinator.com/
# [memory] backend: SQLite (offline demo)
# [gate] scrape produced 30 rows
# [memory] persisted run ... + decision# 1. Create a free Serverless cluster at cockroachlabs.cloud (or on AWS Marketplace)
# 2. Get the connection string:
export DATABASE_URL="postgresql://user:pass@host:26257/defaultdb?sslmode=verify-full"
# 3. Same code, real distributed memory:
python3 agent_memory.py --target https://news.ycombinator.com/
# [memory] backend: CockroachDB/Postgres- Option A: CockroachDB Serverless on AWS Marketplace + the agent on AWS Lambda/ECS
- Option B: CockroachDB Dedicated on AWS + ECS Fargate task
deploy/contains the Terraform/CloudFormation sketch + IAM notes.
Same discipline as production autonomous coding agents: the model/agent proposes, the gate disposes. Memory writes are gated on measurable facts (row counts, schema checks, dedupe) — so the agent's "memory" only contains what actually happened, which is what makes its future decisions trustworthy.