MemoryForge AI

Inspiration

AI agents often forget failures between sessions. That causes repeated mistakes, duplicated work, and decisions that never improve. MemoryForge gives an agent durable operating memory—not passive chat history—so a retrieved experience can change the next action.

What it does

The demo runs the same deployment task twice. Run 1 has no relevant failure memory, chooses a synchronous deployment, times out, and writes the structured failure to CockroachDB. Run 2 retrieves that exact memory through vector search, changes its strategy to an asynchronous job with a health check, succeeds, and stores the successful outcome.

How we built it

AWS Lambda runs the decision loop. Amazon Bedrock Titan Text Embeddings v2 produces normalized 1024-dimensional embeddings. CockroachDB stores task context, decisions, outcomes, reasoning, confidence, and vectors in one persistent table, with a distributed vector index for cosine-distance recall.

The response exposes causal evidence: the CockroachDB-generated written_memory_id, all recalled_memory_ids, and plan.adapted_from_memory. Run 2 succeeds only after the retrieved failure passes relevance and confidence thresholds.

Verified live evidence

The deployed memoryforge-ai-agent Lambda was invoked twice with the same agent and task. Run 1 wrote memory c7a7eb57-dd10-4163-8618-88c9232c2678. Run 2 recalled the identical ID, changed synchronous_deployment to async_job_with_health_check, and returned success. The automated same_memory_changed_action check returned true.

Challenges

The main challenge was proving causality rather than merely showing stored history. Real deployment testing exposed and fixed embedding-dimension, TLS CA, Lambda package, JSONB adaptation, and vector-literal issues. The final repository documents every required installation, schema, local invocation, and AWS SAM deployment step.

Accomplishments

  • Real CockroachDB write and vector recall
  • Same memory ID attributed to the changed Run 2 action
  • Real AWS Lambda and Bedrock execution
  • Reproducible setup and least-privilege deployment guidance
  • 2 minute 14 second demo with live AWS evidence

What we learned

Agentic memory needs provenance and a testable causal chain: fail, write, recall, change action, succeed.

What's next

Memory consolidation, confidence decay, workflow checkpoints, and multi-agent shared memory.

Built With

Share this project:

Updates