tau-ai 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tau_ai-0.1.0/.github/workflows/docs.yml +54 -0
- tau_ai-0.1.0/.github/workflows/publish.yml +65 -0
- tau_ai-0.1.0/.gitignore +15 -0
- tau_ai-0.1.0/.python-version +1 -0
- tau_ai-0.1.0/AGENTS.md +74 -0
- tau_ai-0.1.0/PKG-INFO +368 -0
- tau_ai-0.1.0/README.md +351 -0
- tau_ai-0.1.0/dev-notes/README.md +25 -0
- tau_ai-0.1.0/dev-notes/adr/0001-use-textual-for-tui.md +30 -0
- tau_ai-0.1.0/dev-notes/adr/0002-keep-tool-docs-hand-written.md +76 -0
- tau_ai-0.1.0/dev-notes/architecture/index.md +59 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-1-core-types-and-events.md +249 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-10-system-prompt.md +151 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-11-print-event-rendering.md +135 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-12-textual-tui.md +149 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-13-paths-agents-resources.md +140 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-14-session-manager-resume.md +162 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-15-slash-command-registry.md +159 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-16-resource-discovery.md +102 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-17-5-transcript-wrapping.md +84 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-17-tui-autocomplete.md +100 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-18-provider-config-foundation.md +194 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-19-context-discovery.md +112 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-2-ai-provider-layer.md +178 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-20-1-context-accounting.md +82 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-20-2-thinking-controls.md +160 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-20-3-skill-invocation.md +90 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-20-4-session-export.md +71 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-20-installation-docs.md +64 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-22-compaction-foundation.md +139 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-23-tui-polish.md +221 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-24-session-tree-branching.md +59 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-3-agent-loop.md +243 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-4-agent-harness.md +196 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-5-coding-tools.md +126 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-6-print-mode-cli.md +127 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-7-session-tree.md +138 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-8-coding-session.md +146 -0
- tau_ai-0.1.0/dev-notes/architecture/phase-9-skills-prompts.md +211 -0
- tau_ai-0.1.0/dev-notes/architecture/pre-extension-hardening.md +116 -0
- tau_ai-0.1.0/dev-notes/architecture/provider-retries.md +39 -0
- tau_ai-0.1.0/dev-notes/architecture/queued-steering-follow-ups.md +73 -0
- tau_ai-0.1.0/dev-notes/design/00-roadmap.md +67 -0
- tau_ai-0.1.0/dev-notes/design/01-architecture.md +37 -0
- tau_ai-0.1.0/dev-notes/design/02-agent-loop.md +24 -0
- tau_ai-0.1.0/dev-notes/design/03-tools.md +327 -0
- tau_ai-0.1.0/dev-notes/design/04-sessions.md +87 -0
- tau_ai-0.1.0/dev-notes/design/05-core-types-and-events.md +66 -0
- tau_ai-0.1.0/dev-notes/design/agent-loop.md +35 -0
- tau_ai-0.1.0/dev-notes/design/harness.md +65 -0
- tau_ai-0.1.0/landing.html +573 -0
- tau_ai-0.1.0/pyproject.toml +58 -0
- tau_ai-0.1.0/session-temp.jsonl +13 -0
- tau_ai-0.1.0/src/tau_agent/__init__.py +91 -0
- tau_ai-0.1.0/src/tau_agent/events.py +132 -0
- tau_ai-0.1.0/src/tau_agent/harness.py +297 -0
- tau_ai-0.1.0/src/tau_agent/loop.py +274 -0
- tau_ai-0.1.0/src/tau_agent/messages.py +45 -0
- tau_ai-0.1.0/src/tau_agent/py.typed +0 -0
- tau_ai-0.1.0/src/tau_agent/session/__init__.py +48 -0
- tau_ai-0.1.0/src/tau_agent/session/entries.py +112 -0
- tau_ai-0.1.0/src/tau_agent/session/jsonl.py +35 -0
- tau_ai-0.1.0/src/tau_agent/session/memory.py +146 -0
- tau_ai-0.1.0/src/tau_agent/session/storage.py +38 -0
- tau_ai-0.1.0/src/tau_agent/session/tree.py +38 -0
- tau_ai-0.1.0/src/tau_agent/tools.py +75 -0
- tau_ai-0.1.0/src/tau_agent/types.py +6 -0
- tau_ai-0.1.0/src/tau_ai/__init__.py +58 -0
- tau_ai-0.1.0/src/tau_ai/anthropic.py +341 -0
- tau_ai-0.1.0/src/tau_ai/env.py +108 -0
- tau_ai-0.1.0/src/tau_ai/events.py +89 -0
- tau_ai-0.1.0/src/tau_ai/fake.py +41 -0
- tau_ai-0.1.0/src/tau_ai/openai_codex.py +773 -0
- tau_ai-0.1.0/src/tau_ai/openai_compatible.py +369 -0
- tau_ai-0.1.0/src/tau_ai/provider.py +32 -0
- tau_ai-0.1.0/src/tau_ai/py.typed +0 -0
- tau_ai-0.1.0/src/tau_ai/retry.py +61 -0
- tau_ai-0.1.0/src/tau_coding/__init__.py +273 -0
- tau_ai-0.1.0/src/tau_coding/branch_summary.py +203 -0
- tau_ai-0.1.0/src/tau_coding/cli.py +521 -0
- tau_ai-0.1.0/src/tau_coding/commands.py +787 -0
- tau_ai-0.1.0/src/tau_coding/context.py +93 -0
- tau_ai-0.1.0/src/tau_coding/context_window.py +283 -0
- tau_ai-0.1.0/src/tau_coding/credentials.py +183 -0
- tau_ai-0.1.0/src/tau_coding/diagnostics.py +100 -0
- tau_ai-0.1.0/src/tau_coding/oauth.py +501 -0
- tau_ai-0.1.0/src/tau_coding/paths.py +119 -0
- tau_ai-0.1.0/src/tau_coding/prompt_templates.py +196 -0
- tau_ai-0.1.0/src/tau_coding/provider_catalog.py +244 -0
- tau_ai-0.1.0/src/tau_coding/provider_config.py +1160 -0
- tau_ai-0.1.0/src/tau_coding/provider_runtime.py +157 -0
- tau_ai-0.1.0/src/tau_coding/py.typed +0 -0
- tau_ai-0.1.0/src/tau_coding/reload.py +28 -0
- tau_ai-0.1.0/src/tau_coding/rendering/__init__.py +25 -0
- tau_ai-0.1.0/src/tau_coding/rendering/base.py +24 -0
- tau_ai-0.1.0/src/tau_coding/rendering/json.py +22 -0
- tau_ai-0.1.0/src/tau_coding/rendering/plain.py +36 -0
- tau_ai-0.1.0/src/tau_coding/rendering/transcript.py +104 -0
- tau_ai-0.1.0/src/tau_coding/resources.py +171 -0
- tau_ai-0.1.0/src/tau_coding/session.py +1868 -0
- tau_ai-0.1.0/src/tau_coding/session_export.py +664 -0
- tau_ai-0.1.0/src/tau_coding/session_manager.py +255 -0
- tau_ai-0.1.0/src/tau_coding/shell_config.py +62 -0
- tau_ai-0.1.0/src/tau_coding/skills.py +212 -0
- tau_ai-0.1.0/src/tau_coding/system_prompt.py +170 -0
- tau_ai-0.1.0/src/tau_coding/thinking.py +88 -0
- tau_ai-0.1.0/src/tau_coding/tools.py +1055 -0
- tau_ai-0.1.0/src/tau_coding/tui/__init__.py +65 -0
- tau_ai-0.1.0/src/tau_coding/tui/adapter.py +98 -0
- tau_ai-0.1.0/src/tau_coding/tui/app.py +3735 -0
- tau_ai-0.1.0/src/tau_coding/tui/autocomplete.py +509 -0
- tau_ai-0.1.0/src/tau_coding/tui/config.py +347 -0
- tau_ai-0.1.0/src/tau_coding/tui/state.py +376 -0
- tau_ai-0.1.0/src/tau_coding/tui/widgets.py +1332 -0
- tau_ai-0.1.0/tests/test_agent_harness.py +434 -0
- tau_ai-0.1.0/tests/test_agent_loop.py +633 -0
- tau_ai-0.1.0/tests/test_agent_types.py +120 -0
- tau_ai-0.1.0/tests/test_cli.py +753 -0
- tau_ai-0.1.0/tests/test_coding_session.py +2606 -0
- tau_ai-0.1.0/tests/test_coding_tools.py +249 -0
- tau_ai-0.1.0/tests/test_commands.py +456 -0
- tau_ai-0.1.0/tests/test_context.py +55 -0
- tau_ai-0.1.0/tests/test_context_window.py +127 -0
- tau_ai-0.1.0/tests/test_credentials.py +48 -0
- tau_ai-0.1.0/tests/test_oauth.py +110 -0
- tau_ai-0.1.0/tests/test_paths.py +41 -0
- tau_ai-0.1.0/tests/test_prompt_templates.py +159 -0
- tau_ai-0.1.0/tests/test_provider_config.py +862 -0
- tau_ai-0.1.0/tests/test_provider_runtime.py +97 -0
- tau_ai-0.1.0/tests/test_rendering.py +131 -0
- tau_ai-0.1.0/tests/test_resources.py +63 -0
- tau_ai-0.1.0/tests/test_session.py +256 -0
- tau_ai-0.1.0/tests/test_session_export.py +73 -0
- tau_ai-0.1.0/tests/test_session_manager.py +163 -0
- tau_ai-0.1.0/tests/test_shell_config.py +46 -0
- tau_ai-0.1.0/tests/test_skills.py +208 -0
- tau_ai-0.1.0/tests/test_system_prompt.py +132 -0
- tau_ai-0.1.0/tests/test_tau_ai.py +1088 -0
- tau_ai-0.1.0/tests/test_thinking.py +42 -0
- tau_ai-0.1.0/tests/test_tui_adapter.py +325 -0
- tau_ai-0.1.0/tests/test_tui_app.py +4540 -0
- tau_ai-0.1.0/tests/test_tui_autocomplete.py +517 -0
- tau_ai-0.1.0/tests/test_tui_config.py +166 -0
- tau_ai-0.1.0/uv.lock +536 -0
- tau_ai-0.1.0/website/astro.config.mjs +129 -0
- tau_ai-0.1.0/website/bun.lock +961 -0
- tau_ai-0.1.0/website/package.json +18 -0
- tau_ai-0.1.0/website/public/CNAME +1 -0
- tau_ai-0.1.0/website/public/favicon.svg +3 -0
- tau_ai-0.1.0/website/public/landing.js +366 -0
- tau_ai-0.1.0/website/src/assets/tau-glyph.svg +3 -0
- tau_ai-0.1.0/website/src/content/docs/concepts.md +74 -0
- tau_ai-0.1.0/website/src/content/docs/contributing.md +66 -0
- tau_ai-0.1.0/website/src/content/docs/guides/context.md +78 -0
- tau_ai-0.1.0/website/src/content/docs/guides/print-mode.md +57 -0
- tau_ai-0.1.0/website/src/content/docs/guides/project-instructions.md +50 -0
- tau_ai-0.1.0/website/src/content/docs/guides/providers-and-models.md +99 -0
- tau_ai-0.1.0/website/src/content/docs/guides/sessions.md +89 -0
- tau_ai-0.1.0/website/src/content/docs/guides/skills-and-prompts.md +89 -0
- tau_ai-0.1.0/website/src/content/docs/guides/tui.md +93 -0
- tau_ai-0.1.0/website/src/content/docs/internals/agent-loop.md +51 -0
- tau_ai-0.1.0/website/src/content/docs/internals/architecture.md +62 -0
- tau_ai-0.1.0/website/src/content/docs/internals/custom-frontend.md +108 -0
- tau_ai-0.1.0/website/src/content/docs/internals/design-principles.md +45 -0
- tau_ai-0.1.0/website/src/content/docs/quickstart.md +113 -0
- tau_ai-0.1.0/website/src/content/docs/reference/cli.md +68 -0
- tau_ai-0.1.0/website/src/content/docs/reference/configuration.md +156 -0
- tau_ai-0.1.0/website/src/content/docs/reference/keybindings.md +50 -0
- tau_ai-0.1.0/website/src/content/docs/reference/slash-commands.md +38 -0
- tau_ai-0.1.0/website/src/content/docs/reference/tools.md +106 -0
- tau_ai-0.1.0/website/src/content/docs/what-is-tau.md +57 -0
- tau_ai-0.1.0/website/src/content.config.ts +7 -0
- tau_ai-0.1.0/website/src/layouts/Landing.astro +26 -0
- tau_ai-0.1.0/website/src/pages/index.astro +225 -0
- tau_ai-0.1.0/website/src/pages/why-tau.astro +256 -0
- tau_ai-0.1.0/website/src/styles/custom.css +14 -0
- tau_ai-0.1.0/website/src/styles/landing.css +400 -0
- tau_ai-0.1.0/website/tsconfig.json +5 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Deploy documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
pages: write
|
|
12
|
+
id-token: write
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: pages
|
|
16
|
+
cancel-in-progress: false
|
|
17
|
+
|
|
18
|
+
defaults:
|
|
19
|
+
run:
|
|
20
|
+
working-directory: website
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
build:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout
|
|
27
|
+
uses: actions/checkout@v5
|
|
28
|
+
|
|
29
|
+
- name: Setup Bun
|
|
30
|
+
uses: oven-sh/setup-bun@v2
|
|
31
|
+
with:
|
|
32
|
+
bun-version: latest
|
|
33
|
+
|
|
34
|
+
- name: Install dependencies
|
|
35
|
+
run: bun install --frozen-lockfile
|
|
36
|
+
|
|
37
|
+
- name: Build documentation
|
|
38
|
+
run: bun run build
|
|
39
|
+
|
|
40
|
+
- name: Upload artifact
|
|
41
|
+
uses: actions/upload-pages-artifact@v4
|
|
42
|
+
with:
|
|
43
|
+
path: website/dist
|
|
44
|
+
|
|
45
|
+
deploy:
|
|
46
|
+
environment:
|
|
47
|
+
name: github-pages
|
|
48
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
needs: build
|
|
51
|
+
steps:
|
|
52
|
+
- name: Deploy to GitHub Pages
|
|
53
|
+
id: deployment
|
|
54
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: Publish Python package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- "v*"
|
|
9
|
+
release:
|
|
10
|
+
types:
|
|
11
|
+
- published
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
id-token: write
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
publish:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
environment: pypi
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout
|
|
24
|
+
uses: actions/checkout@v5
|
|
25
|
+
|
|
26
|
+
- name: Install uv
|
|
27
|
+
uses: astral-sh/setup-uv@v7
|
|
28
|
+
with:
|
|
29
|
+
enable-cache: true
|
|
30
|
+
|
|
31
|
+
- name: Set up Python
|
|
32
|
+
uses: actions/setup-python@v6
|
|
33
|
+
with:
|
|
34
|
+
python-version-file: .python-version
|
|
35
|
+
|
|
36
|
+
- name: Check whether version is already on PyPI
|
|
37
|
+
id: pypi
|
|
38
|
+
run: |
|
|
39
|
+
NAME=$(python - <<'PY'
|
|
40
|
+
import tomllib
|
|
41
|
+
print(tomllib.load(open('pyproject.toml', 'rb'))['project']['name'])
|
|
42
|
+
PY
|
|
43
|
+
)
|
|
44
|
+
VERSION=$(python - <<'PY'
|
|
45
|
+
import tomllib
|
|
46
|
+
print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])
|
|
47
|
+
PY
|
|
48
|
+
)
|
|
49
|
+
STATUS=$(curl -s -o /dev/null -w '%{http_code}' "https://pypi.org/pypi/${NAME}/${VERSION}/json")
|
|
50
|
+
echo "name=${NAME}" >> "$GITHUB_OUTPUT"
|
|
51
|
+
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
|
52
|
+
if [ "$STATUS" = "200" ]; then
|
|
53
|
+
echo "exists=true" >> "$GITHUB_OUTPUT"
|
|
54
|
+
echo "${NAME} ${VERSION} already exists on PyPI; skipping publish."
|
|
55
|
+
else
|
|
56
|
+
echo "exists=false" >> "$GITHUB_OUTPUT"
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
- name: Build package
|
|
60
|
+
if: steps.pypi.outputs.exists != 'true'
|
|
61
|
+
run: uv build
|
|
62
|
+
|
|
63
|
+
- name: Publish package
|
|
64
|
+
if: steps.pypi.outputs.exists != 'true'
|
|
65
|
+
run: uv publish
|
tau_ai-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|
tau_ai-0.1.0/AGENTS.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Tau Agent Instructions
|
|
2
|
+
|
|
3
|
+
Tau is a Python implementation of Pi's minimalist coding-agent harness architecture. The goal is to develop it incrementally, with each phase clearly documented and tested.
|
|
4
|
+
|
|
5
|
+
## Project Roadmap
|
|
6
|
+
|
|
7
|
+
The implementation roadmap is tracked in GitHub issue #1:
|
|
8
|
+
|
|
9
|
+
- https://github.com/alejandro-ao/tau/issues/1
|
|
10
|
+
|
|
11
|
+
Use that issue as the primary reference for phase ordering and architectural intent.
|
|
12
|
+
|
|
13
|
+
## Architecture Principles
|
|
14
|
+
|
|
15
|
+
Preserve Pi's core separation of concerns:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
AgentHarness = reusable agent brain
|
|
19
|
+
AgentSession = coding-agent environment
|
|
20
|
+
TUI = one possible frontend
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Tau should be organized around these layers:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
tau_ai provider/model streaming layer
|
|
27
|
+
tau_agent portable agent harness, loop, tools, events, sessions
|
|
28
|
+
tau_coding CLI app, resources, skills, extensions, commands, TUI integration
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Keep the core agent package independent of CLI, Textual, Rich rendering, session file locations, and application-specific resource loading.
|
|
32
|
+
|
|
33
|
+
## TUI Direction
|
|
34
|
+
|
|
35
|
+
Use Textual for the full interactive TUI, but only behind an adapter boundary. The agent harness should emit events; UI layers should consume those events.
|
|
36
|
+
|
|
37
|
+
Early phases should prioritize:
|
|
38
|
+
|
|
39
|
+
1. print-mode CLI
|
|
40
|
+
2. Rich renderers
|
|
41
|
+
3. Textual interactive app
|
|
42
|
+
|
|
43
|
+
Do not let Textual become a dependency of the reusable agent harness.
|
|
44
|
+
|
|
45
|
+
## Development Workflow
|
|
46
|
+
|
|
47
|
+
- Work in small, documented phases.
|
|
48
|
+
- Keep changes aligned with the roadmap issue.
|
|
49
|
+
- Add or update docs when introducing architectural concepts.
|
|
50
|
+
- Add tests for behavior before expanding features.
|
|
51
|
+
- Run tests and Python commands through `uv` (for example, `uv run pytest` or `uv run python ...`) so they use the project environment.
|
|
52
|
+
- Prefer simple, explicit abstractions over framework-heavy designs.
|
|
53
|
+
- Keep commits atomic: one coherent feature, fix, docs update, refactor, or cleanup per commit.
|
|
54
|
+
|
|
55
|
+
## Python Guidelines
|
|
56
|
+
|
|
57
|
+
- Target the Python version declared in `pyproject.toml`.
|
|
58
|
+
- Prefer typed dataclasses or schema models for core messages, events, tools, and sessions.
|
|
59
|
+
- Keep async boundaries explicit.
|
|
60
|
+
- Use fake providers and fake tools for deterministic agent-loop tests.
|
|
61
|
+
- Avoid provider-specific assumptions in core agent code.
|
|
62
|
+
|
|
63
|
+
## Documentation Expectations
|
|
64
|
+
|
|
65
|
+
Each substantial phase should leave behind beginner-friendly notes under `dev-notes/` (build journals, design docs, ADRs), explaining:
|
|
66
|
+
|
|
67
|
+
- what was added
|
|
68
|
+
- why it exists
|
|
69
|
+
- how it maps to Pi's design
|
|
70
|
+
- how to test or use it
|
|
71
|
+
|
|
72
|
+
When a phase adds or changes user-facing behavior, also update the published docs
|
|
73
|
+
under `website/src/content/docs/` (the "Use Tau" guides and reference).
|
|
74
|
+
|
tau_ai-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tau-ai
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A Python implementation of a minimalist Pi-style coding-agent harness.
|
|
5
|
+
Project-URL: Homepage, https://twotimespi.dev
|
|
6
|
+
Project-URL: Documentation, https://twotimespi.dev
|
|
7
|
+
Project-URL: Repository, https://github.com/alejandro-ao/tau
|
|
8
|
+
Project-URL: Issues, https://github.com/alejandro-ao/tau/issues
|
|
9
|
+
Requires-Python: >=3.14
|
|
10
|
+
Requires-Dist: anyio>=4.0
|
|
11
|
+
Requires-Dist: httpx>=0.27
|
|
12
|
+
Requires-Dist: pydantic>=2.0
|
|
13
|
+
Requires-Dist: rich>=13.0
|
|
14
|
+
Requires-Dist: textual>=1.0
|
|
15
|
+
Requires-Dist: typer>=0.12
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<img src="docs/assets/tau-header.svg" alt="Tau — a Python coding-agent harness inspired by Pi" width="100%" />
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<p align="center">
|
|
23
|
+
<strong>A minimalist coding-agent harness in Python, inspired by Pi and built as a teaching project.</strong>
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<a href="https://twotimespi.dev/">Documentation</a>
|
|
28
|
+
·
|
|
29
|
+
<a href="docs/getting-started.md">Getting started</a>
|
|
30
|
+
·
|
|
31
|
+
<a href="docs/architecture/index.md">Architecture notes</a>
|
|
32
|
+
·
|
|
33
|
+
<a href="https://github.com/alejandro-ao/tau/issues/1">Roadmap</a>
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## What is Tau?
|
|
39
|
+
|
|
40
|
+
Tau is a Python implementation of the minimalist coding-agent harness architecture
|
|
41
|
+
popularized by **Pi**. It is both:
|
|
42
|
+
|
|
43
|
+
1. a usable terminal coding agent, and
|
|
44
|
+
2. a readable, phase-by-phase reference implementation for learning how coding
|
|
45
|
+
agents are assembled.
|
|
46
|
+
|
|
47
|
+
The project intentionally keeps the core pieces small and explicit: model
|
|
48
|
+
providers stream events, an agent loop turns those events into tool execution and
|
|
49
|
+
transcript updates, a reusable harness owns state, and the coding app adds local
|
|
50
|
+
files, shell tools, sessions, skills, commands, and terminal frontends.
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
tau_ai provider/model streaming layer
|
|
54
|
+
tau_agent portable agent harness, loop, tools, events, sessions
|
|
55
|
+
tau_coding CLI app, resources, skills, commands, sessions, UI integration
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The central design boundary is:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
AgentHarness = reusable agent brain
|
|
62
|
+
AgentSession = coding-agent environment
|
|
63
|
+
TUI = one possible frontend
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Tau should make the architecture legible. If you want to understand how a coding
|
|
67
|
+
agent works without starting from a large production codebase, this repository is
|
|
68
|
+
for you.
|
|
69
|
+
|
|
70
|
+
## Why Tau exists
|
|
71
|
+
|
|
72
|
+
Tau is being built as an effort to teach how to create coding agents.
|
|
73
|
+
|
|
74
|
+
The philosophy is:
|
|
75
|
+
|
|
76
|
+
- **Small layers beat magic.** Each package has a clear job and can be explained
|
|
77
|
+
independently.
|
|
78
|
+
- **Events are the contract.** The agent harness emits provider-neutral events;
|
|
79
|
+
renderers and TUIs consume them.
|
|
80
|
+
- **The core stays portable.** `tau_agent` does not depend on Textual, Rich,
|
|
81
|
+
shell config directories, slash commands, or application-specific resources.
|
|
82
|
+
- **Tools are ordinary typed functions.** File and shell capabilities are exposed
|
|
83
|
+
through explicit schemas and deterministic result objects.
|
|
84
|
+
- **Sessions are durable and inspectable.** Tau stores append-only JSONL session
|
|
85
|
+
transcripts under `~/.tau/sessions/`.
|
|
86
|
+
- **Documentation follows implementation.** The project is developed in small,
|
|
87
|
+
documented phases so readers can trace how the system grows.
|
|
88
|
+
|
|
89
|
+
Pi is the design inspiration; Tau is the Python learning path.
|
|
90
|
+
|
|
91
|
+
## Current capabilities
|
|
92
|
+
|
|
93
|
+
Tau currently includes:
|
|
94
|
+
|
|
95
|
+
- an installable `tau` console command
|
|
96
|
+
- a Textual interactive TUI
|
|
97
|
+
- non-interactive print mode for one-shot prompts
|
|
98
|
+
- OpenAI-compatible, Anthropic, OpenAI Codex subscription, OpenRouter, and
|
|
99
|
+
Hugging Face provider support through provider configuration
|
|
100
|
+
- provider retry/backoff events and thinking/reasoning deltas
|
|
101
|
+
- built-in local coding tools: `read`, `write`, `edit`, and `bash`
|
|
102
|
+
- durable per-project sessions and session resume
|
|
103
|
+
- session tree branching and HTML/JSONL export
|
|
104
|
+
- slash commands, model picker, theme picker, and autocomplete
|
|
105
|
+
- skills, prompt templates, and `AGENTS.md` project-context discovery
|
|
106
|
+
- context accounting, manual compaction, and optional automatic compaction
|
|
107
|
+
- Rich/plain/json/transcript rendering paths for print-mode output
|
|
108
|
+
- a deterministic fake provider used by tests
|
|
109
|
+
|
|
110
|
+
Tau is still evolving. Expect the command surface and internals to improve as the
|
|
111
|
+
roadmap progresses.
|
|
112
|
+
|
|
113
|
+
## Install
|
|
114
|
+
|
|
115
|
+
Tau targets the Python version declared in `pyproject.toml` and uses
|
|
116
|
+
[`uv`](https://docs.astral.sh/uv/) for the recommended workflow.
|
|
117
|
+
|
|
118
|
+
Install from GitHub:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
uv tool install tau-ai
|
|
122
|
+
tau --version
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Install from a local checkout:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
git clone https://github.com/alejandro-ao/tau.git
|
|
129
|
+
cd tau
|
|
130
|
+
uv tool install --editable .
|
|
131
|
+
tau --version
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
For development:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
uv sync --dev
|
|
138
|
+
uv run tau --version
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## First run
|
|
142
|
+
|
|
143
|
+
Start the interactive terminal UI:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
tau
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Start the TUI and submit the first prompt immediately:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
tau "explain this repository"
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Run a one-shot non-interactive prompt:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
tau -p "summarize the architecture"
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Choose a configured provider/model:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
tau --provider openai --model gpt-4.1 "review this codebase"
|
|
165
|
+
tau --provider local --model qwen -p "list the main modules"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Use another working directory for coding tools:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
tau --cwd /path/to/project "find the CLI entry point"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Configure a model provider
|
|
175
|
+
|
|
176
|
+
The easiest path is from inside the TUI:
|
|
177
|
+
|
|
178
|
+
```text
|
|
179
|
+
/login
|
|
180
|
+
/login openai
|
|
181
|
+
/login openai-codex
|
|
182
|
+
/logout
|
|
183
|
+
/logout openai
|
|
184
|
+
/model
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
`/login` can save API-key credentials for built-in providers or authenticate an
|
|
188
|
+
OpenAI Codex subscription account with OAuth. Credentials are stored in
|
|
189
|
+
`~/.tau/credentials.json` with private file permissions. Provider metadata lives
|
|
190
|
+
in `~/.tau/providers.json`. `/logout` removes only credentials saved in Tau's
|
|
191
|
+
`credentials.json`; environment variables and provider configuration are
|
|
192
|
+
unchanged.
|
|
193
|
+
|
|
194
|
+
You can also configure an OpenAI-compatible provider from the CLI:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
tau --provider local \
|
|
198
|
+
--base-url http://localhost:11434/v1 \
|
|
199
|
+
--api-key-env LOCAL_API_KEY \
|
|
200
|
+
--model qwen \
|
|
201
|
+
setup
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Then run:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
export LOCAL_API_KEY="..."
|
|
208
|
+
tau --provider local
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Useful provider commands:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
tau providers
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
See [docs/providers.md](docs/providers.md) and
|
|
218
|
+
[docs/configuration.md](docs/configuration.md) for details.
|
|
219
|
+
|
|
220
|
+
## Working in the TUI
|
|
221
|
+
|
|
222
|
+
Common slash commands:
|
|
223
|
+
|
|
224
|
+
| Command | Purpose |
|
|
225
|
+
| --- | --- |
|
|
226
|
+
| `/login [provider]` | Save or refresh provider credentials. |
|
|
227
|
+
| `/logout [provider]` | Remove Tau-saved provider credentials. |
|
|
228
|
+
| `/model` | Choose the active provider/model. |
|
|
229
|
+
| `/scoped-models` | Pick models available for quick cycling. |
|
|
230
|
+
| `/session` | Show session and context information. |
|
|
231
|
+
| `/resume [session-id]` | Resume a previous session. |
|
|
232
|
+
| `/tree` | Branch from a previous session entry. |
|
|
233
|
+
| `/name <new name>` | Rename the current session. |
|
|
234
|
+
| `/compact <summary>` | Replace active context with a manual summary. |
|
|
235
|
+
| `/export [--format html\|jsonl] [destination]` | Export the current session. |
|
|
236
|
+
| `/reload` | Reload local resources and project context. |
|
|
237
|
+
| `/theme [name]` | Show or set the TUI theme. |
|
|
238
|
+
| `/hotkeys` | Show common keyboard shortcuts. |
|
|
239
|
+
| `/quit` | Exit the session. |
|
|
240
|
+
|
|
241
|
+
Important TUI behavior:
|
|
242
|
+
|
|
243
|
+
- Click anywhere in the main TUI to return keyboard focus to the prompt input.
|
|
244
|
+
|
|
245
|
+
Common shortcuts:
|
|
246
|
+
|
|
247
|
+
| Shortcut | Action |
|
|
248
|
+
| --- | --- |
|
|
249
|
+
| `Enter` | Submit prompt. |
|
|
250
|
+
| `Shift+Enter` | Insert newline. |
|
|
251
|
+
| `Alt+Enter` | Queue a follow-up while the agent is running. |
|
|
252
|
+
| `Esc` | Cancel active run. |
|
|
253
|
+
| `Ctrl+K` | Open slash-command completions. |
|
|
254
|
+
| `Ctrl+R` | Open session picker. |
|
|
255
|
+
| `Shift+Tab` | Cycle thinking mode. |
|
|
256
|
+
| `Ctrl+T` | Toggle thinking-token display. |
|
|
257
|
+
| `Ctrl+O` | Collapse or expand tool output. |
|
|
258
|
+
| `Ctrl+P` | Cycle scoped models. |
|
|
259
|
+
| `Ctrl+D` | Quit. |
|
|
260
|
+
|
|
261
|
+
## Sessions, resources, and files
|
|
262
|
+
|
|
263
|
+
Tau stores durable app state in your home directory:
|
|
264
|
+
|
|
265
|
+
```text
|
|
266
|
+
~/.tau/providers.json provider metadata
|
|
267
|
+
~/.tau/credentials.json saved API keys and OAuth credentials
|
|
268
|
+
~/.tau/tui.json TUI theme/keybinding settings
|
|
269
|
+
~/.tau/sessions/ append-only JSONL session transcripts
|
|
270
|
+
~/.tau/skills/ user Tau skills
|
|
271
|
+
~/.tau/prompts/ user prompt templates
|
|
272
|
+
~/.tau/AGENTS.md user Tau instructions
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Tau also reads user-level `.agents` resources and project-local resources from
|
|
276
|
+
the active working directory, including `AGENTS.md`, `.tau/`, and `.agents/`
|
|
277
|
+
locations. This lets a project teach Tau how it should behave without changing
|
|
278
|
+
Tau's core harness.
|
|
279
|
+
|
|
280
|
+
## Use Tau as a library
|
|
281
|
+
|
|
282
|
+
Tau's reusable brain lives in `tau_agent`:
|
|
283
|
+
|
|
284
|
+
```python
|
|
285
|
+
from tau_agent import AgentHarness, AgentHarnessConfig
|
|
286
|
+
|
|
287
|
+
harness = AgentHarness(
|
|
288
|
+
AgentHarnessConfig(
|
|
289
|
+
provider=provider,
|
|
290
|
+
model="my-model",
|
|
291
|
+
system="You are a helpful coding agent.",
|
|
292
|
+
tools=tools,
|
|
293
|
+
)
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
async for event in harness.prompt("Explain this package"):
|
|
297
|
+
print(event)
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
That harness is deliberately independent of the CLI/TUI. You can build another
|
|
301
|
+
frontend by consuming the same event stream.
|
|
302
|
+
|
|
303
|
+
## Development
|
|
304
|
+
|
|
305
|
+
Set up the repository:
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
uv sync --dev
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Run checks:
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
uv run pytest
|
|
315
|
+
uv run ruff check .
|
|
316
|
+
uv run ruff format --check .
|
|
317
|
+
uv run mypy
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Run Tau locally:
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
uv run tau
|
|
324
|
+
uv run tau -p "explain this repo"
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
Run the documentation site (Astro Starlight, in `website/`):
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
cd website
|
|
331
|
+
bun install
|
|
332
|
+
bun run dev
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
Then open `http://localhost:4321/tau/`. Build the static site with `bun run build` (output in `website/dist/`).
|
|
336
|
+
|
|
337
|
+
## Documentation
|
|
338
|
+
|
|
339
|
+
The user-facing docs are published at <https://twotimespi.dev/>.
|
|
340
|
+
Their source lives in `website/src/content/docs/`:
|
|
341
|
+
|
|
342
|
+
- [What is Tau?](website/src/content/docs/what-is-tau.md)
|
|
343
|
+
- [Quickstart](website/src/content/docs/quickstart.md)
|
|
344
|
+
- [Core concepts](website/src/content/docs/concepts.md)
|
|
345
|
+
- Guides — [the TUI](website/src/content/docs/guides/tui.md),
|
|
346
|
+
[sessions](website/src/content/docs/guides/sessions.md),
|
|
347
|
+
[providers & models](website/src/content/docs/guides/providers-and-models.md),
|
|
348
|
+
[skills & prompts](website/src/content/docs/guides/skills-and-prompts.md),
|
|
349
|
+
[context](website/src/content/docs/guides/context.md)
|
|
350
|
+
- Reference — [CLI](website/src/content/docs/reference/cli.md),
|
|
351
|
+
[slash commands](website/src/content/docs/reference/slash-commands.md),
|
|
352
|
+
[keybindings](website/src/content/docs/reference/keybindings.md),
|
|
353
|
+
[configuration](website/src/content/docs/reference/configuration.md),
|
|
354
|
+
[tools](website/src/content/docs/reference/tools.md)
|
|
355
|
+
- How Tau works — [architecture](website/src/content/docs/internals/architecture.md),
|
|
356
|
+
[the agent loop](website/src/content/docs/internals/agent-loop.md)
|
|
357
|
+
|
|
358
|
+
Contributor build journals (phase notes, design docs, ADRs) live in
|
|
359
|
+
[`dev-notes/`](dev-notes/README.md) and are intentionally not published.
|
|
360
|
+
|
|
361
|
+
## Project status
|
|
362
|
+
|
|
363
|
+
Tau is under active development. The implementation roadmap is tracked in
|
|
364
|
+
[GitHub issue #1](https://github.com/alejandro-ao/tau/issues/1), and the notes
|
|
365
|
+
under [`dev-notes/architecture/`](dev-notes/architecture/) record the completed phases.
|
|
366
|
+
|
|
367
|
+
The goal is not to hide complexity. The goal is to make each part of a coding
|
|
368
|
+
agent visible, testable, and understandable.
|