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
Pythonlangsmithtypessandboxesbox_create_paramsProxyConfigRule
Class●Since v0.14

ProxyConfigRule

Copy
ProxyConfigRule()

Bases

TypedDict

Constructors

Attributes

View source on GitHub
constructor
__init__
NameType
nameRequired[str]
awsProxyConfigRuleAws
azureProxyConfigRuleAzure
descriptionstr
enabledbool
env_varsDict[str, str]
gcpProxyConfigRuleGcp
headersIterable[ProxyConfigRuleHeader]
match_headersSequenceNotStr[str]
match_hostsSequenceNotStr[str]
match_pathsSequenceNotStr[str]
typestr
attribute
name: Required[str]
attribute
aws: ProxyConfigRuleAws
attribute
azure: ProxyConfigRuleAzure
attribute
description: str

Description says what this rule lets the sandbox reach, so an agent driving the sandbox can be told its capabilities. At most 1024 characters.

attribute
enabled: bool
attribute
env_vars: Dict[str, str]

EnvVars are plaintext env vars set for every command in the sandbox while this rule is enabled. Use them for tools that refuse to run unless a credential env var is present (e.g. gh needs GH_TOKEN) even though this rule injects the real credential on the wire — set a dummy value here so the command starts. Explicit per-sandbox env_vars win over these, and provider-managed (AWS/GCP) vars win over both.

attribute
gcp: ProxyConfigRuleGcp
attribute
headers: Iterable[ProxyConfigRuleHeader]
attribute
match_headers: SequenceNotStr[str]

MatchHeaders restricts a header injection rule to requests carrying every listed header, each written "name: value" with a lowercase name and an exact value. Pair with headers of the same name to swap a placeholder the sandbox sends (e.g. "authorization: Bearer account-b") for a real credential, so one host can serve several accounts. Rules are evaluated in order and the first match wins.

attribute
match_hosts: SequenceNotStr[str]

MatchHosts is only accepted for header injection rules.

Provider auth rules use built-in host matching.

attribute
match_paths: SequenceNotStr[str]
attribute
type: str