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

ProxyConfigRule

Copy
ProxyConfigRule()

Bases

BaseModel

Attributes

Inherited fromBaseModel

Attributes

Amodel_fields_set: set[str]Amodel_configAmodel_construct: construct

Methods

Mto_dict
—

Recursively generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

View source on GitHub
Mto_json
—

Return the report as a JSON-serializable dict (raw JSON shape).

Mconstruct
Mmodel_dump
—

Dump the feedback, including its address.

Mmodel_dump_json
—

Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json

Classes

CConfig
attribute
name: str
attribute
aws: Optional[ProxyConfigRuleAws]
attribute
azure: Optional[ProxyConfigRuleAzure]
attribute
description: Optional[str]
attribute
enabled: Optional[bool]
attribute
env_vars: Optional[Dict[str, str]]
attribute
gcp: Optional[ProxyConfigRuleGcp]
attribute
headers: Optional[List[ProxyConfigRuleHeader]]
attribute
match_headers: Optional[List[str]]
attribute
match_hosts: Optional[List[str]]
attribute
match_paths: Optional[List[str]]
attribute
type: Optional[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.

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.

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.

MatchHosts is only accepted for header injection rules.

Provider auth rules use built-in host matching.