LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
PythonlangsmithaddressAgentAddress
Class●Since v0.14

AgentAddress

(beta) The address of an agent's environment.

Copy
AgentAddress(
    self,
    id: str,
    environment: str,
)

Constructors

Attributes

Methods

View source on GitHub

Parameters

NameTypeDescription
id*str
environment*str
constructor
__init__
NameType
idstr
environmentstr
attribute
id: str
attribute
environment: str
method
to_api_address
method
from_env

The agent's ID: 1 to 63 lowercase ASCII letters, digits or hyphens, starting with a letter and ending with a letter or digit. The server creates the agent on first use.

One of local, development, staging or production, in any case.

Return this agent as the address the query APIs take.

Read the agent named by the LANGSMITH_AGENT_* env vars.

Reads LANGSMITH_AGENT_ID and LANGSMITH_AGENT_ENVIRONMENT, and returns None if neither is set.