Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent Memory — verifier-gated agent with CockroachDB as persistent memory

CockroachDB × AWS Agent Hackathon — "Build with Agentic Memory"

What it does

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.

Why CockroachDB

  • 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)

Run it (offline demo, 2 minutes — zero infra)

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

Run it on CockroachDB Serverless (free tier)

# 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

Deploy on AWS (see deploy/)

  • 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.

The verifier-gate angle

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.

About

Agent Hackathon (CockroachDB x AWS): verifier-gated agent with CockroachDB as persistent memory

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages