Skip to content

Delegated Capability

Status: Running today. Runtime delegated session, gateway, output firewall, and audit / replay extension are shipped under K-DELEG-*. MCP adapter ships at stdio_command; remote transports admitted as direction.

Runtime owns the gateway and the output firewall through which external AI hosts (a separate AI provider, an MCP-tooled agent, a future A2A peer) take action on the platform. This page covers the runtime side of delegation. For the product framing, see Platform → AI Last Mile, Platform → Execution Protocol, and Runtime → MCP Integration.

The Delegated Session

When an external AI wants to act, Runtime opens a delegated session for it. The session has typed identity, a trust tier, a policy snapshot, and a defined lifecycle.

PropertyValue
IdentityTyped external principal id
Trust tierCONTROLLED_LOCAL / USER_ADDED_REVIEWED / ORG_MANAGED / BLOCKED
Policy snapshotFrozen at session open
Lifecycle`OPEN → PAUSED_FOR_APPROVAL → CLOSING → CLOSED

The trust tier shapes the policy snapshot. Approval requirements, sensitivity thresholds, and quarantine triggers all read from the trust tier.

Provider Lifecycle

External provider lifecycle is admitted at runtime:

StateMeaning
REGISTEREDProvider admitted into the system
DISCOVERINGCapability discovery in progress
READYProvider is healthy and reachable
DEGRADEDProvider is reachable with reduced reliability
DISABLEDProvider explicitly disabled
QUARANTINEDProvider quarantined due to drift or policy violation
REMOVEDProvider removed

A provider that drifts (descriptor hash changes mid-session) is moved to QUARANTINED automatically. There is no silent continuation across drift.

Typed Delegation Requests

The external AI sends typed delegation requests:

RequestPurpose
OBSERVEReport an observation
QUERYAsk a typed question
SUGGEST_INTENTPropose an intent
SUGGEST_TOOL_REQUESTPropose a tool call
SUGGEST_PRESENTATIONPropose a presentation update
CREATE_ARTIFACTPropose creating an artifact
CONTROLLED_TESTRun a controlled, sandboxed test

All of these are suggestions or observations, not actions. The result is quarantined evidence; it does not directly mutate state.

The Output Firewall

The result of any external request is not action. It is quarantined evidence that passes through the output firewall before Runtime acts on it.

The firewall validates:

CheckWhat it does
SchemaDoes the result match its declared shape?
ProvenanceWhere did this result come from?
Descriptor hashDoes the principal's declared capability match its current behavior?
Sensitivity classificationUSER_PRIVATE / CREDENTIAL_LIKE / ORG_PRIVATE / REGULATED / UNKNOWN_SENSITIVE
Prompt poisoningHas the result been crafted to manipulate downstream behavior?
Streaming chunk integrityQuarantine streaming chunks until the full envelope is admitted

The firewall is fail-closed admission. Anything that fails any of these checks does not pass.

Firewall Verdicts

The firewall emits one of:

VerdictMeaning
ACCEPTED_OBSERVATIONRuntime may use this as context
ACCEPTED_SUGGESTIONRuntime decides whether to act, ask for approval, or ignore
APPROVAL_REQUIREDSpecifically gated on user approval
QUARANTINEDHeld without further use
REJECTEDRefused outright
PROVIDER_DRIFTEDDescriptor hash does not match expected; session quarantined
SCHEMA_INVALIDSchema validation failed
POLICY_BLOCKEDTrust tier or policy blocks this result

These verdicts are observable to the user (in approval prompts) and to the audit ledger (in lineage records).

Re-authorization For Action

A suggested tool call never directly executes. Runtime re-authorizes and emits a Runtime-owned action with independent audit lineage.

StepOwner
1. External AI proposes (e.g., SUGGEST_TOOL_REQUEST)External AI
2. Output firewall validatesRuntime
3. If approved, Runtime actsRuntime
4. Action's audit lineage references the original suggestionRuntime audit

The action is Runtime-owned, not external-AI-owned. Provenance is mandatory; an external AI can't bypass into the data plane.

Delegated Approval

When the firewall verdict is APPROVAL_REQUIRED, the user (or admitted approver under the policy) must approve before the action proceeds. The approval is recorded as evidence.

Approval flowRuntime
Approval requestSurfaced to user via Desktop
Approval decisionRecorded against the session
ResumeSession resumes from PAUSED_FOR_APPROVAL

Delegated MCP Adapter

Runtime admits MCP (Model Context Protocol) tools as a particular kind of delegated capability. The MCP adapter has its own lifecycle:

PropertyValue
Tool discoveryBounded under MCP adapter contract
AllowlistTools must be allowlisted before use
Token hygienePer-session token rotation
Quarantined gateway evidenceAll tool calls treated as quarantined evidence first

The MCP adapter does not allow pre-firewall consumption — every tool call goes through the output firewall.

Delegated A2A (Future)

A2A (Agent-to-Agent) protocols are admitted as a future seam only. There is no production A2A support today; the seam is admitted to prevent app/Desktop/Avatar/mod bypass shortcuts that would later collide with real A2A.

PropertyValue
Production supportNone
Protocol authority promotionForbidden
Bypass pathsForbidden

Audit And Replay

Every delegation request, every firewall verdict, every action, every approval is recorded in the delegation audit / replay extension on top of K-AUDIT-* storage.

Lineage elementPurpose
Suggestion idLinks to the original delegation request
Firewall verdictRecords what the firewall decided
Approval decisionRecords user/admitted-approver decision
Action lineageLinks to the Runtime-owned action

Replay can reconstruct the chain. There are no silent shortcuts.

Reader Scenario: An External AI Suggests A Tool Call

  1. Suggestion arrives. External AI sends SUGGEST_TOOL_REQUEST with typed tool descriptor.
  2. Firewall validates. Schema, provenance, descriptor hash, sensitivity, prompt poisoning checks.
  3. Verdict. Sensitivity is USER_PRIVATE; trust tier is USER_ADDED_REVIEWED; verdict is APPROVAL_REQUIRED.
  4. Approval prompt. Desktop surfaces the approval prompt to the user.
  5. User approves. Approval is recorded.
  6. Runtime acts. Runtime executes the typed tool action under its own audit lineage.
  7. Audit chain. Lineage links suggestion → verdict → approval → action.

The external AI did not directly press the tool. Runtime did, on the user's behalf.

Reader Scenario: Provider Drift Quarantines A Session

  1. Session active. External AI is in OPEN state.
  2. Mid-session, descriptor changes. The provider's tool descriptor hash differs from session-open value.
  3. Firewall detects drift. Verdict: PROVIDER_DRIFTED.
  4. Provider lifecycle. Provider state moves to QUARANTINED.
  5. Session moves to PAUSED_FOR_APPROVAL or CLOSING per policy.
  6. User sees the reason. "Provider X's descriptor changed mid-session."
  7. No silent continuation. The platform does not pretend the drift did not happen.

Source Basis

Nimi AI open world platform documentation.