tau-agent

tau is a coding-agent demo built on the ai library. The name is a loving homage to pi.

Single process, Textual TUI, streaming replies, pi-style tool surface:

  • read — read files; offset/limit pagination with continuation hints
  • write — create / overwrite a file
  • edit — exact-match str_replace, multiple disjoint edits per call
  • bash — run a shell command in cwd, output truncated to the last 50KB / 2000 lines (requires approval)
  • grep — regex search (skips .git, node_modules, etc.)
  • find — glob match
  • ls — directory listing

Anthropic and OpenAI's built in web search and web fetch tools are also available when appropriate.

Approval-gated tools fire a ToolApproval hook; the composer turns into a [y/n] prompt mid-turn. Unrelated text typed during a pending approval falls through to the message queue — the hook stays pending until you give it a y or n.

Setup

uv sync

Running

uv run tau

Type a message, hit enter. ctrl+c interrupts a running task (like escape), otherwise clears the prompt; on an empty idle prompt it quits. ctrl+d deletes the character under the cursor, or quits when the prompt is empty. ctrl+j inserts newlines inside a message. Escape interrupts current task.

Smoke test

uv run poe smoke

Drives tau end-to-end under tmux: it asks tau to implement fizzbuzz in a temp dir, then to switch the output to all-caps, validating each step by running the generated file. Needs tmux and an API key; skips when they're unavailable.

Environment

VariableDescriptionDefault
AI_GATEWAY_API_KEYVercel AI Gateway API key—
TAU_MODELModel id passed to ai.get_model(...)anthropic/claude-opus-4-8