Skip to content

Protocol Map

This page is the compact implementation map for the Loops Protocol Stack. Use it when you need to decide which layer owns a behavior, which object carries state, and which contract joins two layers.

Layer Responsibility Map

LayerProtocolOwnsDoes not own
L2HACPHuman-owned work, checkpoints, reviews, artifacts, ledger entries, audit eventsTool transport, model execution loops, raw capability calls
L1AAPAgent discovery, delegation, run lifecycle, block/resume, handoff, correlated eventsHuman review policy, artifact review verdicts, capability implementation
L0CAPCapability manifests, schemas, invocation, structured results, capability errorsAgent planning, task ownership, human approvals

The allowed dependency direction is always downward:

text
HACP (L2) -> AAP (L1) -> CAP (L0)

Lower layers expose capabilities and events. They do not import the business semantics of higher layers.

Protocol Surface Map

ConcernHACPAAPCAP
DiscoveryOptional host-specific task templatesagent.discovercapability.list, capability.describe
Start worktask.create, task.assignagent.delegateNot applicable
Pause workcheckpoint.raiseagent.blockInvocation timeout or error only
Resume workcheckpoint.resolveagent.resumeNot applicable
Transfer workownership.transferagent.handoffNot applicable
Produce outputartifact.commitrun.completed eventcapability.invoke result
Review outputreview.open, review.submitEmits correlated run eventsNot applicable
Auditaudit.query, audit.replayCorrelated run event streamStructured invocation result and error records

Object Ownership Map

ObjectOwnerStable identityMutability rule
TaskHACPtask_idState changes are explicit transitions; task spec is immutable.
CheckpointHACPcheckpoint_idResolution is append-only and auditable.
OwnershipHACPTask-scoped ownership chainTransfers append records; history remains visible.
ReviewHACPreview_idSubmitted reviews are immutable.
ArtifactHACPartifact_id plus versionVersions are immutable; new content creates a new version.
RunAAPrun_idState follows AAP transitions; correlation_id is stable.
CapabilityCAP(capability_id, version)Manifests are versioned; invocation results are records.

Layer Contract Map

These four contracts are required for full-stack interoperability.

ContractRuleEvidence
CapabilityRefUpper layers reference capabilities only by (capability_id, version).HACP task constraints and AAP invocation plans contain no transport endpoints.
TaskID correlationHACP Task.id MUST equal AAP Run.correlation_id.Every AAP run event for the task carries the same correlation id.
Checkpoint-to-Blockcheckpoint.raise MUST block the AAP run; checkpoint.resolve MUST resume it.Audit replay shows the checkpoint and run state transition as one logical pause.
Ownership-to-Handoffownership.transfer MUST preserve correlation through AAP handoff.The new run uses the original TaskID as correlation_id.

End-to-End Flow

text
Human principal
  -> HACP task.create
  -> HACP task.assign
  -> AAP agent.delegate(correlation_id = TaskID)
  -> AAP run.started
  -> CAP capability.invoke(CapabilityRef)
  -> AAP run.progress
  -> HACP checkpoint.raise
  -> AAP agent.block
  -> HACP checkpoint.resolve
  -> AAP agent.resume
  -> HACP artifact.commit
  -> HACP review.submit
  -> HACP audit.replay

The flow is conforming only if the same task identity can be followed from human assignment through agent execution, capability use, checkpoint handling, artifact review, and audit replay.

Implementation Boundaries

If you are building...Implement firstThen prove
A capability sourceCAPCapabilities have stable ids, schemas, structured results, and typed errors.
An agent runtimeAAPRuns are discoverable, delegateable, blockable, resumable, handoff-capable, and correlated.
A collaboration platformHACPTasks, checkpoints, reviews, artifacts, ledger entries, and audit events are first-class records.
A complete Loops stackCAP -> AAP -> HACPThe four layer contracts hold in a replayable end-to-end trace.

Conformance Shortcut

A system may claim a single layer without implementing the whole stack. A system must not claim full Loops stack compatibility unless it satisfies CAP, AAP, HACP, and every layer contract listed on this page.

Use Conformance for normative requirements and Inter-layer Contracts for deeper contract examples.

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