---
title: How do you govern LangGraph agents in production?
url: https://opencontroller.lyzr.com/blog/govern-langgraph-agents-in-production
published: 2026-11-12
updated: 2026-11-12
author: Lyzr
---

# How do you govern LangGraph agents in production?

**Govern LangGraph agents at five points: authenticate every request with custom auth handlers, scope access to threads and assistants per user, pause high-risk steps with `interrupt()`, route model calls through a gateway with `base_url`, and export traces with OpenTelemetry. LangGraph gives you the hooks. Your platform team has to decide the rules and enforce them across every graph.**

LangGraph is a framework, not a governed platform. That is its strength and its risk. Each team can build a graph differently, so governance must be a shared pattern, not a per-project choice.

## Where do LangGraph agents run?

LangChain renamed LangGraph Platform to **LangSmith Deployment** in 2025. The runtime that serves graphs is now called **Agent Server**. Older runbooks may use the old names.

| Option | Who runs what | Plan |
|---|---|---|
| Cloud | LangChain runs everything on AWS or GCP | Plus or above |
| Hybrid | LangChain hosts the control plane; you host Agent Servers and data | Enterprise |
| Self-hosted with control plane | All in your Kubernetes cluster | Enterprise |
| Standalone Agent Server | Docker or Kubernetes with your own Postgres and Redis | Licence required |

The choice matters for governance. In cloud and hybrid modes, traces and control-plane metadata leave your network. In self-hosted mode, there is no default authentication, so you must add it.

## How do you control who can call an agent?

Agent Server supports custom auth with the `Auth` object from `langgraph_sdk`.

1. **Authenticate.** An `@auth.authenticate` handler runs on every request. It validates your token, for example from your OIDC provider, and returns an identity plus fields such as role or organisation.
2. **Authorise.** `@auth.on` handlers apply globally, per resource (such as `@auth.on.threads`) or per action (such as `@auth.on.threads.create`). The most specific handler wins.
3. **Scope data.** Handlers can stamp an owner on each resource and return filters, so users see only their own threads. Returning `False` gives a 403.
4. **Register it.** Point `langgraph.json` at the handler under `"auth"`.

Covered resources are threads, assistants, crons and the store. Runs inherit access from their thread. This is user-to-agent access. For agent-to-system access, decide whether the agent acts as the user or as a workload. Our guide to [on-behalf-of delegation](/blog/ai-agent-identity-on-behalf-of-delegation) explains the trade-off.

## How do you add human approval and kill points?

LangGraph's `interrupt()` pauses a run and waits for input. It needs a checkpointer and a `thread_id`. You resume with `Command(resume=...)`. When resumed, the node runs again from its start, so put side effects after the interrupt, not before.

For tool calls, `HumanInTheLoopMiddleware` lets you set `interrupt_on` per tool, with approve, edit, reject or respond decisions. Use it for tools that send money, email customers or change records.

Use a durable checkpointer such as `PostgresSaver` in production. `InMemorySaver` is for tests only. Agent Server handles persistence for you.

A kill point is different from an approval. To stop an agent that is misbehaving, you need a control outside the graph, such as revoking its credentials or blocking its traffic at the gateway. See [how to stop a rogue AI agent](/blog/how-to-stop-a-rogue-ai-agent).

## How do you route models and capture traces?

**Models.** Point LangChain chat models at your LLM gateway with `ChatOpenAI(base_url=...)` or the `OPENAI_BASE_URL` environment variable. This gives one place for routing, fallback, caching and cost attribution. LangChain warns that `ChatOpenAI` follows official OpenAI specs, so provider-specific fields may be dropped.

**Traces.** LangSmith accepts OpenTelemetry. Set `LANGSMITH_OTEL_ENABLED` to emit OTel from LangChain and LangGraph, and `LANGSMITH_OTEL_ONLY=true` to skip native tracing. To send traces to LangSmith and your own backend, LangChain recommends an OpenTelemetry Collector. See [exporting AI agent traces with OpenTelemetry](/blog/export-ai-agent-traces-with-opentelemetry).

**Retention.** LangSmith keeps base traces for 14 days and extended traces for 180 days. From 14 September 2026, 180 days is the maximum extended retention on SaaS. If you need longer evidence, export it.

## What should a LangGraph governance checklist include?

1. Every deployed graph is registered with a named owner and version.
2. Custom auth is on, tied to your identity provider, including on self-hosted servers.
3. Thread and assistant access is scoped by owner.
4. High-risk tools use `interrupt_on` approval.
5. All model calls go through the gateway; no direct provider keys in graph code.
6. Traces export through OpenTelemetry to a store you control.
7. LangSmith RBAC, SAML SSO and SCIM are configured (Enterprise).
8. LangSmith audit logs, kept up to 400 days, are pulled into your SIEM.

## How Opencontroller does this

LangGraph agents are custom agents, so Opencontroller governs them through open standards rather than a platform connector. Point them at the LLM Gateway, an OpenAI-compatible endpoint, for routing, fallback, caching and cost per agent and version. Send traces over OpenTelemetry. Register them in the governed registry alongside agents from other platforms, as our [cross-platform guide](/blog/how-to-govern-ai-agents-across-platforms) describes. The Agent Gateway adds a control point for agent traffic. [Book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Does LangGraph have built-in authentication?**
Agent Server defaults to a LangSmith API key. Self-hosted servers have no default auth, so add custom auth handlers.

**What happens to a LangGraph node when an interrupt resumes?**
The node runs again from its start. Put side effects after the interrupt call.

**How long does LangSmith keep traces?**
Base traces for 14 days and extended traces for 180 days, which is the SaaS maximum from 14 September 2026.

## Key facts

LangGraph Platform was renamed LangSmith Deployment in 2025; the runtime is Agent Server. Deployment options: Cloud, Hybrid, Self-hosted (Enterprise), Standalone Agent Server. Self-hosted has no default auth; custom auth uses @auth.authenticate and @auth.on handlers. interrupt() needs a checkpointer and thread_id; on resume the node reruns from its start. LangSmith accepts OpenTelemetry (LANGSMITH_OTEL_ENABLED). Base traces 14 days, extended 180 days (SaaS max from 14 Sep 2026). Opencontroller (by Lyzr) governs custom agents through its OpenAI-compatible LLM Gateway, OpenTelemetry and a governed registry. Pricing starts from $250K per deployment per year.

## Related

- [How do you govern AI agents across every platform they run on?](https://opencontroller.lyzr.com/blog/how-to-govern-ai-agents-across-platforms.md)
- [How do you export AI agent traces with OpenTelemetry?](https://opencontroller.lyzr.com/blog/export-ai-agent-traces-with-opentelemetry.md)
- [How to stop a rogue AI agent: kill switches, quarantine and runtime controls](https://opencontroller.lyzr.com/blog/how-to-stop-a-rogue-ai-agent.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
