Shared Context
for Agent Teams

Works with Claude Code, Codex, OpenClaw, and any agent. Git-native. Zero infra.

Paste into your agent Install the first-tree skill and run onboarding using the latest first-tree CLI
View on GitHub →
Live Demo

Watch an agent build the tree

Import any repo. The agent traverses the codebase, infers ownership boundaries, and emits a structured context tree — in under a minute.

first-tree — -zsh — 100×25
context tree · first-tree
hit
Explore
agent-team-foundation/first-tree 1.2k garrytan/gstack 61k browser-use/browser-use 86k pydantic/pydantic-ai 16k
0.0 — The Problem

Every agent starts from zero

Multi-agent teams have a shared-memory problem. Each coding session, each agent cold-starts with no knowledge of team decisions, domain ownership, or why the architecture is the way it is.

You become the context router. Re-explaining the same decisions to Claude Code, Codex, OpenClaw — manually, every time. That doesn't scale.

First Tree is a Git-native context substrate. A repo of NODE.md files, one per domain. Any agent reads the tree before acting. Context that compounds. Ownership that's enforced.

— context tree anatomy —
my-org/ ├── NODE.md ← root · owner: alice ├── members/ │ ├── NODE.md ← owner: alice │ ├── alice.md │ └── agent-a.md ├── backend/ │ ├── NODE.md ← owner: bob │ ├── auth.md │ └── storage.md └── decisions/ ├── NODE.md ← owner: alice ├── why-monolith.md └── db-choice.md
owned node context file auto-approved
conversun conversun on HKUDS/nanobot#2635
I have abandoned this project due to too many bugs and inactive PR merging (over 500 PRs).
The new option is astrbot
🎉 1
AstrBotDevs / AstrBot
Issues 796 Pull requests 184
Open 796 Closed 4,507
[Plugin] astrbot_plugin_CNInfoCrawler feature:plugin
#7394 · Interstellar1217 opened 15 hours ago
[Plugin] astrbot_plugin_mailer feature:plugin plugin-publish
#7393 · FFFold opened 15 hours ago
[Feature] Reply parsing for Weixin_oc enhancement
#7379 · Sagiri777 opened yesterday
0.1 — The Other Problem

Open source is drowning in agent PRs

Every repo with traction is getting flooded. Maintainers can't keep up. Projects are being abandoned — and the alternatives are even worse.

Without ownership, there's no triage. First Tree gives repos a way to route PRs to the right reviewer, validate changes against domain context, and let agents handle the volume — with accountability.

Architecture

Three primitives, one substrate

First Tree ships three primitives that compose into a complete multi-agent coordination layer.

1.0

Context Tree

A Git repo of .md nodes. Org memory that any agent reads before acting. Structure is the interface — no APIs, no schemas, no infra.

1.1
Git-nativeEvery node is a .md file. Every change is a commit. Versioning, blame, and PR review come free.
1.2
NODE.md ownershipEvery folder declares an owner. Writing requires approval. Reading is open. Accountability is structural.
1.3
Navigable by agentsAgents walk the tree from root. Structure encodes scope — no prompt engineering required.
1.4
Human-in-the-loop tunableScale from full human review to fully autonomous — per node, per domain, via NODE.md rules.
2.0

Git Automation

GitHub is the hub. PRs, issues, CODEOWNERS — all driven by tree ownership. Agents triage at scale, merge what's ready, reject what doesn't belong.

2.1
Ownership-aware triagePRs and issues route to the right owner automatically. Tree structure replaces manual assignment.
2.2
CODEOWNERS from treeGenerated from NODE.md ownership. Always in sync, never stale. CI enforces review gates.
2.3
Agent PR reviewAgents review PRs against tree context. Approve, request changes, or reject — with domain awareness.
2.4
Scale without drowningOpen source repos flooded with agent PRs. Tree-driven triage handles volume that humans can't.
3.0
agent-a agent-b

Agent Message System

Active communication between agents. Inbox-based, owned, auditable. The tree is the bus — no separate broker, no event queue, no extra infra.

3.1
Inbox-basedMessages are .md files in the tree. Owned, versioned, and auditable. No broker.
3.2
Identity and IAMEvery agent has a verifiable identity. Every action is attributable. No anonymous agents.
3.3
Capability scopingIdentities carry explicit capability sets — what an agent can read, write, or trigger. Enforced at node level.
3.4
Full audit trailOwners see who sent what, when, and why. Complete history in Git. git blame is your log.
Technical

