Tree-based multi-agent coding harness — one live agent tree, shared web console, tools, skills, memory, and permissions.
treecode · python -m treecode
Quick start · Acknowledgements · Features · Showcase · MIT
TreeCode draws on OpenHarness (HKUDS) for core harness ideas; thanks to that project and its contributors. TreeCode focuses on a tree-first multi-agent workflow (live topology, shared web console, swarm tooling).
Prerequisites: Python 3.10+, uv, an LLM API key. Optional: Node 18+ for the React TUI frontend.
# install (from your clone)
uv sync --extra dev
# one-shot prompt
ANTHROPIC_API_KEY=your_key uv run treecode -p "Summarize this repository"
# interactive CLI (default: React TUI when frontend is available)
uv run treecodeConfig & data (defaults):
| What | Where |
|---|---|
| User config | ~/.treecode/ |
| Override config dir | TREECODE_CONFIG_DIR |
| Override data dir | TREECODE_DATA_DIR |
| Project markers | <repo>/.treecode/ |
Module entry: python -m treecode (same as the treecode console script from uv sync).
- Agent loop — streaming tool use, retries, hooks, auto-compaction.
- Tree-shaped multi-agent — persistent and oneshot children, topology APIs, shared web console + WebSocket backend.
- 42 built-in tools (+ optional MCP adapters) — file/shell/search/web/tasks/swarm helpers.
- Skills & plugins — compatible with common
anthropics/skillsand claude-code-style plugins. - Permissions & hooks — modes, path rules, Pre/PostToolUse.
- JSON-lines REPL protocol on stdio, prefixed as
TCJSON:.
For architecture detail, see docs/ (Chinese) and CLAUDE.md for contributor navigation.
Supports Anthropic-compatible (default) and OpenAI-compatible (--api-format openai). Model and base URL can be set via CLI, ~/.treecode/settings.json, or environment variables such as TREECODE_MODEL, TREECODE_BASE_URL, TREECODE_API_FORMAT.
uv run ruff check src tests scripts
uv run pytest -qFrontend typecheck (when touching frontend/terminal):
cd frontend/terminal && npx tsc --noEmitMIT — see LICENSE.
TreeCode — tree-first multi-agent harness for real coding work.