{"slug": "huggingface-tau-a-python-port-of-pi-s-minimalist-coding-agent", "title": "HuggingFace/tau: A Python port of Pi's minimalist coding agent", "summary": "Hugging Face released Tau, a minimalist terminal coding agent published on PyPI as tau-ai, requiring Python 3.12 or newer. Tau is structured in three layers — tau_ai for provider-neutral model streams, tau_agent for the reusable agent brain, and tau_coding for the CLI/TUI coding app — and supports OpenAI, Anthropic, OpenAI Codex subscription auth, OpenRouter, Hugging Face, and custom OpenAI-compatible endpoints including local models. Hugging Face describes Tau as a teaching project for understanding the shape of a coding-agent system without starting from a giant production codebase.", "body_md": "**A small, readable terminal coding agent — and a working example of how coding agents are built.**\n\n[Documentation](https://twotimespi.dev/)\n  ·\n  [Quickstart](https://twotimespi.dev/quickstart/)\n  ·\n  [Architecture](https://twotimespi.dev/internals/architecture/)\n  ·\n  [PyPI](https://pypi.org/project/tau-ai/)\n  ·\n  [Roadmap](https://github.com/huggingface/tau/issues/1)\n\n[Join the Tau Discord community →](https://link.alejandro-ao.com/tau-discord)\n\n**Tau is a coding agent that lives in your terminal.** You type requests like\n\"explain this repo\", \"add tests\", or \"fix this stack trace\"; Tau can read files,\nedit code, run commands, and keep a durable session history while streaming what\nit is doing.\n\nTau 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.\n\n```\ntau_coding  →  tau_agent  →  tau_ai\n```\n\n- `tau_ai` translates model providers into Tau's provider-neutral stream.\n- `tau_agent` owns the portable brain: messages, tools, events, loop, harness,\nand session primitives.\n- `tau_coding` wraps the brain as a real coding app: CLI, TUI, file/shell tools,\nprovider config, project instructions, skills, and on-disk sessions.\n\nThe important boundary is:\n\n```\nAgentHarness = reusable brain\nCodingSession = coding-agent environment\nTUI = one possible frontend\n```\n\nThe core does not know about Textual, Rich, local config paths, slash commands, or rendering. Frontends consume events.\n\nTau is published on PyPI as `tau-ai` and installs a `tau` command.\nIt requires Python 3.12 or newer. The recommended installers use\n[`uv`](https://docs.astral.sh/uv/) and install it first when necessary.\n\nmacOS and Linux:\n\n```\ncurl -LsSf https://twotimespi.dev/install.sh | sh\n```\n\nWindows PowerShell:\n\n```\nirm https://twotimespi.dev/install.ps1 | iex\n```\n\nThe installers do not use `sudo`. They announce before installing `uv`, install\nTau in an isolated tool environment, verify `tau --version`, and report if a\nshell restart is needed. You can [inspect the shell installer](https://twotimespi.dev/install.sh)\nor [PowerShell installer](https://twotimespi.dev/install.ps1) before running it.\n\nAlready have a package manager? Install Tau directly:\n\n```\nuv tool install tau-ai\n# or\npipx install tau-ai\n# or\npython -m pip install tau-ai\n```\n\nThen check it worked:\n\n```\ntau --version\n```\n\nTau is also available on [conda-forge](https://conda-forge.org), and can be installed using [pixi](https://pixi.prefix.dev/latest/#installation):\n\n```\npixi global install tau-ai\n```\n\nUpgrade a normal installation with:\n\n```\ntau update\n```\n\nFor local development:\n\n```\ngit clone https://github.com/huggingface/tau.git\ncd tau\nuv sync --dev\nuv run tau --version\n```\n\nTo make the checkout-backed command available globally, install it as an editable tool:\n\n```\nuv tool install --editable --force .\n```\n\nRun that command again after `git pull`. Editable installs expose source-code\nchanges immediately, but the tool environment's package metadata, dependencies,\nand entry points are only refreshed when uv reinstalls the tool. Without the\nrefresh, `tau --version` can still show the version from the previous install.\n\nRun Tau from the project you want it to work on:\n\n```\ncd my-project\ntau\n```\n\nThen type a request and press **Enter**:\n\n```\nexplain what this project does\n```\n\nOne-shot print mode is useful for scripts and quick prompts:\n\n```\ntau -p \"summarize the architecture\"\ntau --cwd /path/to/project -p \"find the CLI entry point\"\n```\n\nTau needs a model provider. Start Tau and connect one with `/login`:\n\n```\ntau\n/login\n/login openai\n/login openai-codex\n/model\n```\n\nTau ships with support for OpenAI, Anthropic, OpenAI Codex subscription auth,\nOpenRouter, Hugging Face, and custom OpenAI-compatible endpoints, including local\nmodels. See the [providers guide](https://twotimespi.dev/guides/providers-and-models/).\n\nThe built-in catalog lives in `src/tau_coding/data/catalog.toml`; add your own\nproviders and models by dropping a `~/.tau/catalog.toml` with the same schema —\nno code changes required.\n\n- Interactive Textual TUI and non-interactive print mode.\n- Built-in coding tools: `read` ,`write` ,`edit` , and`bash` .\n- Durable JSONL sessions under `~/.tau/sessions/` with resume and branching.\n- Slash commands for login, model selection, sessions, compaction, export, theme, and more.\n- Project instructions from `AGENTS.md` ,`.tau/` , and`.agents/` resources.\n- User skills, prompt templates, and custom TUI themes.\n- Context accounting, manual compaction, and optional automatic compaction.\n- Provider-neutral event rendering for Rich, plain text, JSON, transcripts, and custom frontends.\n\nTau follows a few rules:\n\n- **Small layers beat magic.** Each package has one job and can be read alone.\n- **Events are the contract.** Providers, renderers, the TUI, and custom\nfrontends meet at a typed event stream.\n- **The core stays portable.** The reusable harness does not depend on the CLI,\nTextual, Rich, or Tau's file layout.\n- **Tools are ordinary typed functions.** A tool is a schema plus an async\nexecutor returning a structured result.\n- **Sessions are durable and inspectable.** History is append-only JSONL; active\ncontext can be compacted without rewriting the record.\n- **Documentation follows implementation.** The public docs explain the result;`dev-notes/` preserves the phase-by-phase build journal.\n\n``` python\nfrom tau_agent import AgentHarness, AgentHarnessConfig\n\nharness = AgentHarness(\n    AgentHarnessConfig(\n        provider=provider,\n        model=\"my-model\",\n        system=\"You are a helpful coding agent.\",\n        tools=tools,\n    )\n)\n\nasync for event in harness.prompt(\"Explain this package\"):\n    print(event)\n```\n\nBecause 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.\n\nSee [CONTRIBUTING.md](/huggingface/tau/blob/main/CONTRIBUTING.md) for project philosophy, layer boundaries, testing expectations, and pull request guidelines.\n\n```\nuv sync --dev\nuv run pytest\nuv run ruff check .\nuv run ruff format --check .\nuv run mypy\n```\n\nRun Tau from the checkout:\n\n```\nuv run tau\nuv run tau -p \"explain this repo\"\n```\n\nRun the Hugo documentation site:\n\n```\ncd website\nhugo server -D\n```\n\nOpen [http://localhost:1313/](http://localhost:1313/). Build with `hugo --minify`.\n\nUser docs are published at [https://twotimespi.dev/](https://twotimespi.dev/) and live in\n`website/content/`.\n\nUseful entry points:\n\nTau is under active development. The implementation roadmap is tracked in\n[GitHub issue #1](https://github.com/huggingface/tau/issues/1).\n\nTau is released under the [MIT License](/huggingface/tau/blob/main/LICENSE).", "url": "https://wpnews.pro/news/huggingface-tau-a-python-port-of-pi-s-minimalist-coding-agent", "canonical_source": "https://github.com/huggingface/tau", "published_at": "2026-09-14 16:37:17+00:00", "updated_at": "2026-09-14 16:56:38.198842+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-products"], "entities": ["Hugging Face", "Tau", "tau-ai", "tau_ai", "tau_agent", "tau_coding", "OpenAI", "Anthropic"], "alternates": {"html": "https://wpnews.pro/news/huggingface-tau-a-python-port-of-pi-s-minimalist-coding-agent", "markdown": "https://wpnews.pro/news/huggingface-tau-a-python-port-of-pi-s-minimalist-coding-agent.md", "text": "https://wpnews.pro/news/huggingface-tau-a-python-port-of-pi-s-minimalist-coding-agent.txt", "jsonld": "https://wpnews.pro/news/huggingface-tau-a-python-port-of-pi-s-minimalist-coding-agent.jsonld"}}