8.1

Agent Server: langgraph dev, up, and deploy

Under langgraph dev, the server runs one job at a time and adds 0.6 to 1 s to each run, and langgraph up will not start without a key.

You move an agent from a script to langgraph dev, and you send it 16 requests at once. The median run takes 71 s, and 66 s of it is waiting before the model starts. The docs say that a worker runs 10 jobs at a time, and the --help text says the same. The server ran one. With a model on CPU, ten at a time is not faster.

When you finish this section, you can start langgraph dev, set its jobs per worker, and predict its recursion limit and time per run. You can also choose a double texting strategy from its recorded effect, and say what langgraph up and langgraph deploy need.

The three commands

Agent Server: the LangSmith server that runs a compiled graph behind an HTTP API of assistants, threads, and runs. The package is langgraph-api, and we read its code in the installed package.

The LangGraph CLI, langgraph-cli 0.4.43 at the pin, starts the server in three ways:

CommandWhat it runsWhat it needs
langgraph devone Python process with the in-memory runtime, on 127.0.0.1:2024pip install -U "langgraph-cli[inmem]" and Python 3.11 or later
langgraph upthe server image in Docker, with Postgres and Redis containersDocker, and a LangSmith API key for local use or a license key for production
langgraph deploya build and a push to LangSmith, which then runs the servera LangSmith API key, and Docker for a local build

Each command reads langgraph.json, which maps a graph id to the file and the variable of a compiled graph. The lab app has three graphs:

jsonlanggraph.json of the lab appFull log
{
  "dependencies": ["."],
  "graphs": {
    "agent": "./graphs.py:agent",
    "slow": "./graphs.py:slow",
    "loop": "./graphs.py:loop"
  },
  "python_version": "3.13",
  "env": {}
}

slow is two nodes that each sleep for half of the seconds in the input. loop is one node with an edge back to itself. Neither calls a model. The agent of this app had a model stand-in, and this section uses none of its numbers.

The model runs used a second app, t15rapp/, with two graphs. Its agent is a create_agent agent with Qwen3 4B on Ollama and an add tool (t15rapp/graphs.py). Its loopagent is an agent whose tool always says to call it again. Ollama ran on CPU and served one model call at a time.

On Agent Server, you do not pass a checkpointer. The agents page says that LangSmith provisions one when you deploy, and that locally you pass one yourself. So persistence that a script needed a SqliteSaver for comes with the server.

The recursion limit of the server

The env var page of Agent Server gives 10011 as the default of LANGGRAPH_DEFAULT_RECURSION_LIMIT. The config module of langgraph-api 0.18.0 sets the same number. The library default of a StateGraph is 10007, as section 6.8 shows.

We measured the loop graph under langgraph dev on the x86 server guest, 32 vCPU and 48 GiB. It ran once with no config and once with a limit of 50: Raw runs

