You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The delegates runtime already supports a per-delegate env: map — parsed in plugins/delegates/adapters.py (raw.get("env")), merged over the process env at ACP spawn, PATH-aware in the handshake probe (#1299), and redacted in /api/delegates views (_redact_env). But the console delegate editor is driven by each adapter's config_schema(), and none of them expose an env field — so the only ways to author an env-carrying delegate are:
hand-editing langgraph-config.yaml (secrets like ANTHROPIC_AUTH_TOKEN land in plaintext config), or
a wrapper script that exports the env and execs the agent (works, but invisible to the console, and each user reinvents key-sourcing).
This bites immediately for the common case: Claude Code pointed at an alternate Anthropic-compatible gateway (e.g. DeepSeek's /anthropic endpoint) — the whole delegate is just claude-agent-acp plus ~8 env vars (ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_MODEL, ANTHROPIC_DEFAULT_*_MODEL, …), one of which is a secret. Same shape as the already-shipped per-delegate model pin (env: {ANTHROPIC_MODEL: opus}).
Proposal
Editor surface: add an env editor (key/value rows) to the delegate create/edit form — likely a new FieldSpec kind ("envmap") so every adapter type gets it, with per-row secret toggle.
Secret tier: a row marked secret stores its value in the secrets.yaml overlay (the _secret resolution pattern other adapter fields already use: explicit overlay value wins, else a named host env var), never in langgraph-config.yaml. Views stay redacted (_redact_env already does this half).
Semantics stay as shipped (document them in the form help): values are verbatim strings — no ${VAR} expansion — merged over the inherited process env; PATH in the map overlays the probe path.
Gap
The delegates runtime already supports a per-delegate
env:map — parsed inplugins/delegates/adapters.py(raw.get("env")), merged over the process env at ACP spawn, PATH-aware in the handshake probe (#1299), and redacted in/api/delegatesviews (_redact_env). But the console delegate editor is driven by each adapter'sconfig_schema(), and none of them expose anenvfield — so the only ways to author an env-carrying delegate are:langgraph-config.yaml(secrets likeANTHROPIC_AUTH_TOKENland in plaintext config), orexecs the agent (works, but invisible to the console, and each user reinvents key-sourcing).This bites immediately for the common case: Claude Code pointed at an alternate Anthropic-compatible gateway (e.g. DeepSeek's
/anthropicendpoint) — the whole delegate is justclaude-agent-acpplus ~8 env vars (ANTHROPIC_BASE_URL,ANTHROPIC_AUTH_TOKEN,ANTHROPIC_MODEL,ANTHROPIC_DEFAULT_*_MODEL, …), one of which is a secret. Same shape as the already-shipped per-delegate model pin (env: {ANTHROPIC_MODEL: opus}).Proposal
FieldSpeckind ("envmap") so every adapter type gets it, with per-row secret toggle.secrets.yamloverlay (the_secretresolution pattern other adapter fields already use: explicit overlay value wins, else a named host env var), never inlanggraph-config.yaml. Views stay redacted (_redact_envalready does this half).${VAR}expansion — merged over the inherited process env;PATHin the map overlays the probe path.${input}placeholders should resolve through the Console: create-time "prompt-for-value" picker for bundle ${input} templates (mcp servers + secrets) #2041 create-time prompt-for-value picker (sameinputscontract asmcp-catalog.json), closing the same loop as Archetype/bundle seam: env + secrets seeding #2014 for delegate credentials.Refs
plugins/delegates/adapters.py(env parse at ~L591, merged-PATH probe ~L743,_secret~L95),plugins/delegates/api.py(_redact_env), ADR 0025, ADR 0080 (no host-env auto-copy), #2041, #2014.