Substructure vs. LangGraph for AI agents

Checked August 7, 2026

LangGraph is the most widely used agent orchestration library there is. The loop becomes a graph of your own Python or TypeScript functions over typed shared state. It is MIT-licensed, it has checkpointing, interrupts, and streaming built in, and the managed platform around it is now LangSmith Deployment, formerly LangGraph Platform. LangChain 1.0's create_agent runs on the LangGraph runtime underneath.

Substructure comes at the same problem as an engine. You describe the agents in one file, the engine runs them in Slack, authorizes their MCP servers, and streams their output to your clients. And the file is only the default: point an agent at your webhook and you can build or override every single step of the loop, over HTTP, in any language. It is the loop control a framework gives you, delivered as an API instead of a library.

The short answer

Pick LangGraph when the loop itself is your product: custom control flow, map-reduce over sub-tasks, forked timelines, all in your own process, with the LangChain ecosystem around you. Pick Substructure when what you want is the agent, running, this week. Slack, MCP auth, history, and streaming are engine features, and you are not committing your team to Python or TypeScript to get them.

Durability is table stakes. Read the fine print anyway.

Both sides persist agent state. That is the baseline now, and it is not why you should pick anything. But the two models are not the same, and LangGraph's docs are candid about theirs. State persists through a checkpointer at superstep boundaries, with three durability modes; in the default async mode "there is a small risk that LangGraph does not write checkpoints if the process crashes during execution." A crash mid-node loses that node's work, and on resume the node re-runs from its top, which is why side effects before an interrupt() must be idempotent. And resuming is your move: open-source LangGraph has no supervisor that notices a dead process and re-invokes the thread. Automatic resumption belongs to the paid Agent Server.

In Substructure the engine persists every step before it runs and resumes on its own after a crash or a redeploy. Your worker holds no state between calls, so there is nothing in your process to lose, and nothing for you to operate to make that true. No Postgres to run, no checkpoints to prune, no idempotency rules on your code. See how it works. Table stakes, yes. But one of these hands you the discipline, and the other one just does it.

Language and process

A LangGraph agent lives in a Python or TypeScript process, importing the library. That buys you the LangChain ecosystem, hundreds of integrations, middleware, LangSmith tracing, and a huge community. It also costs you a language commitment: the agent is code in that stack, full stop.

A Substructure agent is a TOML file, and the file is a default agent, not a ceiling. Point the agent at your worker and the engine sends every decision in the loop there as JSON: each prompt, each model call, each tool run. Accept the step to keep the default, or replace it. Rewrite the prompt, swap the model, run the tool inside your own system, pause for a person. That is loop control most agent SDKs do not expose, and the shape of your side is deliberately boring: a stateless function. State in, decision out, and the engine persists the rest. Rust engine, any-language workers, no SDK. A Rails shop or a Go shop gets the same agents a Python shop does.

Slack, MCP, and clients

This is where the products feel most different in practice. First-party Slack for LangGraph arrived through LangSmith Fleet, the no-code SaaS layer. For code-first agents, the Slack gateway is still yours to build. MCP in open-source LangGraph is the langchain-mcp-adapters library with do-it-yourself auth, and managed MCP auth lives in the paid platform. AG-UI works with LangGraph through an adapter package.

In Substructure, Slack is a config section, the engine handles MCP authorization and runs every tool call, and AG-UI is the native event stream. All of it on every plan, including self-hosted.

Self-hosting and pricing

Open-source LangGraph is MIT and runs wherever Python runs, with you supplying Postgres for checkpoints, pruning them, and building the service around the library. Self-hosting the managed platform requires an Enterprise plan and a license key, and the cloud is seat pricing plus metered compute on langchain.com/pricing. Substructure's self-hosted engine is the full product: one binary, SQLite, no license key. The cloud is one flat price with no per-token charges from us.

Where LangGraph is the right call

If your agent's control flow is genuinely novel, a library in your own process expresses it better than any engine's protocol will. Dynamic graphs, typed state, time travel from any checkpoint: that is LangGraph's home turf. If you live in the LangChain ecosystem, the integrations and LangSmith observability are a real moat. And the community is enormous, so whatever you hit, someone hit it first.

But if what you want is the agent running, in Slack, for your whole team, with your code only where it earns its place, start with Substructure. The quick start takes about five minutes.