uac unified agent context

Docs

Memory

How the shared memory store works — explicit writes, not silent capture.

Memory is a single SQLite file per project at .agents/memory.db, searched with full-text search. It holds the why that isn’t in the code: decisions, gotchas, conventions, preferences.

Written on purpose, not captured

uac uses explicit writes: an agent calls memory_write when it learns something non-obvious. It does not silently record everything.

That’s a deliberate choice. Auto-capture tools burn tokens on every session and fill the store with stale, contradictory notes that make the other agent confidently wrong. A small store of hand-picked facts is worth more than a large one that’s mostly noise.

Every memory records who wrote it

uac memory list
- (gotcha, via claude-code) [web, lint] `npm run lint` hangs a non-interactive
  agent — ESLint isn't configured. Use `npx tsc --noEmit`.
- (decision, via codex) [styling] web/ is plain CSS with design tokens, no
  Tailwind. Don't follow LiveKit's shadcn snippets.

The source (claude-code / codex / human) lets you see which agent learned what, and debug cross-agent contamination.

How agents write and read it

Two session hooks do the work so you don’t have to prompt for it:

  • Session start injects AGENTS.md, the skills index, and recent memories — so a session begins informed. This is the load-bearing piece: in practice, an agent asked about a stored fact will grep the filesystem and find nothing unless the memory was put in front of it first.
  • Session end blocks the first stop and asks the agent to save anything durable via memory_write. The agent’s own model writes it — that’s how uac summarizes without an API key.

The tools

The MCP server exposes memory_write, memory_search, memory_forget, and project_context. Read tools are annotated read-only, which matters for headless Codex — see Gotchas.

By hand

uac memory add "text" --kind gotcha --tags a,b
uac memory search "vpn"
uac memory forget <id>