Structure for agents and humans
to work together

First Tree gives multi-agent workflows the substrate they're missing: typed ownership, traversable context, and a coordination layer that survives model upgrades.

3.1
Context Tree
Org memory. Git repo of .md nodes. Owned, versioned, traversable by any agent with a URL.
3.2
Message System
Agent-to-agent routing. Inbox-based .md files. Auditable by design, no extra broker.
3.3
Identity and IAM
Verifiable identity for every human and agent. Scoped capability sets per node. Enforced via CODEOWNERS.
3.4
Autonomous Agents
Always-on agents. Own domains. Act within defined scopes. Live in agent-hub.
3.5
Vendor Agnostic
Any agent that reads a URL reads the tree. Claude Code, Codex, custom agents — plain markdown, no lock-in.
3.6
Zero Infrastructure
It's a Git repo. No databases, no APIs, no event buses. The structure is the protocol.
— agent-to-agent message flow —

agent-a  ──── commit ───▶  agent-b/inbox/task-001.md
                                 owner: agent-b
                                 from:  agent-a
                                 status: pending
                                 body: "Refactor auth.md — decision updated"

agent-b  reads inbox ──▶  acts on task ──▶  agent-a/inbox/task-001.reply.md

                                 Wiki = flat.  Graph = complex.
                                 Vector store = no ownership.
                                 CLAUDE.md = doesn't scale.
                                 Tree = works.
Eval Results

Agents solve faster with a tree

18 real bug-fix tasks across 6 open-source repos. Baseline vs. First Tree context.

90%
PASS RATE
18 real bug-fix tasks
-42%
TIME SAVED
avg across all tasks
-14%
TOKEN COST SAVED
fewer iterations to solve
Task Baseline With Tree Time Δ Cost Δ
nanobot-streaming-metadata 158s 92s -42% -16%
fastapi-optional-file-list 183s 104s -43% -6%
autogen-serialization-data-loss 295s 199s -32% -7%
vercel-ai-error-code 739s 369s -50% -34%
langchain-merge-parallel-tools 237s 187s -21% -9%
llamaindex-async-postprocess FAIL 216s ✓ fixed $0.76

18 real bug-fix tasks · 6 open-source repos · claude-sonnet-4-6 · zero config, one prompt to set up

Download full eval report →
Get Started

Grow your first 🌲

Paste one prompt into your agent. It installs the skill and onboards automatically.

Install the first-tree skill and run onboarding using the latest first-tree CLI
FAQ

Common questions

How do I onboard my team?
Paste the install prompt into Claude Code to scaffold the tree structure. Share the GitHub URL with teammates — each person gives the URL to their agent before starting work. No forking required for readers. Writers need to be added as collaborators to get CODEOWNERS enforcement.
How is this different from a wiki or README?
Wikis are flat and ownership-free. READMEs are single-file and don't scale across domains. First Tree is hierarchical (agents can navigate from root to the exact node they need), ownership-typed (every folder has a declared owner enforced via CODEOWNERS), and agent-native (designed to be read by LLMs via URL traversal, not humans via browser).
Can different AI agents share the same tree?
Yes — that's the point. Claude Code, Codex, your own agents, and human developers all read the same tree. It's plain markdown in a Git repo. Any agent that can fetch a URL can consume it. No vendor lock-in.
How does authorization work?
Every folder has a NODE.md declaring owners. The CLI generates a CODEOWNERS file — GitHub PR enforcement applies automatically. You can set auto-approval rules in NODE.md to let trusted agents merge without human review, scoped to specific nodes.
How do I migrate an existing project?
You don't migrate code — you document context. Paste the install prompt into Claude Code to scaffold the structure, then start with 3–5 nodes for decisions that only live in someone's head: why the architecture is what it is, who owns what, what's off-limits. Grow from there. The tree is a living document.
What's the relationship between First Tree and agent-hub?
First Tree is the context and messaging substrate — the open source core. agent-hub is the broader platform that adds identity/IAM, autonomous agent runtime, database layer, and workflow primitives. You can use First Tree standalone or as part of the full platform.
What are the three primitives?
First Tree ships three composable primitives: Context Tree — a Git repo of NODE.md files that agents read before acting. Git Automation — ownership-aware PR triage, CODEOWNERS generation, and agent review driven by tree structure. Agent Message System — inbox-based agent-to-agent communication with identity, capability scoping, and full audit trail.