Skip to content

Latest commit

 

History

History
94 lines (79 loc) · 6.27 KB

File metadata and controls

94 lines (79 loc) · 6.27 KB

AgentHost capability credential delivery

AgentHost receives purpose-bound provider and repository capability data through one-time configuration, not ambient user-token stores, mounted token files, or Key Vault. Credential lifetimes differ: Copilot capability expiry is checked, BYOK has no equivalent expiry field, and turn/preview credentials are bound to the run lifecycle.

The A2A turn endpoint uses a separate per-run bearer token. Production KubernetesSandboxExecutor mints and sends it during POST /configure; RemoteAgentProxy sends it with each turn. AgentHost enforces equality when a nonempty token is configured. See the claim/configure sequence.

Provider delivery

RunGitHubCapabilitySnapshotLifecycle captures immutable, purpose-bound snapshots before launch. In GitHub Copilot mode, the API redeems a live UnattendedCopilot capability and passes the bounded credential to the selected pod.

BYOK is the alternative. When byokProviderConfiguration is supplied, AgentHost uses it instead of copilotCredential. A live Copilot credential is required only when the BYOK configuration is absent.

Missing, revoked, mismatched, and expired Copilot capabilities fail closed. Never log credential values. AgentHost keeps configured credentials in memory, but the server side deliberately persists preview-control credentials under a deterministic per-run secret-store key for cross-replica callbacks. That persistence and deletion on actual release/orphan cleanup are best-effort; a missing vault configuration uses an in-memory server store and cannot provide durable cross-replica recovery.

/configure request body

Field Required Meaning
runId Yes The Agentweaver run this pod executes.
copilotCredential When no BYOK configuration is supplied Immutable, run-bound Copilot capability credential.
byokProviderConfiguration When copilotCredential is absent Run-scoped configuration for the active BYOK provider.
turnBearerToken No Per-run bearer token for POST /a2a/agent/v1/message:stream.
repositoryAccessToken No Separately redeemed UnattendedRepository capability for scoped Git operations.
sharedWorkingDirectory No API-visible run worktree.
previewRunnerCredential No Per-run bearer for pod-root control calls.
mcpBrokerToken For OperatorAssistant purpose only Purpose-restricted broker token; not a general run credential.

Security properties

Property Detail
Purpose binding Provider and repository capabilities have separate purposes.
Run binding A credential provider rejects a different run ID.
Bounded lifetime Copilot capability expiry is enforced; BYOK, turn and preview lifetimes have different contracts.
One-time delivery /configure accepts one configuration per warm pod.
No ambient fallback AgentHost has no Key Vault, CSI, shared-filesystem, environment-token, or user-token-store path.

Source

  • apps/Agentweaver.Api/Sandbox/KubernetesSandboxExecutor.cs
  • apps/Agentweaver.AgentHost/Program.cs
  • apps/Agentweaver.AgentHost/AgentHostRuntimeState.cs

Related reading

Diagram details and constraints
ElementContract
titleBind, reach standby, configure once
takeawayLiveness precedes configuration; production delivers run credentials out of pod specs.
Prepare launchPrepare launch
Prepare launchResolve provider and run context
Prepare launchMint fresh turn token
Claim warm podClaim warm pod
Claim warm podCreate/adopt; omit spec.env
Claim warm podWait Ready + bound pod name
Resolve and registerResolve and register
Resolve and registerPod mapping / token registry
Resolve and registerResolve actual pod IP
GET /healthzGET /healthz
GET /healthzHTTP 200 standby
GET /healthzListener liveness, not turn ready
POST /configurePOST /configure
POST /configureIdentity / workspace / approvals
POST /configureCopilot capability OR BYOK
AgentHost setupAgentHost setup
AgentHost setupOne-time configuration
AgentHost setupEffective workspace + HOME
Configuration guardsConfiguration guards
Configuration guardsSecond configure: 409
Configuration guardsOther routes: 503 before ready
Register effective endpointRegister effective endpoint
Register effective endpointReturn effective working directory
Register effective endpointShared/local/private fallback
First A2A turnFirst A2A turn
First A2A turnProduction sends turn bearer
First A2A turnEquality guard when nonempty
arrow-1launch
arrow-2bound
arrow-3poll
arrow-4reachable
arrow-5setup
arrow-6ready
arrow-7invoke
note-0Top, middle and bottom rows are successive launch stages.
note-1Repository / preview / broker credentials have separate purposes.
note-2Optional schema fields do not imply unconditional endpoint enforcement.
notesTop, middle and bottom rows are successive launch stages.; Repository / preview / broker credentials have separate purposes.; Optional schema fields do not imply unconditional endpoint enforcement.