In this post I'll show you what the LangGraph Agent Server is, how to run it on your laptop and on your own servers, and the part most people get stuck on: when you need a license key for it.
The short answer (checked 4 December 2026)
- What it is: LangChain's production runtime for agents. It wraps your compiled graph in an HTTP API with threads, runs, a task queue, streaming, crons and long-term memory. It used to be called LangGraph Server.
- What it needs: Postgres, Redis and at least one queue worker.
- Locally:
langgraph dev, free, no Docker. - On your own servers in production: needs a license key, which comes with LangSmith's Enterprise plan.
- Open source? No. The server package
langgraph-apiis under the Elastic License 2.0. The LangGraph library itself is MIT.
Let's set up an example first
To keep things concrete, let's assume we have built a small support agent with LangGraph. It answers customer questions and can look up an order. The project looks something like this:
support-bot/
├── agent/
│ └── graph.py # builds and compiles the graph as `graph`
├── langgraph.json
├── pyproject.toml
└── .env # OPENAI_API_KEY, LANGSMITH_API_KEY
langgraph.json
{
"dependencies": ["."],
"graphs": { "support": "./agent/graph.py:graph" },
"env": ".env"
}
The graphs key is what the server reads to find your agent. Every key in that file is explained in langgraph.json explained. We will use this same support graph in every step below.
Why would you need a server at all?
Right now we can just call the graph from a script:
result = graph.invoke({"messages": [{"role": "user", "content": "Where is my order?"}]})That works fine while you're the only user. Now say you put it behind a quick API endpoint and give it to real customers. A few things start to break:
- Two customers write at once. Both requests hit the same process, and nothing keeps their conversations apart unless you wire up thread IDs and a checkpointer yourself.
- You redeploy. Every conversation that lived in memory is gone.
- A run takes three minutes because the agent calls a slow tool. The HTTP request times out long before it finishes.
- The user sends a second message while the first run is still going. Now you have two runs racing on one conversation.
You can fix every one of these yourself: a job queue, a database for state, a streaming layer, a resume endpoint. That's a lot of plumbing that has nothing to do with your agent. This is exactly the plumbing the LangGraph Agent Server ships with.
What is the LangGraph Agent Server?
It is the part that turns a graph into a service. LangChain calls it "a workflow orchestration runtime for agent workloads". Two names get mixed up a lot, so let's separate them:
- LangGraph is the open-source (MIT) library you write the graph with. It runs anywhere Python or JavaScript runs.
- The Agent Server is the runtime around that graph: the HTTP API, the database, the task queue and the workers. It is what LangSmith Deployment runs for you, and what
langgraph devstarts on your laptop.
Here's how it answers each problem from our support bot:
| What broke | What the server gives you |
|---|---|
| Two customers at once | Threads: each conversation keeps its own state in Postgres |
| Redeploy wipes conversations | Checkpoints in Postgres, so threads survive restarts |
| Three-minute runs time out | Runs and a task queue: the request returns at once and a worker runs the graph |
| Watching the answer appear | Streaming of tokens and node updates over server-sent events, and you can rejoin a stream |
| A second message mid-run | Double-texting rules: reject, queue, interrupt or roll back |
| "Ask a human before refunding" | Human-in-the-loop: a run pauses on interrupt() and resumes when someone answers |
On top of that you get assistants (several configs of one graph), a long-term store, crons, webhooks, and MCP and A2A endpoints.
But the real point isn't any single feature. It's that the official SDKs (langgraph_sdk for Python, @langchain/langgraph-sdk for JavaScript), LangGraph Studio and Agent Chat UI all talk to this one API. Write your client once and it works against all of them.
NOTE: the server isn't limited to LangGraph any more. LangChain documents wrappers for Google ADK, Strands, the Claude Agent SDK, CrewAI and AutoGen.
How does it work?
So when a customer messages our support bot, the API server doesn't run the graph itself. It records the run and hands it off. A worker picks it up, and the tokens come back to the customer through Redis.
Two things worth knowing from LangChain's architecture docs:
- Postgres is the source of truth. It holds assistants, threads, runs, crons, checkpoints and the store. Redis is throwaway. Lose it and you lose in-flight streams, not data.
- At least one queue worker must be running, or runs queue up and never start. Each worker handles up to
N_JOBS_PER_WORKERruns at once (default 10). For bigger loads you can split API servers and workers (queue.enabled: true) and scale them separately.
That's why "just put it in a container" undersells it. Running the Agent Server means running Postgres, Redis and workers, and keeping them backed up and upgraded.
The LangGraph Agent Server API
Every deployment serves its own interactive reference at /docs, so you never have to guess. The endpoints come in a few groups: assistants, threads, thread runs (start, stream, wait, cancel, join), stateless runs, crons, store, MCP and A2A, and system (/ok for health checks).
NOTE: requests to a LangSmith deployment carry an X-Api-Key header, but a self-hosted server has no API authentication unless you turn it on, for example with LANGGRAPH_AUTH_TYPE=langsmith or your own auth handler. Don't expose a standalone server to the internet without it.
How to run the LangGraph Agent Server locally
Let's start with the simplest way. From the support-bot folder:
langgraph dev # API on http://127.0.0.1:2024, hot reload
curl http://127.0.0.1:2024/ok # {"ok":true}
That's it. You now have the real Agent Server API running your support graph. Open Studio at https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024 to chat with it and step through each node. A free LangSmith account is enough for that.
Now let's talk to it from code the way a real client would:
client.py
from langgraph_sdk import get_client
client = get_client(url="http://127.0.0.1:2024")
thread = await client.threads.create()
async for chunk in client.runs.stream(
thread["thread_id"], "support",
input={"messages": [{"role": "user", "content": "Where is my order?"}]},
stream_mode="updates",
):
print(chunk.event, chunk.data)
Notice "support". It is the graph name from our langgraph.json. Keep this file. When we move to production, the only line that changes is the url (plus an api_key on LangSmith).
So can we just ship langgraph dev? Not really. It keeps state in memory and a local folder, and LangChain is clear that it's for development. For production you run the full server.
langgraph dev vs up vs build vs deploy
The CLI has four commands that sound alike. Here's what each one does with our support bot:
| Command | What happens | Port | Needs | Use it when |
|---|---|---|---|---|
langgraph dev |
In-memory server with hot reload | 2024 | Python, the inmem extra |
You're building and debugging |
langgraph up |
The full server in Docker, with Postgres and Redis | 8123 | Docker, a LangSmith API key | You want to test the real server locally. LangChain says production use needs a license |
langgraph build |
Runs nothing. Builds a Docker image of the server plus your graph | — | Docker | You're shipping the image to your own servers |
langgraph deploy |
Builds and deploys to LangSmith in one step | — | A LangSmith plan with deployments | You want managed hosting |
Can you self-host the LangGraph Agent Server?
Yes. LangChain calls this the standalone server. You build the image and run it next to your own Postgres and Redis:
langgraph build -t support-botdocker run --env-file .env -p 8123:8000 \
-e DATABASE_URI=postgres://user:pass@db:5432/support \
-e REDIS_URI=redis://redis:6379/0 \
-e LANGSMITH_API_KEY=lsv2_... \
-e LANGGRAPH_CLOUD_LICENSE_KEY=... \
support-bot
curl http://localhost:8123/ok # {"ok":true}
Four environment variables, and each one matters:
DATABASE_URIandREDIS_URI: one database per deployment. Several deployments can share a Postgres server, but not a database.LANGSMITH_API_KEYandLANGGRAPH_CLOUD_LICENSE_KEY: the license key is checked "ONCE at server start up".
The server also needs outbound access to https://beacon.langchain.com for license checks and usage reporting, unless you run air-gapped.
What about Docker vs Kubernetes? LangChain recommends its Helm chart for production-grade deployments, and describes Docker as best for development or small workloads. In my view that's the right call once you need more than one worker and zero-downtime upgrades. For one small internal agent, a single VM with Docker is fine.
NOTE: don't run it on serverless platforms
LangChain's docs say it directly: "Do not run standalone servers in serverless environments. Scale-to-zero may cause task loss and scaling up will not work reliably." Remember the queue workers from the diagram above. Cloud Run with scale-to-zero, Lambda-style platforms and similar setups shut them down, and the runs waiting on them are lost. Use a VM, a container service that stays up, or Kubernetes.
Does the LangGraph Agent Server need a license?
Good question, and it's the one most people end up on Reddit asking. The answer depends on where the server runs and what for:
| Where our support bot runs | License key? | Plan |
|---|---|---|
langgraph dev on your machine |
No | Free LangSmith account |
langgraph up for local testing |
No | Free LangSmith account |
| LangSmith cloud (managed) | No, LangChain runs it | Plus ($39 per seat per month) or Enterprise |
| Standalone server on your own infrastructure, in production | Yes, LANGGRAPH_CLOUD_LICENSE_KEY |
Enterprise |
| Hybrid or fully self-hosted LangSmith | Yes | Enterprise |
On 4 December 2026, LangChain's pricing page lists self-hosted and hybrid deployment as Enterprise options only. Plus includes one free Small Serverless deployment in LangChain's cloud. The full numbers are in LangSmith pricing 2026.
Is the LangGraph Agent Server open source?
No, and this surprises a lot of people because LangGraph itself is. The Agent Server ships as the langgraph-api package, which PyPI lists under the Elastic License 2.0. You can read its code, but ELv2 is a source-available licence, not an open-source one. Among other limits, it doesn't let you offer the software to others as a managed service, or work around its license-key checks.
What is open source (MIT):
- the
langgraphlibrary; - the checkpointers, including
langgraph-checkpoint-postgres; - the SDKs
langgraph_sdkand@langchain/langgraph-sdk; - the
langgraph-cli.
So building and running agents is free. Only the official server comes with license terms.
Open-source LangGraph server alternatives
So what if you want to self-host the support bot in production without an Enterprise license? There are three routes:
| Option | What it is | Licence | Things to check |
|---|---|---|---|
| Aegra | A separate server that reimplements the Agent Server API on Postgres | Apache 2.0 | Its README lists MCP and A2A as "coming soon". Test the endpoints your client uses |
| langhost | Runs the stock langgraph-api with its own Postgres runtime |
MIT for its own code | It still runs langgraph-api, so the Elastic License 2.0 terms apply to that part. It's a young project |
| Your own API | FastAPI plus LangGraph's Postgres checkpointer | MIT libraries | You lose background runs, crons, the store API and SDK compatibility |
Building your own API can work, but I don't recommend it as a default. A couple of reasons:
- you end up rebuilding the queue and the streaming layer from the "why you need a server" list above;
- your client is no longer on the official SDK, so Studio and Agent Chat UI stop working with it.
It does make sense for one simple chat agent where cost matters most. That route is built step by step in deploy LangGraph without LangSmith.
Whichever server you pick, my preference is to keep the client on the official SDK, like our client.py above. Then moving between langgraph dev, LangSmith, a standalone server or an alternative only changes the URL.
So which one should you pick?
In your case, the deciding factor is usually who you want running Postgres, Redis and the workers:
- Still building:
langgraph dev. Free, no Docker. - One production agent, no time for ops: LangSmith Deployment on Plus. One Small Serverless deployment is included.
- Your own cloud, with budget for a license: the standalone server on Kubernetes, with Enterprise.
- Your own cloud, no license: an open-source server that speaks the same API, after testing your client against it.
- One simple chat agent: your own FastAPI app with the Postgres checkpointer.
For every deployment route side by side, with costs, see how to deploy LangGraph.
Start with langgraph dev, keep your client on the SDK, and the rest is just a URL change.
FAQ
What is the difference between LangGraph and the LangGraph Agent Server? LangGraph is the MIT library you build the graph with. The Agent Server is the runtime that serves the graph over HTTP, with threads, runs, a task queue, streaming and memory.
What port does the LangGraph server use? langgraph dev uses 2024. langgraph up uses 8123. A built image listens on 8000 inside the container, and LangChain's example maps it to 8123.
Does the LangGraph Agent Server need Redis? Yes. Postgres stores the data and the task queue. Redis carries streamed output and cancel signals between the API server and the workers.
What is LANGGRAPH_CLOUD_LICENSE_KEY? The LangSmith license key the standalone server checks once at start-up. You need it to run the official server in production outside LangChain's cloud.
Can I run the LangGraph Agent Server for free? Locally, yes, with langgraph dev or langgraph up. In production on your own servers, the official server needs a license. The free options are an open-source server that speaks the same API, or your own API around the graph.
Is LangGraph Server the same as LangGraph Platform? LangGraph Server was the old name of the Agent Server. LangGraph Platform was the product that ran it, now called LangSmith Deployment.
Can the Agent Server run agents that aren't built with LangGraph? Yes. LangChain documents wrappers for Google ADK, Strands, the Claude Agent SDK, CrewAI and AutoGen.
Sources (checked 4 December 2026)
- LangSmith Agent Server: features, architecture, other frameworks
- Deploy a standalone server: environment variables, license key, beacon, Kubernetes vs Docker, the serverless warning
- Run a local server:
langgraph dev, port, Studio - LangGraph CLI:
dev,up,build,deploy - Agent Server API reference: endpoint groups
- langgraph-api on PyPI: Elastic License 2.0
- LangChain pricing: which plans include deployment
- Aegra and langhost: READMEs
Comments