TERMINAL-NATIVE AGENT HARNESS 01 / 08

Own the loop.

A minimal, personal agent harness. Small enough to read, yours to own.

uv tool install tribeai
PYTHON 3.11+/OPEN SOURCE/MIT LICENSE
THE INTERFACESCRIPTED / 001
❯ tribe chat█
◌ awaiting your first request
the loop is yours to see.
❯ read · grep · write · bash
claude-opus-4-8 · anthropic
~/tribe ⌁ master · cb00bddbctx 0% F1
A terminal built around the loop.v0.1.2 ↗
SCROLL TO EXPLORE↓
01 — THE PROBLEMA SMALLER LOOP

Agent frameworks got huge. You can’t even see the loop anymore.

LESS BETWEEN YOU AND THE WORK.↓
02 — THE LOOPNO BLACK BOXES

See the whole thing.

Every step is a small, inspectable piece. Nothing hides behind an abstraction.

01USER INPUTRequest enters the loop.
02SESSION STOREAppend-only history, on disk.
03CONTEXT BUILDERSelects what fits the budget.
04MODELReturns a response or tool call.
05AFINAL RESPONSEThe run is complete.
05BTOOL CALLThe model requests a capability.
06APPROVAL GATEPolicy before capability.
07TOOL RUNNERValidates and confines each call.
08TOOL RESULTResult returns as data.
03 — THE TOOLKITSEVEN SMALL PIECES

Power without the sprawl.

Small parts. Clear edges. The terminal stays where the work is.

01 — 07

Four tools.
That’s the whole kit.

Read · grep · write · bash. A small, inspectable boundary between the model and your files.

Responses appear whole after activity ends. No token-by-token stream.

❯ inspect the agent loop
● read src/tribe/agent/loop.py
✓ ok file read
● grep compaction
✓ ok matches found
↳ response appears whole after activity ends
◆ done in 4.2s
❯ read · grep · write · bash
claude-opus-4-8 · anthropic
~/tribe ⌁ master · cb00bddbctx 18% F1
02 — 07

Nothing writes
without you.

Read and grep are automatic. Write and bash ask first. The policy stays visible.

Approval decisions are recorded alongside the tool call.

● write src/tribe/agent/loop.py
╭ approval required ─────────╮
│ write loop.py │
╰ [y]es [a]lways [n]o ────╯
● bash uv run pytest
✓ passed
⊘ tool call denied by approval policy
❯ read & grep automatic · write & bash ask first
claude-opus-4-8 · anthropic
~/tribe ⌁ master · cb00bddbctx 18% F1
03 — 07

Your model.
Your key.

Choose Anthropic, OpenAI, OpenRouter, Groq, DeepSeek, Together, Fireworks, or xAI.

Switch with /model, or use the provider:model shorthand.

❯ /login
anthropic · openai · openrouter
groq · deepseek · together
fireworks · xai
❯ /model gpt-4o
✓ model set · openai
❯ provider:model
gpt-4o · openai
~/tribe ⌁ master · cb00bddbctx 18% F1
04 — 07

File paths stay
inside workspace.

Read, grep, and write paths resolve inside the configured workspace. Traversal and symlink escapes are rejected.

The shell runs with the workspace as its working directory.

● read ../../etc/passwd
✗ outside workspace
↳ symlink escapes blocked too
❯ tools stay inside your workspace
claude-opus-4-8 · anthropic
~/tribe ⌁ master · cb00bddbctx 18% F1
05 — 07

Every step
on disk.

Sessions are append-only JSONL: messages, tool calls, results, and summaries.

Pick up a run again with tribe resume <id>.

{"role":"user","content":"fix the test"}
{"role":"tool_call","name":"grep","id":"a91…"}
{"role":"tool_result","status":"ok"}
❯ /sessions
cb00bddb current
✓ transcript restored
❯ tribe resume <id>
claude-opus-4-8 · anthropic
~/tribe ⌁ master · cb00bddbctx 18% F1
06 — 07

Long runs.
Bounded context.

At 60% of the model’s context limit, older history is compacted.

Recent messages remain verbatim. The summary carries what matters forward.

ctx 57% → 60%
╭ summary · earlier conversation ─╮
│ Goal, decisions, tools, results… │
╰ recent messages kept verbatim ──╯
✓ context rebuilt · ctx 18%
❯ compacts at 60% of model context
claude-opus-4-8 · anthropic
~/tribe ⌁ master · cb00bddbctx 18% F1
07 — 07

Headless,
with limits.

Run tribe run "inspect the project and run its tests" from the command line.

Maximum rounds, per-tool timeouts, and consecutive failure caps.

$ tribe run "inspect the project and run its tests"
● running · concise console view
✓ max rounds
✓ tool timeouts
✓ failure caps
◆ done in 4.2s
❯ tribe run "inspect the project and run its tests"
claude-opus-4-8 · anthropic
~/tribe ⌁ master · cb00bddbctx 18% F1
04 — SMALL ENOUGH TO READBUILT IN PYTHON
≈2,911NON-BLANK LINES
ACROSS src/

About three thousand lines. Every part has a name. Every part has a place.

READ THE SOURCE ↗
THE DESIGN PRINCIPLES01—05
01

Keep the runtime small enough to understand end to end.

↗
02

Make the agent loop explicit rather than hiding it behind abstractions.

↗
03

Treat tools as a narrow, inspectable capability boundary.

↗
04

Preserve useful session state while keeping model context bounded.

↗
05

Prefer local-first workflows and plain text artifacts.

↗
05 — YOUR TURNINSTALL / FIRST SESSION
V0.1.2 / MIT

Small enough to read.
Yours to own.

One install. Then the loop is yours.

uv tool install tribeai
02
THEN, OPEN THE TERMINALtribe chat

NOTE You’ll need a provider API key. Or run /login inside Tribe.