Back to Projects
TauCode - the agent that remembers
In ProgressTypeScriptBunSQLite+3 more

TauCode - the agent that remembers

A local-first coding agent with persistent, project-scoped memory. It reads, writes and edits files and runs shell commands, and session ten starts where session nine ended.

Timeline

Ongoing

Role

Full Stack Engineer

Team

Solo

Status
In Progress

Technology Stack

TypeScript
Bun
SQLite
Hono
OpenAI
Anthropic

Key Challenges

  • Deciding per turn whether memory is worth retrieving
  • Keeping local tool execution safe without a sandbox
  • Supporting multiple providers behind one model interface
  • Streaming agent state to a live dashboard in real time

Key Learnings

  • Agent loop design (turn → LLM → tools → repeat)
  • SQLite FTS5 for fast full-text memory search
  • OAuth flows for CLI tools
  • Evaluating agents with deterministic tests and LLM-as-judge

TauCode - the agent that remembers

Situation

Most coding agents start every session from zero. You explain the project layout, your conventions and what you did yesterday, and the next session you explain it all again. Agents that do keep memory tend to stuff everything into context, so irrelevant facts crowd out the ones that matter. Many also route your code through a hosted service or cloud sandbox.

Task

The goal was a coding agent that:

  • Does everything a normal coding agent does: read, write and edit files, and run shell commands.
  • Keeps persistent, project-scoped memory across sessions, and only pulls it into context when a turn actually needs it.
  • Runs fully locally, on your machine, with your choice of model provider.
  • Makes its behaviour visible: what it did, why, and what it cost.

Action

I built taucode in TypeScript on Bun, drawing on pi-code for the coding-agent tool layer and waku-agent for the memory, eval and harness pillars.

1. Three kinds of memory

  • Facts (semantic memory) are stored per project in SQLite and searched with FTS5.
  • Episodes are one-sentence summaries written after every turn. They consolidate over time, so the agent remembers last week's work without keeping the full transcript.
  • Skills (procedural memory) are named instructions with trigger keywords, injected into context when a prompt matches. The agent can write new skills itself with create_skill.
  • A project Soul file (.tau/SOUL.md) holds the standing persona and preferences and is added to every turn.

2. Retrieval Gate

  • Not every turn needs memory. A cheap, fast model call decides per turn whether to query facts at all, and with what search query.
  • Greetings, math and small talk are caught by regex before the gate model even runs, so they cost nothing.

3. Local execution with a Permission Gate

  • Tools run directly on your machine, with no sandbox. Reads and web searches run automatically; writes, edits, shell commands and memory changes ask for approval first.
  • The reasoning is recorded in ADRs in the repo, along with the other large architectural calls.

4. Provider-agnostic model layer

  • OpenAI works through browser OAuth against a ChatGPT/Codex subscription, so no API key is needed. Claude uses a real Anthropic API key.
  • Models can be swapped mid-session with /model, and providers with /auth.

5. Live dashboard

  • bun start launches the CLI chat loop and a dashboard at localhost:7777, built with plain HTML/CSS/JS and a Hono server, in light and dark themes.
  • It shows sessions, the Retrieval Gate hit rate, every traced turn, memory by type, registered tools and MCP servers, a read-only SQL console over the state database, and eval history.
  • A chat dock talks to the same agent as the terminal, streams reasoning and tool calls, and asks for approval before gated actions.

6. Tracing, cost tracking and evals

  • Every turn writes a JSONL trace and appends to a cost ledger, so you can see what the agent did and what it cost.
  • Evals run in two layers: deterministic Bun test assertions and LLM-as-judge scoring. A CI gate fails the build when scores drop below a threshold.

Result

  • Continuity across sessions: facts, episodes and skills carry over, so each session picks up where the last one ended.
  • Focused context: the Retrieval Gate keeps irrelevant memory out of the prompt.
  • Your machine, your model: no hosted service and no cloud sandbox. The agent, memory and dashboard all run locally, and every risky action goes through the Permission Gate.
  • Observable by default: traces, cost tracking, the dashboard and the eval gate show what the agent is doing and whether it's getting worse.

Design & Developed by saikatD inspired by ramXCodes
© 2026. All rights reserved.