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
Pythonlangsmithsandbox_modelsRunConfig
Classā—Since v0.13

RunConfig

Copy
RunConfig(
  self,
  user: Optional[str] = None,
  work_dir: Optional[str

Constructors

Attributes

Methods

View source on GitHub
]
=
None
,
env_vars
:
Optional
[
dict
[
str
,
str
]
]
=
None
)
constructor
__init__
NameType
userOptional[str]
work_dirOptional[str]
env_varsOptional[dict[str, str]]
attribute
user: Optional[str]
attribute
work_dir: Optional[str]
attribute
env_vars: Optional[dict[str, str]]
method
from_dict

Create a RunConfig from API response dict.

method
to_payload

Render as a request body fragment, omitting unset fields.

The user, working directory and environment commands run with.

Mirrors docker run -u / -w / -e: user and work_dir replace the layer below, env_vars merge into it key by key. It applies at three points, each layered over the one before -- the snapshot, the sandbox, and a single command.