LangSmith LLM Gateway: runtime governance built into the agent lifecycle
Configure LangSmith LLM Gateway to enforce spend limits and redact PII.
Set base_url to Gateway endpoint and add provider keys to workspace secrets.
Summary
LangSmith LLM Gateway, released on 13 May 2026 in private beta, sits between agents and LLM providers to enforce spend limits and redact PII before requests reach the model. The gateway supports hard caps at the organization, workspace, user, or API key level, real‑time cost rollups, PII and secret detection with automatic redaction, and trace continuity so all gateway‑proxied calls appear in the same LangSmith workspace. Audit logging records every administrative action, and layered enforcement allows policies to be applied at multiple scopes. The gateway integrates with LangSmith Engine, enabling policy events to surface directly in Engine for triage. Setup requires only swapping the base_url to the gateway endpoint, adding provider keys to workspace secrets, and configuring policies in the UI—no separate infrastructure is needed.
Key changes
- Spend limits with hard caps at org, workspace, user, or API key level
- Real‑time cost rollups by workspace, user, and API key
- PII and secret detection with automatic redaction before model calls
- Trace continuity: gateway‑proxied calls appear in the same LangSmith workspace
- Audit logging of all administrative actions
- Layered enforcement for granular policy application
- Integration with LangSmith Engine for policy event triage