AGI CLI · product thesis · 2026

Loop engineering + graph engineering
are the stack. AGI CLI is both.

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.

loop agents run · sessions · skills graph teams --after · devices fleet hosts · routines · watchdog as of 2026-08-10
Loop engineering
One agentic node
Observe → reason → act → verify. Skills, tools, secrets, budgets, traces, resume. The quality of a single run.
Graph engineering
Topology of many nodes
Who exists, who waits on whom, where they run, how work joins. The quality of coordination at scale.
Industry framing (2026) Graph engineering designs topology; loop engineering designs execution inside each agentic node. They compose, not replace: a graph of unengineered loops is an org chart of unreliable employees; excellent loops with accidental topology fail as coordination debt. — TrueFoundry “Graph Engineering for Multi-Agent Systems” (Jul 2026); LangChain “The Art of Loop Engineering” (Jun 2026)

01The split — and why most stacks break it

GRAPH — agents teams · --after · devices · worktrees backend LOOP run · skills · secrets sessions · resume frontend LOOP worktree isolation device pool qa --after backend,frontend LOOP + JOIN waits for wave · then runs message / resume mid-flight Each box is a governed loop. The arrows and join are the engineered graph.
Compose, don’t collapse. frameworks that only ship graphs with weak loops (or only loops with no topology) leave half the problem unsolved.

02Loop engineering → what AGI CLI gives you

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 + versionagents add / use / view · profiles · model tiers
System prompt / memoryrules · DotAgents layered AGENTS.md
Skills & knowledge packsskills · plugins · registry install
Tools / connectorsmcp · browser · computer · pty
Permissions / guardrailspermissions · --mode plan|edit|auto|skip
Secrets / identitysecrets (keychain) · run --secrets
Hooks on lifecyclehooks · subagents
Durable transcript / resumesessions · run --resume · export/import
Observe the looplogs · perf · insights · usage
Unattended / evented loopsroutines · 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
Loopcraft, operationalized LangChain’s “Art of Loop Engineering” stacks agent → verification → event-driven loops. AGI CLI is that stack as a CLI you already use: run, sessions, resume, watchdog nudge, routines on a schedule — on Claude/Codex/Grok/… subscriptions you already pay for.

03Graph engineering → what AGI CLI gives you

Topology is not a YAML research paper. It is named nodes, explicit edges, parallel ready sets, joins, and placement across machines.

Graph primitiveAGI CLI surface
Named nodesteams add … --name backend
Dependency edges--after backend,frontend (DAG; cycles rejected)
Parallel waveIndependent 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 mutationteams add while supervisor runs (disk rescan)
Steer / re-enterteams message · teams resume
Cloud nodes--cloud rush|codex|factory
Observe the graphteams 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

04They compose — the factory shape

AGI CLI’s README already says it: a framework for running a distributed agent factory. That is loop × graph × fleet.

LOOP run · skills · mcp secrets · permissions sessions · resume quality of one agent GRAPH teams · --after DAG waves · worktrees message · pr-watch topology of many agents FLEET devices · hosts routines · watchdog feed · roster · share ops for many machines
TrueFoundry’s “fleet of governed loops” is this middle→right: many engineered loops, plus topology, plus operability. AGI CLI puts all three in one binary.

Without loop eng

  • Pretty DAG, flaky nodes
  • No resume, no secrets hygiene
  • Can’t replay or search what happened

Without graph eng

  • Hero single agent does everything
  • Serial wall-clock, merge conflicts
  • No joins, no device placement

05Same ideas in popular frameworks

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.

How to read this section Each example shows a pattern the literature describes. AGI CLI appears alongside as the coding-CLI expression of that pattern. Choose tools by context (application graph vs coding factory vs data DAG), not by scoreboard.

A · Agent loop (Loop 1)

Model + tools + repeat until done. LangChain’s simplest loop; every coding agent does this under the hood.

LangGraph / LangChain (sketch)

# 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

AGI CLI (same loop, harness-native)

# 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.

B · Graph of steps (fixed structure)

Nodes do work; edges decide what runs next. LangGraph’s classic “encode structure the model shouldn’t invent every time.”

classify github agent docs agent synthesize LangGraph docs example: fan-out search · join synthesize — structure is fixed; workers can be agentic
Industry pattern. LangChain’s knowledge-base agent: fixed stages, specialized workers, join. Coding factories use the same shape for API ∥ UI → QA.

LangGraph (conceptual)

# 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

agents teams (same topology)

# 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

C · Loops vs DAGs (important nuance)

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.”

Inner loop (cyclic)

  • Tool call → observe → reason → again
  • Retry failed command
  • Revise until tests pass

Lives inside Claude/Codex/… whenever you agents run or a teammate starts.

Outer schedule (often DAG)

  • API before QA, UI before QA
  • No cycle: qa ↛ api
  • Parallel ready set each wave

Lives in teams --after — and in LangGraph edges when you encode fixed stages.

D · Event-driven loop (Loop 3)

Something fires; the agent runs without you typing. Same pattern, different products.

PatternExample elsewhereAGI CLI expression
Cron / heartbeatLangSmith schedules · OpenClaw heartbeats · Codex Automationsagents routines
Webhook triggerFleet channels · GitHub Actionsagents webhook + routines
Idle nudgeHuman “go again”agents watchdog / feed

E · Durable multi-step workflows

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
Takeaway Frameworks teach the vocabulary: nodes, edges, joins, loops, triggers, durable state. AGI CLI applies that vocabulary to the coding agents you already run — as full agentic nodes (LangChain’s “what’s new” for 2026), scheduled by a team DAG, observed via sessions.

06Why this is popular now — and why AGI CLI fits

AGI CLI’s advantage is not another framework in Python — it is your existing AGI CLIs, orchestrated:

Positioning line Loop engineering makes each agent trustworthy. Graph engineering makes many agents coherent. AGI CLI is the open CLI that ships both — and the fleet layer to run them on your machines.

07One recipe that uses both

# 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):

loop + graph engineering · AGI CLI product thesis · 2026-08-10 · sources: TrueFoundry, LangChain (loop + 3yr graph), Osmani loop engineering; framework illustrations: LangGraph, Temporal/Airflow/Conductor as pattern peers · ◐ theme