AGI CLI · product thesis · 2026
The industry has finally named the two layers that matter: how one agent runs (loop engineering), and how many agents are wired (graph engineering). Most tools pick one. AGI CLI was built as a distributed agent factory — governed loops on real harnesses, DAGs across your machines, and the fleet ops to keep them honest.
A production loop is not “chat with tools.” It is identity, skills, permissions, secrets, durable state, and recovery — around the model call.
| Loop primitive (2026 language) | AGI CLI surface |
|---|---|
| Pick a harness + version | agents add / use / view · profiles · model tiers |
| System prompt / memory | rules · DotAgents layered AGENTS.md |
| Skills & knowledge packs | skills · plugins · registry install |
| Tools / connectors | mcp · browser · computer · pty |
| Permissions / guardrails | permissions · --mode plan|edit|auto|skip |
| Secrets / identity | secrets (keychain) · run --secrets |
| Hooks on lifecycle | hooks · subagents |
| Durable transcript / resume | sessions · run --resume · export/import |
| Observe the loop | logs · perf · insights · usage |
| Unattended / evented loops | routines · webhooks · monitors · watchdog |
# One well-engineered loop
agents run claude@2.1.207 "Land RUSH-1234" \
--mode edit --secrets eng --model best
agents sessions --active
agents sessions <id> --markdown --last 5
Topology is not a YAML research paper. It is named nodes, explicit edges, parallel ready sets, joins, and placement across machines.
| Graph primitive | AGI CLI surface |
|---|---|
| Named nodes | teams add … --name backend |
| Dependency edges | --after backend,frontend (DAG; cycles rejected) |
| Parallel wave | Independent nodes launch together on start --watch |
| Join / multi-parent | --after A,B,C waits for all |
| Isolation per node | --enable-worktrees · boundary contracts |
| Placement | --device pin · --devices pool · least-loaded |
| Mid-flight mutation | teams add while supervisor runs (disk rescan) |
| Steer / re-enter | teams message · teams resume |
| Cloud nodes | --cloud rush|codex|factory |
| Observe the graph | teams status · sessions --teams · roster |
# Graph: parallel implementors + join QA
agents teams create ship --enable-worktrees --devices yosemite-s0,yosemite-s1
agents teams add ship claude "API" --name backend --worktree api --device yosemite-s0
agents teams add ship claude "UI" --name frontend --worktree ui --device yosemite-s1
agents teams add ship claude "E2E" --name qa --after backend,frontend --worktree qa
agents teams start ship --watch
AGI CLI’s README already says it: a framework for running a distributed agent factory. That is loop × graph × fleet.
Loop and graph engineering are not proprietary to any one product. The same shapes show up in LangGraph, Conductor, Airflow agent tasks, and coding-AGI CLIs. Below: illustrative snippets of the shared vocabulary — not a ranking.
Model + tools + repeat until done. LangChain’s simplest loop; every coding agent does this under the hood.
# create_agent: model calls tools until done from langchain.agents import create_agent agent = create_agent( model="…", tools=[search, write_file, open_pr], ) agent.invoke({"messages": [user_request]}) # Verification loop (Loop 2): wrap with a grader # that retries when rubric fails
# One coding-agent loop on a real harness agents run claude "Draft the pricing API" \ --mode edit --model best # Durable transcript of the loop agents sessions --active agents sessions <id> --markdown --last 5
LangChain “Art of Loop Engineering”: agent loop → verification → event-driven → hill-climbing. Coding CLIs embody Loop 1 + partial 2/3 via second agents, CI, and schedules.
Nodes do work; edges decide what runs next. LangGraph’s classic “encode structure the model shouldn’t invent every time.”
# Nodes + edges (Python sketch) graph.add_node("classify", classify) graph.add_node("github", github_agent) # full agent graph.add_node("docs", docs_agent) graph.add_node("synth", synthesize) graph.add_edge("classify", "github") graph.add_edge("classify", "docs") # parallel graph.add_edge("github", "synth") graph.add_edge("docs", "synth") # join # Conditional edges / Send API for # runtime fan-out width when needed
# Named nodes; --after = inbound edges agents teams add t claude "API" \ --name api --worktree api agents teams add t claude "UI" \ --name ui --worktree ui # join: waits for both agents teams add t claude "E2E" \ --name qa --after api,ui --worktree qa agents teams start t --watch # wave 1: api ∥ ui · wave 2: qa
LangChain’s three-year graph note: production agent systems usually need cycles (retry, revise, human pause). A pure DAG is often the outer schedule; each agentic node still runs an inner cyclic loop. “Loops are simple graphs.”
Lives inside Claude/Codex/… whenever you agents run or a teammate starts.
Lives in teams --after — and in LangGraph edges when you encode fixed stages.
Something fires; the agent runs without you typing. Same pattern, different products.
| Pattern | Example elsewhere | AGI CLI expression |
|---|---|---|
| Cron / heartbeat | LangSmith schedules · OpenClaw heartbeats · Codex Automations | agents routines |
| Webhook trigger | Fleet channels · GitHub Actions | agents webhook + routines |
| Idle nudge | Human “go again” | agents watchdog / feed |
When the graph must survive restarts and long waits, the same topology shows up in workflow engines.
# Temporal-style idea (conceptual): activities = agent steps, workflow = topology # Airflow AI SDK: @task.agent nodes in a DAG — parallel after upstream succeeds # Conductor: YAML multi-agent graph, deterministic routing # Coding-factory expression of durable team state: # team meta.json on disk · start --watch rescans · supervisor restarts mid-flight agents teams status ship agents teams start ship --watch # pick up pending --after when ready
AGI CLI’s advantage is not another framework in Python — it is your existing AGI CLIs, orchestrated:
# LOOP: skill + secrets + mode on every node # GRAPH: DAG + worktrees + devices agents teams create landing --enable-worktrees \ --devices yosemite-s0,yosemite-s1 -d "Ship pricing page" agents teams add landing claude "Implement pricing API" \ --name api --worktree api --mode edit --model best agents teams add landing claude "Build pricing UI" \ --name ui --worktree ui --mode edit agents teams add landing claude "Playwright + ship checklist" \ --name qa --after api,ui --worktree qa --mode edit agents teams start landing --watch # Observe loops inside the graph agents sessions --teams agents teams status landing agents teams message landing qa "Skip flaky snapshot; land the rest"
Deeper dives (siblings):