Agent Server, Deployment and Studio
LangSmith Deployment (formerly LangGraph Platform) runs LangGraph graphs on the Agent Server (older docs and images say LangGraph Server). It exposes three API resources: assistants (configuration), threads (state) and runs (work), plus crons and a store, backed by Postgres for durable data and Redis for signals and streaming. Know how `langgraph.json` and the LangGraph CLI (`dev`, `up`, `build`, `deploy`, `validate`) package an app, how to drive it with `langgraph-sdk` and RemoteGraph, double-texting strategies, webhooks, custom auth, how it scales, the deployment topologies (Cloud, hybrid, full self-hosted, standalone), and debugging in LangSmith Studio (formerly LangGraph Studio). Targets langgraph 1.2, langgraph-sdk 0.4.8 and langgraph-cli 0.4.37.
Key points
- 1
langgraph.jsonneedsgraphs(graph ID ->./path/file.py:variable, where the variable is a compiled graph or a factory) anddependencies(directories or package names, not the stringrequirements.txt), unlesssource: {"kind": "uv"}installs fromuv.lock. Optional keys includeenv(a path or a mapping),python_version(3.11 to 3.13),store(indexfor semantic search,ttl),checkpointer(backend,ttl,serde),auth,http,webhooks,api_versionandimage_distro.langgraph validatechecks the file. - 2
CLI:
langgraph dev(needslanggraph-cli[inmem], no Docker, hot reload, port 2024, state pickled to a local directory, connects to Studio).langgraph up(Docker stack with Postgres and Redis, port 8123, license key for production).langgraph build -t(image),langgraph dockerfile(regenerate it after every config change),langgraph deploy(build and push to Cloud; creates or updates a deployment revision). JS:npx @langchain/langgraph-cli. - 3
Every graph ID gets a default assistant, so clients pass
"agent"or an assistant UUID asassistant_id. Assistants version configuration separately from code. Eachassistants.updatecreates a new version from the full payload (no merge), andassistants.set_latest(id, version)promotes or rolls back. Assistants are not in open-source LangGraph. - 4
A run pairs an assistant with an optional thread.
thread_id=Nonemakes it stateless.runs.createreturns at once with statuspending,runs.joinblocks and returns the final thread state,runs.waitcreates a run and blocks,runs.streamstreams (the server'smessages-tuplemode matches the open-sourcemessagesmode).runs.cancel(action="interrupt"|"rollback"): interrupt keeps the run, rollback deletes it and its checkpoints. - 5
Double texting (
multitask_strategy):enqueue(default) runs inputs in order,rejectreturns HTTP 409 and keeps the first run,interruptstops the first run (statusinterrupted, partial state kept, so handle half-finished tool calls),rollbackdeletes the first run, input included. The queue never runs two runs on one thread at once. - 6
Crons:
crons.create_for_threadreuses one thread, andcrons.create(stateless) makes a thread per run and deletes it after (on_run_completed="delete"default, or"keep"plus TTL). Schedules are in UTC, the input is the same every time, and you must delete unused crons to stop LLM charges. - 7
Webhooks: pass
webhook=on create, stream or wait runs and crons. One POST arrives at completion with the Run fields plusvalues,webhook_sent_atanderror. Secure them with a URL token orwebhooks.headers(${{ env.LG_WEBHOOK_* }}), restrict them withwebhooks.url(allowed_domains,require_https), or turn them off withhttp.disable_webhooks. - 8
Custom auth:
auth.pathpoints to alanggraph_sdk.Auth.@auth.authenticateruns on every request and returnsidentity(available asctx.userand asconfig["configurable"]["langgraph_auth_user"]).@auth.on,@auth.on.<resource>and@auth.on.<resource>.<action>authorize; the most specific match wins. Handlers stampvalue["metadata"]and return filter dicts ($eq,$contains),None/Trueto allow, orFalsefor 403. Runs inherit thread access. Store handlers validate or rewritevalue["namespace"]. - 9
Architecture: API servers handle requests, and queue workers execute graphs and write checkpoints. Postgres holds assistants, threads, runs, crons, checkpoints and the store, and backs the queue with exactly-once claims. Redis holds only ephemeral data (wake-ups, cancellation, stream pub/sub). The server injects the checkpointer and store, so do not compile your own into the graph.
- 10
Scaling: request concurrency grows with API replicas; run concurrency = queue workers x
N_JOBS_PER_WORKER(default 10). Workers needed = throughput x average run seconds /N_JOBS_PER_WORKER. Containers are stateless, so no sticky sessions are needed. Crashed runs are requeued by a sweeper (every 2 minutes) after the heartbeat lapses. Usedurability="exit", stateless runs, TTLs and/joininstead of polling to cut load. - 11
Topologies: Cloud (LangChain runs everything, with GitHub CI/CD), hybrid (LangChain-hosted control plane with Agent Servers and data in your VPC), full self-hosted (you run the control plane, data plane and LangSmith; Enterprise license), standalone server (Agent Server plus your own Postgres and Redis, no control plane; use Kubernetes with the Helm chart, never scale-to-zero serverless).
- 12
Clients and tracing: RemoteGraph gives a deployed graph the compiled-graph interface (
invoke,stream,get_state), can be added as a subgraph node, and is only for other deployments (calling the same deployment can deadlock).distributed_tracing=Trueplus a server graph that applieslangsmith-tracejoins traces across services. Studio has graph mode and chat mode (needsMessagesState), Edit node state then Fork, Re-run from here, assistants, threads and dataset experiments.
Common traps
Assuming
langgraph devbehaves like production: it uses your local environment, so a package missing from the declared dependencies only fails underlanggraph upor in the deployed image.Sending a partial payload to
assistants.update: there is no merge, so fields you leave out disappear from the new version.Believing the default multitask strategy is
rejectorinterrupt: it isenqueue. Also,interruptkeeps partial progress whilerollbackdeletes the first run entirely.Compiling a
PostgresSaverorInMemorySaverinto a graph you deploy: the server injects its own checkpointer and store and needs to manage them.Using RemoteGraph to call another graph on the same deployment instead of composing it as a subgraph: it ties up run slots and can deadlock.
Scoping store namespaces in both the auth handler and the application code: data gets scoped twice and reads miss. Pick one layer.
Adding API replicas to fix runs that sit in
pending: run capacity comes from queue workers xN_JOBS_PER_WORKER, not API servers.Running standalone servers on scale-to-zero serverless platforms, or forgetting to delete crons and set TTLs, which loses tasks or piles up cost and data.
Read the source
Further reading
Suggest a resourceNo extra reading for Agent Server, Deployment and Studio yet. Found a guide, video or cheat sheet that made it click? Share it and help the next learner.
Test yourself on Agent Server, Deployment and Studio
Ten questions, with the answer and explanation after each one.