← all posts
· intro · memory · governance · Daniel Barreto

Why foundry-ai exists

AI coding agents forget. They forget the master context. They forget the constraints you spent an hour explaining yesterday. foundry-ai is the layer that makes them remember — and that audits what they propose before it touches your repo.

Every senior dev I know has had this conversation with an AI agent:

“I told you yesterday to never edit the migration files directly.”

The agent didn’t remember. It couldn’t have. Its memory ends when the session does.

foundry-ai is the layer between you and that forgetting. A small Rust daemon, a SQLCipher-encrypted echo store, and an MCP server that exposes the persisted context back to whichever agent you’re using today.

What it actually does

  • Captures every prompt, every tool call, every session — in an encrypted local store that survives across agents.
  • Surfaces a master_context — the project’s purpose, non-negotiables, and stack — that the agent reads on every session start.
  • Exposes specs as a first-class unit of agent work, with a lifecycle the agent can drive: draft → audited → executing → done.
  • Audits proposed work through the agent’s own LLM subscription — foundry-ai itself never spends a paid token.

What it isn’t

  • Not a hosted SaaS. The store is on your machine.
  • Not a replacement for your AI agent. It wraps Claude Code, Cursor, and any MCP-aware tool.
  • Not a marketplace. There’s nothing to subscribe to.

If your agent is the brain, foundry-ai is the hippocampus and the prefrontal cortex.