Skip to content
masterclass Buddy

LangSmith · Environment Variable

LANGSMITH_AGENT_ID

LANGSMITH_AGENT_ID selects the LangSmith agent that receives traces. Set it with LANGSMITH_AGENT_ENVIRONMENT to choose the target environment.

Last updated

Syntax

export LANGSMITH_AGENT_ID="<your-agent-id>"
export LANGSMITH_AGENT_ENVIRONMENT="local"

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • LANGSMITH_TRACING
  • LANGSMITH_API_KEY
  • tracer_session_name
  • LANGSMITH_PROJECT
  • LANGCHAIN_PROJECT
  • LANGCHAIN_SESSION
  • Log traces to an agent

Source: Create an agent - Docs by LangChain. Checked 2026-11-03.