On this page
Ask which of these to use (LangGraph, deepagents, Pi, OpenCode, OpenClaw) and you will get five confident answers that contradict each other, because the question is malformed. They are not five products competing for the same slot.
They sit at different depths of the same stack. LangChain says this plainly in its own documentation, and the sentence is the clearest description of the landscape anyone has written:
LangGraph is the graph runtime. LangChain'screate_agentis a minimal harness on top of it. Deep Agents is a more opinionated harness on top ofcreate_agent— same building blocks, but with filesystem, sub-agents, context management, and skills bundled in.
Runtime, then harness, then more-opinionated harness. Keep going in that direction and you arrive at a finished application you run rather than import. That is the spectrum, and knowing where a tool sits tells you what question it answers.
This post is the map. Three comparisons that follow it go deep on the pairs worth agonising over.
What a harness actually is
Strip the branding and a harness is the environment a model needs to do work that lasts longer than one reply:
- A filesystem it can read, search and write.
- A place to run commands, ideally sandboxed.
- Context management: summarising, offloading to disk, deciding what survives into the next turn.
- Skills, meaning reusable instructions loaded when relevant instead of stuffed into every prompt.
- Subagents to hold separate context for a delegated piece of work.
- A session that persists.
Every coding agent you have used has all six. The only question any project on this spectrum answers is: how many of them do you assemble, and how many arrive assembled?
The three depths
Runtime: you build the harness
LangGraph gives you a state graph, checkpointing, and durable-ish execution, and expects you to bring everything above. That is the right trade when the process shape is the requirement and you want to draw it explicitly. We compare it with a model-driven alternative in Strands Agents vs LangGraph.
Harness: you program the environment
Here the six pieces exist and you compose them in code.
deepagents (LangChain, MIT, Python and JavaScript) bundles the planning tool, filesystem backend, subagents, skills, context management, shell access and human-in-the-loop approval on top of create_agent, and rides the LangGraph runtime underneath for durability and streaming.
Pi (Armin Ronacher, MIT, TypeScript) takes the opposite view of the same job. Its system prompt is famously under a thousand tokens and its skills load lazily, only when relevant. It is a harness that works hard to stay small.
Flue (Astro team, Apache 2.0, TypeScript) composes the environment through hooks in an agent function and ships sandboxes and durable sessions, aimed at agents that run unattended. See Strands Agents vs Flue.
Product: you run it
OpenCode is a terminal coding agent: install it, point it at a repository, work. It carries LSP integration so the model reads real compiler diagnostics, Plan and Build modes, MCP support, and connects to 75+ providers, which matters if you intend to run open models behind it.
OpenClaw is a personal agent with messaging apps as its interface. Its architecture names the parts: Gateway, Brain, Skills, Heartbeat, Memory. Heartbeat is the tell: it is built to act on a schedule rather than wait to be asked.
Reading the spectrum
| Shape | You supply | Best when | |
|---|---|---|---|
| LangGraph | Runtime | The harness | The process shape is the requirement |
| deepagents | Opinionated harness | Tools and prompts | You want the pieces assembled, in Python |
| Pi | Minimal harness | More of the environment | You want to understand every token |
| Flue | Durable harness | Tools and skills | The agent runs unattended |
| OpenCode | Product | A repository | A developer is doing the work |
| OpenClaw | Product | A phone | The agent acts on its own schedule |
Popularity tracks how finished a thing is, which is worth naming so you read star counts correctly. OpenClaw is past 360k stars and OpenCode around 165k, because anyone can install them. Pi is near 98k, deepagents near 29k, because a library's audience is people building something. A star count measures reach, not fitness for your problem.
Choosing without agonising
Are you the user, or is a program the user? A human at a keyboard is served by a product: OpenCode for code, OpenClaw for life admin. Something triggered by a webhook at 3am needs a harness you can program.
Do you want the environment decided? deepagents and Flue hand you a furnished environment. Pi hands you a small one you extend. Both are defensible; the deciding factor is whether you would rather read someone else's conventions or write your own.
Does the process have to run the same way every time? That pulls down to the runtime, where you draw the graph.
One rule cuts across all of it: check that the tool keeps your model choice open. OpenCode's 75+ providers, deepagents' swappable models, and Pi's unified model API all mean an open model like GLM-5.2 works behind any of them. That protects the routing arrangement in running open models at frontier level, which is worth far more over a year than any single feature on this page. It is also why we treat skills and the model as separate layers of a stack: the reusable know-how an agent loads should outlive whichever model is ahead this month.
The rest of the series
- OpenCode vs deepagents: the finished terminal agent against the library you build with.
- OpenCode vs Pi: two terminal harnesses that disagree about how much should arrive already decided.
- OpenClaw vs OpenCode: a messaging-first personal agent against a repository-first coding agent.
Sources
Written by
Cho Yin Yong
Principal AI Solutions Engineer, XY Space
Principal AI Solutions Engineer at XY Space. University of Toronto lecturer for five years, co-author of two patents, winner of two competitive AI awards, and nine years of regulated engineering leadership.
More from Cho Yin YongShare this article
Work with us
We build the systems these posts describe, and we'll tell you in the first call whether yours is worth building.
Start a project