René's URL Explorer Experiment


Title: ServerConfig | deepagents_code | LangChain Reference

Open Graph Title: ServerConfig | deepagents_code

X Title: ServerConfig | deepagents_code

Description: Python API reference for _server_config.ServerConfig in deepagents_code. Part of the LangChain ecosystem.

Open Graph Description: Python API reference for _server_config.ServerConfig in deepagents_code. Part of the LangChain ecosystem.

X Description: Python API reference for _server_config.ServerConfig in deepagents_code. Part of the LangChain ecosystem.

Opengraph URL: https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig

direct link

Domain: reference.langchain.com

og:imagehttps://reference.langchain.com/og/python/deepagents-code/_server_config/ServerConfig
og:image:width1200
og:image:height630
og:image:altServerConfig | deepagents_code
og:typearticle
twitter:cardsummary_large_image
twitter:imagehttps://reference.langchain.com/og/python/deepagents-code/_server_config/ServerConfig

Links:

LangChain Reference home pagehttps://reference.langchain.com/
GitHubhttps://github.com/langchain-ai
Main Docshttps://docs.langchain.com/oss/python/deepagents
Deep Agentshttps://reference.langchain.com/python/deepagents
LangChainhttps://reference.langchain.com/python/langchain/overview
LangGraphhttps://reference.langchain.com/python/langgraph/overview
Integrationshttps://reference.langchain.com/python/integrations/overview
LangSmithhttps://reference.langchain.com/python/langsmith
Deep Agents Codehttps://reference.langchain.com/python/deepagents-code
Deep Agents Codehttps://reference.langchain.com/python/deepagents-code
deepagents-codehttps://reference.langchain.com/python/deepagents-code
strhttps://docs.python.org/3/library/stdtypes.html#str
View source on GitHubhttps://github.com/langchain-ai/deepagents/blob/019900734024a7665fd65bd75235c6307d5da003/libs/code/deepagents_code/_server_config.py#L181
dicthttps://docs.python.org/3/library/stdtypes.html#dict
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
boolhttps://docs.python.org/3/library/functions.html#bool
boolhttps://docs.python.org/3/library/functions.html#bool
listhttps://docs.python.org/3/library/stdtypes.html#list
strhttps://docs.python.org/3/library/stdtypes.html#str
boolhttps://docs.python.org/3/library/functions.html#bool
boolhttps://docs.python.org/3/library/functions.html#bool
boolhttps://docs.python.org/3/library/functions.html#bool
boolhttps://docs.python.org/3/library/functions.html#bool
boolhttps://docs.python.org/3/library/functions.html#bool
boolhttps://docs.python.org/3/library/functions.html#bool
strhttps://docs.python.org/3/library/stdtypes.html#str
listhttps://docs.python.org/3/library/stdtypes.html#list
strhttps://docs.python.org/3/library/stdtypes.html#str
boolhttps://docs.python.org/3/library/functions.html#bool
strhttps://docs.python.org/3/library/stdtypes.html#str
inthttps://docs.python.org/3/library/functions.html#int
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
boolhttps://docs.python.org/3/library/functions.html#bool
boolhttps://docs.python.org/3/library/functions.html#bool
strhttps://docs.python.org/3/library/stdtypes.html#str
dicthttps://docs.python.org/3/library/stdtypes.html#dict
strhttps://docs.python.org/3/library/stdtypes.html#str
Anyhttps://docs.python.org/3/library/typing.html#typing.Any
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
boolhttps://docs.python.org/3/library/functions.html#bool
boolhttps://docs.python.org/3/library/functions.html#bool
listhttps://docs.python.org/3/library/stdtypes.html#list
strhttps://docs.python.org/3/library/stdtypes.html#str
boolhttps://docs.python.org/3/library/functions.html#bool
boolhttps://docs.python.org/3/library/functions.html#bool
boolhttps://docs.python.org/3/library/functions.html#bool
boolhttps://docs.python.org/3/library/functions.html#bool
boolhttps://docs.python.org/3/library/functions.html#bool
boolhttps://docs.python.org/3/library/functions.html#bool
strhttps://docs.python.org/3/library/stdtypes.html#str
listhttps://docs.python.org/3/library/stdtypes.html#list
strhttps://docs.python.org/3/library/stdtypes.html#str
boolhttps://docs.python.org/3/library/functions.html#bool
strhttps://docs.python.org/3/library/stdtypes.html#str
inthttps://docs.python.org/3/library/functions.html#int
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
strhttps://docs.python.org/3/library/stdtypes.html#str
boolhttps://docs.python.org/3/library/functions.html#bool
boolhttps://docs.python.org/3/library/functions.html#bool
attributemodel: str | NoneModel spec string (e.g. 'anthropic:claude-opus-4-7'); None lets the server pick its default.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/model
attributemodel_params: dict[str, Any] | NoneExtra kwargs forwarded to the chat model constructor (temperature, max_tokens, etc.).https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/model_params
attributeassistant_id: strIdentifier of the agent graph to invoke on the server.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/assistant_id
attributesystem_prompt: str | NoneOverride for the agent's system prompt; None uses the agent's default.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/system_prompt
attributeauto_approve: boolAuto-approve every tool call without human-in-the-loop interrupts.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/auto_approve
attributeinterrupt_shell_only: boolRoute only shell tool calls through HITL; validate others via middleware.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/interrupt_shell_only
attributeshell_allow_list: list[str] | NoneRestrictive allow-list of shell commands; None disables the allow-list. Must be non-empty when set.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/shell_allow_list
attributeinteractive: boolWhether the agent runs in an interactive session (vs. one-shot/non-interactive).https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/interactive
attributeenable_shell: boolEnable the shell execution tool on the server.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/enable_shell
attributeenable_ask_user: boolEnable the ask_user tool that lets the agent prompt the user mid-run.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/enable_ask_user
attributeenable_memory: boolEnable the long-term memory subsystem.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/enable_memory
attributeenable_skills: boolEnable the skills subsystem (SKILL.md loading and skill tools).https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/enable_skills
attributeenable_interpreter: boolEnable CodeInterpreterMiddleware (js_eval REPL) on the main agent. Always the resolved concrete value: from_cli_args collapses the tri-state caller option via _resolve_enable_interpreter before constructing the config, so the bool | None "defer to default" sentinel never reaches this field. The False default here is only the bare-constructor/from_env fallback; the user-facing default (on in local mode) lives in settings.enable_interpreter. Local-mode only; the server graph raises if a sandbox is configured and this flag is True.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/enable_interpreter
attributeinterpreter_ptc: str | list[str] | NoneOverride for settings.interpreter_ptc. None means "fall through to whatever settings.interpreter_ptc resolves to from ~/.deepagents/config.toml". A string is one of "safe"/"all"; a list is an explicit allowlist of tool names that may also include the "safe" preset (expanded at agent-build time); "all" is rejected inside a list.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/interpreter_ptc
attributeinterpreter_ptc_acknowledge_unsafe: boolMirror of settings.interpreter_ptc_acknowledge_unsafe — required when interpreter_ptc="all" is paired with non-auto_approve mode.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/interpreter_ptc_acknowledge_unsafe
attributerubric_model: str | NoneGrader model spec for RubricMiddleware (e.g. 'anthropic:...'). None reuses the main agent model.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/rubric_model
attributerubric_max_iterations: int | NoneExplicit grader iterations per rubric attempt; None uses the SDK default.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/rubric_max_iterations
attributesandbox_type: str | NoneSandbox backend identifier (e.g. 'daytona'); None runs tools on the host. 'none' is normalized to None in __post_init__.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/sandbox_type
attributesandbox_id: str | NoneExisting sandbox ID to attach to; None creates a fresh sandbox.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/sandbox_id
attributesandbox_snapshot_name: str | NoneSandbox snapshot (langsmith) or blueprint (runloop) name; must be None when sandbox_id is set.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/sandbox_snapshot_name
attributesandbox_setup: str | NoneAbsolute path to a setup script executed inside the sandbox on first attach.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/sandbox_setup
attributecwd: str | NoneUser's original working directory, serialized as an absolute path.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/cwd
attributeproject_root: str | NoneDetected project root (e.g. nearest git/uv/npm boundary), or None when outside a project.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/project_root
attributemcp_config_path: str | NoneAbsolute path to the MCP server config file; None disables MCP-from-config.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/mcp_config_path
attributeno_mcp: boolDisable all MCP server connections regardless of other config.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/no_mcp
attributetrust_project_mcp: bool | NoneTri-state trust flag for project-scoped MCP servers: True/False/None (prompt user).https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/trust_project_mcp
methodto_envSerialize this config to a DEEPAGENTS_CODE_SERVER_* env-var mapping. None values signal that the variable should be cleared from the environment (rather than set to an empty string), so callers can iterate and set or clear each variable in os.environ.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/to_env
methodfrom_envReconstruct a ServerConfig from DEEPAGENTS_CODE_SERVER_* env vars. This is the inverse of to_env() and is called inside the server subprocess to recover the app's configuration.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/from_env
methodfrom_cli_argsBuild a ServerConfig from parsed CLI arguments. Handles path normalization (e.g. resolving relative MCP config paths against the user's working directory) so that the raw serialized values are always absolute and unambiguous.https://reference.langchain.com/python/deepagents-code/_server_config/ServerConfig/from_cli_args

Viewport: width=device-width, initial-scale=1


URLs of crawlers that visited me.