outputa looping graph under langgraph dev, with no configFull log
{"exp": "T15", "part": "recursion_limit", "server": "dev-default", "config": null, …'Recursion limit of 10007 reached without hitting a stop condition. …"n_in_state": 10007, "run_status": "error"}
The first row, cut to the error text and the step count.

The run stopped at 10007 steps after 7.3 s, with the status error. With {"recursion_limit": 50} in the config, it stopped at 50. So the limit you pass wins, and the default you get under langgraph dev is the library default. We did not trace why the server value did not apply. This manual records the three numbers as conflict D105. Pass recursion_limit on every run, and you need neither default.

We measured loopagent with Qwen3 4B under langgraph dev with {"recursion_limit": 25}, three runs. Each run ended with the status error and GraphRecursionError after 13 model calls and 12 tool calls, in 24 s. Without a config, a run was still going after 120 s and 58 model calls, and we cancelled it. Raw runs

Jobs per worker

Jobs per worker: the number of runs that one queue worker of Agent Server executes at the same time. The setting is N_JOBS_PER_WORKER, or --n-jobs-per-worker for langgraph dev.

The sources give two defaults for langgraph dev. The --help text of the option says that the default is 10. The option itself has no default, and langgraph-api 0.18.0 then uses 1. The Python tab of the CLI page gives 1, and the JS tab and the scale guide give 10. This manual records the difference as conflict D123 and follows the code.

We measured 20 background runs of the slow graph, 2 s each, on the x86 server guest, one run of each setting. With no setting, one run executed at a time, and the 20 runs took 41.0 s. With --n-jobs-per-worker 10, ten ran at once, and they took 5.1 s. With 100, all 20 ran at once, in 3.5 s. Raw runs

With the Qwen3 4B agent, 10 background runs took 47.1 s at one job per worker and 44.4 s at 10. All 10 started at once with the setting, and Ollama then answered their model calls one at a time.

Fig. 8.1runs per second under langgraph dev with Qwen3 4B, by concurrent clientschart
Runs per second under langgraph dev with Qwen3 4B, by concurrent clients A dot chart of runs per second against concurrent clients, 1, 4, and 16, on a log scale, for langgraph dev on the x86 server guest with a Qwen3 4B agent on CPU, one load run per point. Default of one job per worker: 0.185, 0.222, 0.223 runs per second. Ten jobs per worker: 0.191, 0.224, 0.226. All 104 runs answered right, with 0 errors. 0 0.05 0.1 0.15 0.2 0.25 0.3 1 4 16 concurrent clients runs per second 10 jobs per worker default, 1 job Each dot is one load run of the agent graph: 10 runs at 1 and 4 clients, 32 at 16. Ollama served one model call at a time, 0.44 to 0.45 per second from 4 clients up.
With Qwen3 4B on CPU, throughput stayed at 0.22 runs per second from 4 clients up, with 1 or 10 jobs per worker. Each dot is one load run on the x86 server guest, with 10 runs at 1 and 4 clients and 32 runs at 16. Each run is the Qwen3 4B agent through runs.wait on a new thread.

We measured a load on the Qwen3 4B agent graph on the same guest. Each request created a thread and waited for one run. Each level ran once. Figure 8.1 shows the throughput. All 104 runs (10, 10, and 32 per setting) returned the right answer and no error. Raw runs

Jobs per worker1 client4 clients16 clients
default, 10.185 runs/s, p50 5,420 ms0.222 runs/s, p50 17,635 ms0.223 runs/s, p50 70,680 ms
100.191 runs/s, p50 5,129 ms0.224 runs/s, p50 17,188 ms0.226 runs/s, p50 56,033 ms

With one job per worker, the queue is in the server. At 16 clients, a run waited 66 s before its first model call. With 10, the queue moved into Ollama, and the model time of a run grew from 4.4 s to 43.8 s. The model sets the throughput, about 0.45 model calls per second at 16 clients, and the setting does not change it. Set it to 10 anyway when the model can serve calls in parallel.

About one second added to each run

At one client, a run took 5.1 to 5.5 s, and the two model calls took 4.4 s of it. We measured two ways to start a run of the Qwen3 4B agent on the x86 server guest. Each ran 10 times, one at a time, with each jobs setting. The last column is the client time minus the time inside the model calls:

How the run startedClient time, p50Model time, p50Added by the server, p50
runs.wait, default jobs5,486 ms4,473 ms1,014 ms
runs.create, then runs.join, default jobs5,443 ms4,429 ms1,015 ms
runs.wait, 10 jobs5,139 ms4,443 ms661 ms
runs.create, then runs.join, 10 jobs5,087 ms4,385 ms651 ms

Almost all of the added time came before the first model call. That wait was about 1,003 ms with the default, and 641 to 651 ms with 10 jobs. Part of it is the queue of the in-memory runtime, which sleeps 0.5 s on each poll when it finds no run. We did not trace the rest. Read this floor as a property of langgraph dev at the pin. A floor for langgraph up with Postgres and Redis comes in the next edition.

Double texting

Double texting: a second run on a thread while a first run on that thread is still running. Agent Server picks one of four multitask strategies, and enqueue is the default.

The docs page says that double texting is a feature of the server, and that open source LangGraph does not have it. Section 5.2 covers threads in a script.

The lab script starts run A of the slow graph for 4 s. After 1 s, it sends run B of 2 s on the same thread, with a strategy:

pythonthe second run of each double texting caseFull log
        r1 = await client.runs.create(tid, "slow", input={"seconds": 4, "label": f"{strategy}-A"})
        await asyncio.sleep(1.0)
…
            r2 = await client.runs.create(tid, "slow", input={"seconds": 2, "label": f"{strategy}-B"}, multitask_strategy=strategy)
Cut to the two runs and the wait between them.

We measured each strategy once under langgraph dev on the x86 server guest. Figure 8.2 places each node of both runs on one time axis. Raw runs

Fig. 8.2the nodes of run A and run B under each multitask strategytimeline
The nodes of run A and run B under each multitask strategy Four tracks on a time axis of 0 to 7 seconds, one thread each under langgraph dev on the x86 server guest. Run A runs two nodes of 2 s each, and run B, sent about 1 s later on the same thread, runs two nodes of 1 s each. Under reject, B is refused with HTTP 409 and A finishes. Under enqueue, B starts when A ends at 4.8 s. Under interrupt, B starts at 1.0 s, and the first node of A never finishes. Under rollback, the first node of A starts just before B is sent, B starts at 1.0 s, and A is deleted. run B sent REJECT B refused, HTTP 409 A B first second 409, nothing ran ENQUEUE B waits for A, then runs A B first second first second INTERRUPT A interrupted, its node lost A B first node of A never wrote first second ROLLBACK A deleted, B runs alone A B first node of A never wrote first second 0 s 1 s 2 s 3 s 4 s 5 s 6 s 7 s Lane A: the nodes of run A, filled. Lane B: the nodes of run B, outlined. Dashed rose: a node of A that started and never wrote. Times are from the node events, one run each.
reject refused run B, enqueue ran it after A, interrupt stopped A and lost its unfinished node, and rollback deleted A. Each track is one thread on the x86 server guest. A filled bar is a node of run A, and an outlined bar is a node of run B. The rose line is the moment run B was sent.
StrategyRun BRun AState and history at the end
rejectrefused with HTTP 409finished with successonly the writes of A, 4 history entries
enqueuewaited, then started when A endedfinished with successthe writes of A, then of B, 8 history entries
interruptstarted at oncestatus interruptedonly the writes of B, 6 history entries
rollbackstarted at oncedeleted, and a read of it raised NotFoundErroronly the writes of B, 4 history entries

The refusal of reject names the other strategies:

outputthe refusal of rejectFull log
{"exp": "T15", "part": "double_texting", "server": "dev-default", "strategy": "reject", "second_run": {"accepted": false, "type": "ConflictError", "http_status": 409, "body": "{\"detail\":\"Thread is already running a task. Wait for it to finish or choose a different multitask strategy.\"}"}, …
The first row, cut to the second run.

The docs say that interrupt keeps the progress of the first run up to the point of the interrupt. In our case, run A was inside its first node, so it had no finished step to keep. Its node never wrote, and the thread held only run B. A tool call that had started in that node would have no result, which the docs also warn about. Choose enqueue for a chat thread, and reject when a second message must wait for the user to retry.

What langgraph dev sends to LangSmith

langgraph dev traces each run when the environment of the app turns tracing on. We measured it on the Mac with a key of a LangSmith account on the free plan, in a scratch environment. The versions were langgraph-cli 0.4.43, langgraph-api 0.18.0, and langgraph-runtime-inmem 0.38.0. Five runs of a Qwen3 4B agent through the server all answered right.

  • The runs. The account stored 35 runs, 7 for each server run. The root of each trace is named agent, the graph id, and not LangGraph. Its id is the run id of the server.
  • The metadata of the root. It holds thread_id, assistant_id, graph_id, and run_attempt. It also holds langgraph_api_version 0.18.0, langgraph_host with the value self-hosted, and langgraph_plan with the value enterprise. LANGSMITH_LANGGRAPH_API_VARIANT is local_dev.
  • The requests. The process contacted one host, api.smith.langchain.com. It sent 2 GET /info and 15 POST /runs/multipart, and no request to check a license.
jsonthe requests of langgraph dev for five traced runsFull log
  "hosts": [
   "https://api.smith.langchain.com"
  ],
  "requests": {
   "GET /info 200": 2,
   "POST /runs/multipart 202": 15
  },

langgraph-api puts truststore into the SSL layer at import, so the server checks certificates with the trust store of the operating system. In a sandbox that blocks that store, no trace reaches the API. DISABLE_TRUSTSTORE=true turns the injection off, and our recorded run used it. Section 8.2 puts a chat UI in front of this server, with tracing off.

langgraph up needs a key

langgraph up builds the image of your app from langchain/langgraph-api and starts it with Postgres and Redis. Before it builds, it prints what it needs:

outputthe first lines of langgraph upFull log
Starting Agent Server...
For local dev, requires env var LANGSMITH_API_KEY with access to LangSmith Agent Server.
For production use, requires a license key in env var LANGGRAPH_CLOUD_LICENSE_KEY.

On the x86 server guest, with neither variable set, the image built, and both databases reported healthy. The API container exited with code 3:

outputthe containers after langgraph upFull log
t15app-langgraph-api-1 t15app-langgraph-api Exited (3) Less than a second ago
t15app-langgraph-redis-1 redis:6 Up 11 seconds (healthy)
t15app-langgraph-postgres-1 pgvector/pgvector:pg16 Up 11 seconds (healthy)
outputthe log of the API containerFull log
ValueError: License verification failed. Please ensure proper configuration:
- For local development, set a valid LANGSMITH_API_KEY for an account with LangGraph Cloud access in the environment defined in your langgraph.json file.
- For production, configure the LANGGRAPH_CLOUD_LICENSE_KEY environment variable with your LangGraph Cloud license key.
Review your configuration settings and try again. If issues persist, contact support for assistance.

So the server with Postgres and Redis does not start without an account or a license, even on your own machine.

Later we had a key of a LangSmith account on the free plan. Docker was not running on the Mac, so langgraph up stopped with Error: Docker not installed or not running and exit code 2. It stopped before any check of the key.

The package langgraph_license from PyPI, which langgraph-api 0.18.0 installs, returns true from every check. The check that failed above runs only inside the server image. So we still do not know if a key of a free account passes it. The organization reported can_use_langgraph_cloud as false and 0 free deployments. That is a hint from the API, not a test.

The tests of the full server stack come in the next edition, and section 8.8 lists them. They are a worker crash, a Redis or Postgres outage, exactly once in the task queue, and what Redis holds.

langgraph deploy

This part comes from the docs and the code only. We did not run langgraph deploy. The free plan of our account reported no free deployments.

langgraph deploy builds the image, pushes it to a registry that LangSmith manages, and creates or updates an Agent Server in one step. Without Docker, it asks LangSmith to build the image from an upload of your source. The docs mark the command as beta.

  • The key. The command reads --api-key, or LANGGRAPH_HOST_API_KEY, LANGSMITH_API_KEY, or LANGCHAIN_API_KEY.
  • The type. A new server is serverless unless you pass --agent-server-type dedicated. That default is in the repo tree at langgraph 1.2.22, which is newer than the 0.4.43 wheel. The wheel sets its default in the click option. The repo tree also picks dev on a data plane without scale to zero. The wheel has no such rule. It only advises --agent-server-type dev in an AWS 400 error. The option also accepts the older names dev and prod. The docs say that serverless scales to zero and has cold starts.
  • Your own registry. Self-hosted LangSmith needs --push-to for a registry you manage, or --image-uri with a digest.
  • Other commands. langgraph deploy list, deploy metrics, and deploy listeners read what you deployed.

Advisory GHSA-8prr-f582-jqq3 says that langgraph deploy --verbose printed the push token of the registry in langgraph-cli 0.4.15 to 0.4.31. The pin, 0.4.43, is outside that range. Keep --verbose out of CI logs anyway, because it prints the Docker build and push output.

Without a license, you can serve the same agent from your own FastAPI app. Section 9.1 builds that service, and section 9.7 runs it with several workers and one Postgres lock per thread.

LangChain (Python): langchain, langchain-core, langgraph, deepagents, langsmith 1.5.0 · c2f4036 · 2026-11-11 · Edition 2026.11