Outcall
SpecificationsS004 · Agent API

S004 · Agent API

Specification module 004-agent-api

S004: Agent API

FieldValue
SpecS004
FeatureAgent API
Date2026-04-21
StatusImplemented
Author@marktopper

Overview

The Agent API is the restricted container-facing communication surface for the optional outcall-agent command shim. It is served on a Unix domain socket (agent.sock) mounted only when helper mounts are enabled. Through this socket, shim processes check in, request command or probe verdicts, submit rule requests for host operator approval, and query their status.

The Agent API enforces a strict trust boundary: containers see only verdicts and request acknowledgements. They never receive rule definitions, policy internals, host configuration, or any information about other containers. All shim-requested evaluation happens host-side before the shim executes a command. Mandatory recipe egress enforcement is the bridge/proxy/DNS boundary in S015 and does not depend on shim adoption.

If the agent socket is unreachable during an explicit shim invocation, outcall-agent exits with code 5. There is no fallback or degraded mode.

User Scenarios

S004-US-001 [P1] As an AI agent, I want to check in with outcalld so that I receive my container identity and policy context before doing any work.

S004-US-002 [P1] As an AI agent, I want to request permission before executing a tool so that outcalld can evaluate rules and return a verdict.

S004-US-003 [P1] As an AI agent, I want to request permission before making a network call so that outcalld can evaluate rules and return a verdict.

S004-US-004 [P2] As an AI agent, I want to submit a rule request so that a host operator can approve new capabilities for my container.

S004-US-005 [P2] As an AI agent, I want to query the status of a pending rule request so that I know whether to proceed or wait.

S004-US-006 [P1] As a host operator, I want the agent API to enforce a strict trust boundary so that agents cannot access host-side configuration or rule definitions.

Requirements Summary

IDTypePriorityTitleStatus
S004-FR-001FunctionalP1Socket created by outcalldImplemented
S004-FR-002FunctionalP1Socket path conventionImplemented
S004-FR-003FunctionalP1Socket lifecycle tied to daemonImplemented
S004-FR-004FunctionalP1Agent check-in endpointImplemented
S004-FR-005FunctionalP1Container identity verificationImplemented
S004-FR-006FunctionalP1Permission request endpointImplemented
S004-FR-007FunctionalP1Verdict response formatImplemented
S004-FR-008FunctionalP1Host-side rule evaluationImplemented
S004-FR-009FunctionalP1Fail-closed on unreachableImplemented
S004-FR-010FunctionalP1No policy leakageImplemented
S004-FR-011FunctionalP2Rule request submissionImplemented
S004-FR-012FunctionalP2Rule request status queryImplemented
S004-FR-013FunctionalP1Context variables with requestsImplemented
S004-FR-014FunctionalP2Rate limitingImplemented
S004-FR-015FunctionalP1Request timeout behaviorImplemented
S004-FR-016FunctionalP1Structured loggingImplemented
S004-FR-017FunctionalP1Typed errorsImplemented
S004-FR-018FunctionalP1Tokio task integrationImplemented
S004-FR-019FunctionalP1Separate from host APIImplemented
S004-AS-001AcceptanceP1Check-in happy pathImplemented
S004-AS-002AcceptanceP1Permission grantedImplemented
S004-AS-003AcceptanceP1Permission deniedImplemented
S004-AS-004AcceptanceP1Fail closed on socket missingImplemented
S004-AS-005AcceptanceP1Fail closed on daemon crashImplemented
S004-AS-006AcceptanceP2Rule request submittedImplemented
S004-AS-007AcceptanceP2Rule request status polledImplemented
S004-AS-008AcceptanceP1No cross-container leakageImplemented
S004-AS-009AcceptanceP1Context variables forwardedImplemented
S004-AS-010AcceptanceP2Rate limit enforcedImplemented
S004-AS-011AcceptanceP1Request timeout respectedImplemented
S004-IF-001InterfaceP1POST /v1/checkinImplemented
S004-IF-002InterfaceP1POST /v1/permissions/checkImplemented
S004-IF-003InterfaceP2POST /v1/requests/rulesImplemented
S004-IF-004InterfaceP2GET /v1/requests/rules/{id}Implemented
S004-IF-005InterfaceP1Error response formatImplemented
S004-EC-001Edge CaseP1Socket missing at startupImplemented
S004-EC-002Edge CaseP1Daemon crashes mid-requestImplemented
S004-EC-003Edge CaseP1Malformed request bodyImplemented
S004-EC-004Edge CaseP2Duplicate check-inImplemented
S004-EC-005Edge CaseP1Unknown container IDImplemented
S004-EC-006Edge CaseP2Rate limit exceededImplemented
S004-EC-007Edge CaseP1Request timeout exceededImplemented
S004-EC-008Edge CaseP1Host socket access attemptedImplemented
S004-EC-009Edge CaseP2Rule request for existing ruleImplemented
S004-EC-010Edge CaseP1Oversized request bodyImplemented
S004-SC-001SuccessP1Agent completes check-inImplemented
S004-SC-002SuccessP1Permission flow round-tripImplemented
S004-SC-003SuccessP1Fail-closed verifiedImplemented
S004-SC-004SuccessP1Trust boundary holdsImplemented
S004-SC-005SuccessP2Rule request lifecycleImplemented

Cross-Spec Dependencies

  • Depends on: S001 for the managed outer network boundary
  • Depends on: S003 (rule evaluation happens host-side via the rule engine)
  • Required by: S005, S008

On this page