Skip to main content

A Python implementation of a minimalist Pi-style coding-agent harness.

Project description

Tau — a Python coding-agent harness inspired by Pi

A small, readable terminal coding agent — and a working example of how coding agents are built.

Documentation · Quickstart · Architecture · PyPI · Roadmap


What is Tau?

Tau is a coding agent that lives in your terminal. You type requests like "explain this repo", "add tests", or "fix this stack trace"; Tau can read files, edit code, run commands, and keep a durable session history while streaming what it is doing.

Tau is also meant to be read. It is a teaching project for understanding the shape of a coding-agent system without starting from a giant production codebase.

tau_coding  →  tau_agent  →  tau_ai
  • tau_ai translates model providers into Tau's provider-neutral stream.
  • tau_agent owns the portable brain: messages, tools, events, loop, harness, and session primitives.
  • tau_coding wraps the brain as a real coding app: CLI, TUI, file/shell tools, provider config, project instructions, skills, and on-disk sessions.

The important boundary is:

AgentHarness = reusable brain
CodingSession = coding-agent environment
TUI = one possible frontend

The core does not know about Textual, Rich, local config paths, slash commands, or rendering. Frontends consume events.

Install

Tau is published on PyPI as tau-ai and installs a tau command. It requires Python 3.12 or newer.

uv tool install tau-ai
tau --version

Don't have uv? Install with pipx or pip instead:

pipx install tau-ai
# or
python -m pip install tau-ai

If you prefer uv, install it with:

curl -LsSf https://astral.sh/uv/install.sh | sh

For local development:

git clone https://github.com/alejandro-ao/tau.git
cd tau
uv sync --dev
uv run tau --version

Quickstart

Run Tau from the project you want it to work on:

cd my-project
tau

Then type a request and press Enter:

explain what this project does

One-shot print mode is useful for scripts and quick prompts:

tau -p "summarize the architecture"
tau --cwd /path/to/project -p "find the CLI entry point"

Tau needs a model provider. Start Tau and connect one with /login:

tau
/login
/login openai
/login openai-codex
/model

Tau ships with support for OpenAI, Anthropic, OpenAI Codex subscription auth, OpenRouter, Hugging Face, and custom OpenAI-compatible endpoints, including local models. See the providers guide.

The built-in catalog lives in src/tau_coding/data/catalog.toml; add your own providers and models by dropping a ~/.tau/catalog.toml with the same schema — no code changes required.

What Tau can do

  • Interactive Textual TUI and non-interactive print mode.
  • Built-in coding tools: read, write, edit, and bash.
  • Durable JSONL sessions under ~/.tau/sessions/ with resume and branching.
  • Slash commands for login, model selection, sessions, compaction, export, theme, and more.
  • Project instructions from AGENTS.md, .tau/, and .agents/ resources.
  • User skills and prompt templates.
  • Context accounting, manual compaction, and optional automatic compaction.
  • Provider-neutral event rendering for Rich, plain text, JSON, transcripts, and custom frontends.

Philosophy

Tau follows a few rules:

  • Small layers beat magic. Each package has one job and can be read alone.
  • Events are the contract. Providers, renderers, the TUI, and custom frontends meet at a typed event stream.
  • The core stays portable. The reusable harness does not depend on the CLI, Textual, Rich, or Tau's file layout.
  • Tools are ordinary typed functions. A tool is a schema plus an async executor returning a structured result.
  • Sessions are durable and inspectable. History is append-only JSONL; active context can be compacted without rewriting the record.
  • Documentation follows implementation. The public docs explain the result; dev-notes/ preserves the phase-by-phase build journal.

Use Tau as a library

from tau_agent import AgentHarness, AgentHarnessConfig

harness = AgentHarness(
    AgentHarnessConfig(
        provider=provider,
        model="my-model",
        system="You are a helpful coding agent.",
        tools=tools,
    )
)

async for event in harness.prompt("Explain this package"):
    print(event)

Because the harness emits events instead of rendering UI directly, the same core can drive the built-in TUI, print mode, or a frontend you build yourself.

Development

See CONTRIBUTING.md for project philosophy, layer boundaries, testing expectations, and pull request guidelines.

uv sync --dev
uv run pytest
uv run ruff check .
uv run ruff format --check .
uv run mypy

Run Tau from the checkout:

uv run tau
uv run tau -p "explain this repo"

Run the Hugo documentation site:

cd website
hugo server -D

Open http://localhost:1313/. Build with hugo --minify.

Documentation

User docs are published at https://twotimespi.dev/ and live in website/content/.

Useful entry points:

Tau is under active development. The implementation roadmap is tracked in GitHub issue #1.

License

Tau is released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tau_ai-0.1.3.tar.gz (542.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tau_ai-0.1.3-py3-none-any.whl (221.3 kB view details)

Uploaded Python 3

File details

Details for the file tau_ai-0.1.3.tar.gz.

File metadata

  • Download URL: tau_ai-0.1.3.tar.gz
  • Upload date:
  • Size: 542.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tau_ai-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4995ebb73a67df47b9f05b86e8020fef00363648a36447caab79f831d31b2ee9
MD5 a8e9f37ebb1e2fd767871f4db3b7388a
BLAKE2b-256 7bcf4b3e2f9913e997e32996cda470648cb54c0804e7cd62006a1bbe67f468ea

See more details on using hashes here.

File details

Details for the file tau_ai-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: tau_ai-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 221.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tau_ai-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e70351002777e8d861983fa63556fdd41991af6ab31ad9df8c7ca136c0b64b31
MD5 2a02a04bc6c201547823364d67c74ae7
BLAKE2b-256 c0ac656a2850d8f6b59fd4f3e19a7ced7d607d995200b299882b75f67257b6a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page