Skip to content

AAP — Agent-Agent Protocol Profile

FieldValue
Version0.1.0-draft
StatusDraft
LayerL1, middle layer of the Loops Protocol Stack
Document typeConformance profile
Primary concernAgent discovery, delegation, blocking, and handoff

AAP defines the minimum L1 surface required for agent-to-agent coordination in the Loops Protocol Stack.

AAP is not a new agent transport protocol. A2A, ACP, AGNTCY, and custom agent meshes may satisfy this profile if they expose the required semantics and preserve the Loops inter-layer contracts.

Normative keywords follow RFC 2119.

Scope

AAP governs:

  • Agent discovery by capability.
  • Asynchronous delegation to another agent.
  • Run handles and run state.
  • Blocking and resuming a run for HACP checkpoints.
  • Handoff from one agent to another.
  • Correlated event streams.

AAP does not govern:

  • How an agent internally plans or executes.
  • How humans review work; that is HACP.
  • How tools and skills are invoked; that is CAP.
  • Host platform lifecycle, identity, billing, or placement.

Core Primitives

PrimitiveMeaningRequired for
discoverFind agents by capability or tagsRouting work
delegateStart an asynchronous run on another agentHACP task assignment and subdelegation
blockPause a run pending external decisionHACP checkpoint gating
resumeContinue a blocked run with resolution dataHACP checkpoint resolution
handoffTransfer execution context to another agentHACP ownership transfer

Agent

yaml
Agent:
  agent_id: string
  capabilities: [CapabilityRef]
  manifest: AgentManifest

An agent is an execution unit that can accept delegated work. It declares capabilities through CAP CapabilityRef values.

AgentCard

yaml
AgentCard:
  agent_id: string
  name: string
  description: string
  capabilities: [CapabilityRef]
  endpoint: string
  protocol: "a2a" | "acp" | "agntcy" | string

Rules:

  • AgentCard MUST be discoverable through agent.discover.
  • endpoint is transport-specific and MUST NOT be exposed upward to HACP.
  • capabilities MUST use CAP CapabilityRef values.

Run

yaml
Run:
  run_id: string
  agent_id: string
  correlation_id: string
  state: "running" | "blocked" | "completed" | "failed"
  created_at: timestamp

correlation_id is the key L1-to-L2 contract. For HACP-originated work, Run.correlation_id MUST equal Task.id.

Discovery

yaml
agent.discover(query: DiscoveryQuery) -> [AgentCard]

DiscoveryQuery:
  capability: CapabilityRef | null
  tags: [string] | null

Rules:

  • A conforming L1 MUST support agent.discover.
  • Results MUST include enough endpoint data for the L1 runtime to reach the target agent.
  • HACP callers MUST NOT depend on endpoint details.

Delegation

yaml
agent.delegate(req: DelegateRequest) -> Run

DelegateRequest:
  to_agent: agent_id
  task_id: string
  capability: CapabilityRef
  input: object
  parent_run: run_id | null

Rules:

  • delegate MUST return a Run handle without waiting for completion.
  • DelegateRequest.task_id MUST become Run.correlation_id.
  • If delegation fails after the run is created, the implementation MUST emit run.failed.
  • If the target agent does not support the requested capability, the implementation MUST return CAPABILITY_NOT_SUPPORTED.

Block and Resume

yaml
agent.block(run_id, reason: string, checkpoint_id: string) -> void
agent.resume(run_id, resolution: object) -> void

Rules:

  • block MUST include checkpoint_id.
  • A blocked run MUST NOT resume itself.
  • resume MUST carry the HACP checkpoint resolution payload.
  • Invalid state transitions MUST return INVALID_TRANSITION.

Handoff

yaml
agent.handoff(run_id, to_agent: agent_id, context: object) -> Run

Rules:

  • Handoff creates a new run for the receiving agent.
  • The new run MUST preserve the original correlation_id.
  • The old run SHOULD remain available as read-only history.
  • Handoff is the AAP expression of HACP ownership transfer.

Event Stream

Conforming L1 implementations MUST emit run events.

yaml
AgentEvent:
  run_id: string
  correlation_id: string
  type: AgentEventType
  payload: object
  at: timestamp

AgentEventType:
  "run.started" | "run.progress" | "run.blocked" |
  "run.completed" | "run.failed"

Rules:

  • Every event MUST include correlation_id.
  • run.blocked MUST identify the HACP checkpoint when the block came from a checkpoint.
  • AAP events SHOULD be replayable for debugging and audit correlation.

Errors

CodeMeaning
AGENT_NOT_FOUNDTarget agent does not exist or is unavailable
CAPABILITY_NOT_SUPPORTEDTarget agent does not declare the requested capability
DELEGATION_REFUSEDTarget agent refused delegated work
RUN_NOT_FOUNDRun id is invalid
INVALID_TRANSITIONRun state transition is invalid

Reference Mappings

AAP profile requirementA2A-style mapping
agent.discoverAgent card discovery
agent.delegateAsynchronous task send
RunTask or run handle
AgentEventTask status updates
correlation_idTask metadata or extension field

ACP and AGNTCY-style runtimes may also conform if they expose the same semantics and preserve correlation.

Inter-layer Contracts

AAP to HACP

HACP operationAAP actionRequirement
task.assignagent.delegateTaskID MUST become Run.correlation_id
checkpoint.raiseagent.blockcheckpoint_id MUST be provided
checkpoint.resolveagent.resumeResolution MUST be passed through
ownership.delegateagent.delegateParent run SHOULD remain traceable
ownership.transferagent.handoffCorrelation MUST be preserved

AAP to CAP

AAP calls capabilities through CAP CapabilityRef. It MUST NOT depend on the capability transport.

yaml
CapabilityRef:
  capability_id: "cap:code-review"
  version: "2.1.0"

Conformance

An implementation claiming AAP 0.1.0-draft compatibility MUST:

  1. Support agent.discover, agent.delegate, agent.block, agent.resume, and agent.handoff.
  2. Maintain the run states running, blocked, completed, and failed.
  3. Include correlation_id on every run and run event.
  4. Preserve HACP TaskID as Run.correlation_id.
  5. Emit the required event stream.
  6. Use the defined error semantics.

An implementation MAY choose the underlying transport, mesh topology, authentication scheme, retry policy, and hosting model.

Open Issues

IssueDraft stance
Agent mesh topologyBrokered and decentralized designs may both conform.
Delegate timeout and retryHost-defined; no default retry in the profile.
Concurrent delegation limitsHost-defined.
Agent trust and authenticationHost platform responsibility.
Old run visibility after handoffRead-only historical visibility is recommended.
Multi-agent coordination beyond pairsNot standardized in this draft.

Changelog

VersionDateChange
0.1.0-draft2026-06-19Initial L1 conformance profile for agent-to-agent coordination.

Loops Protocol Stack · loop0 owns execution · loop1 owns interaction · loop2 owns coordination