huggingface/tau

A Python port of Pi’s minimalist coding agent.

What it solves

Tau provides a lightweight, readable terminal-based coding agent that helps developers perform tasks like explaining repositories, adding tests, and fixing stack traces directly from the command line. It also serves as an educational project to demonstrate how coding-agent systems are architected without the complexity of a massive production codebase.

How it works

Tau is structured into three distinct layers to maintain a clear separation of concerns:

  • tau_ai: Handles the translation of various model providers (OpenAI, Anthropic, Hugging Face, etc.) into a provider-neutral stream.
  • tau_agent: Acts as the "portable brain," managing messages, tools, events, the agent loop, and session primitives.
  • tau_coding: The application layer that provides the CLI, TUI, file/shell tools, and session management on disk.

It operates using a typed event stream, meaning the core logic is decoupled from the frontend (TUI or print mode). It uses durable JSONL files to store session history, allowing for session resumption and branching.

Who it’s for

It is designed for developers who want a functional coding assistant in their terminal and for those interested in learning the internal architecture of AI agents.

Highlights

  • Terminal-native: Includes both an interactive Textual TUI and a non-interactive print mode for scripts.
  • Built-in Tooling: Comes with native tools for reading, writing, editing files, and executing bash commands.
  • Provider Agnostic: Supports OpenAI, Anthropic, OpenRouter, Hugging Face, and custom OpenAI-compatible endpoints.
  • Durable Sessions: Maintains append-only JSONL session history with support for manual and automatic context compaction.
  • Library Usage: The AgentHarness can be imported as a Python library to drive custom frontends.

Related

  • Project
  • Project
  • Project
  • Project
  • Project