Proposed spec to share SKILL and "loop"/"Workflow" by OCI registry A proposed specification defines Agent Loops as portable YAML contracts for orchestrating agentic work, packaged and distributed via OCI Artifacts for versioned, signed, and reproducible execution across registries. The spec aims to replace fragile copy-paste workflows with a standard, registry-agnostic mechanism for sharing agent orchestration definitions. Version: 0.1.0 Status: Draft Date: 2026-07-16 License: Apache-2.0 This document defines Agent Loops: portable YAML contracts for orchestrating agentic work through declared inputs, phases, actions, completion criteria, outputs, transitions, and escalation rules. It also specifies a standard method for packaging, distributing, signing, discovering, pinning, caching, and executing Agent Loop definitions using OCI Artifacts. It defines the loop document format, execution model, media types, manifest structure, config metadata, annotation conventions, collection indexes, project manifest files, lock files, local cache layout, and supply-chain security expectations required for interoperable loop sharing across any OCI-compliant registry. This specification is inspired by, and intentionally aligned with, the Agent Skills OCI Artifacts Specification. The agentkit CLI is one implementation of this specification; the specification is the source of truth. - Introduction - 1.1 Motivation - 1.2 Design Goals - 1.3 Relationship to Agent Skills OCI Artifacts - 1.4 Notational Conventions - Glossary - Agent Loop Document Format - 3.1 Top-Level Structure - 3.2 Metadata - 3.3 Inputs - 3.4 Dependencies - 3.5 Phases - 3.6 Transitions - 3.7 Escalation - 3.8 Execution Model - Media Types - Individual Loop Artifact - 5.1 OCI Manifest Structure - 5.2 Config Object Schema - 5.3 Layers - 5.4 Annotations - 5.5 Tagging Conventions - Loop Collection Artifact - 6.1 OCI Image Index Structure - 6.2 Collection Annotations - Loops Manifest File - 7.1 Purpose - 7.2 File Location - 7.3 Schema - Lock File - 8.1 Purpose - 8.2 File Location - 8.3 Schema - 8.4 Update Check Workflow - Local Cache and Execution Layout - Supply-Chain Security - Registry Compatibility - Reference Implementation - Future Considerations - Acknowledgments Agent Loops are reusable orchestration contracts for agentic work. A loop definition describes the objective, required inputs, phases, phase actions, completion criteria, outputs, transitions, and escalation policy an agent should follow. The loop format is intentionally file-based and human-readable, centered on a YAML document with apiVersion: agent-loops.dev/v1alpha1 and kind: AgentLoop . Without a standard distribution mechanism, loops are copied between repositories, pasted into prompts, or fetched from Git paths. That works for experimentation, but it becomes fragile once teams need versioned workflows, digest pinning, private registries, provenance, mirroring, and repeatable execution across projects. OCI Artifacts provide a registry-agnostic packaging layer for arbitrary content. They let loop authors publish small, non-container artifacts to registries that organizations already know how to operate, mirror, authenticate, scan, sign, and audit. A loop artifact does not require a container runtime. Clients can use ORAS-compatible libraries to push, pull, inspect, and verify loop packages. - Registry agnostic. Loop artifacts MUST be storable in and retrievable from any OCI-compliant registry without registry-specific extensions. - Content addressable. Every published loop artifact MUST be identifiable by an immutable digest. Tags are convenience pointers; digests are the source of reproducibility. - Transparent packaging. Pulling a loop artifact MUST yield a conforming Agent Loop YAML document. OCI packaging MUST NOT change the loop execution contract defined by this specification. - Inspectable before execution. Clients SHOULD be able to inspect loop metadata from the OCI manifest and config before downloading or executing the YAML layer. - Signable and attestable. It MUST be possible to sign loop artifacts and attach provenance, validation, evaluation, or security attestations using standard OCI referrers. - Deterministic execution. A lock file records the exact digest for each loop and skill dependency so a project can reproduce the same dependency set later. - Minimal client burden. A conforming client needs only OCI Distribution support plus YAML validation against the Agent Loop schema. This specification follows the same architectural pattern as Thomas Vitale's Agent Skills OCI Artifacts Specification https://github.com/ThomasVitale/agents-skills-oci-artifacts-spec : - define a portable agent-facing format first; - use OCI manifests and artifacts only as the distribution layer; - expose useful metadata through config blobs and annotations; - model collections as OCI image indexes; - use project-local manifest and lock files for repeatability; - rely on OCI referrers for signatures and attestations. Agent Loops and Agent Skills are complementary but different primitives. A skill teaches an agent how to perform a class of work. A loop orchestrates a bounded run through phases, inputs, outputs, transitions, and escalation rules. Because the payload semantics differ, loop artifacts SHOULD use their own media types, config schema, annotations, manifest file, and lock file. Clients MAY support both specifications side by side. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119. Loop : A YAML document conforming to the Agent Loop schema defined by this specification. Loop Artifact : An OCI Artifact that packages one loop document and metadata. Loop Collection : An OCI Image Index that references a curated set of Loop Artifacts by digest. Loops Manifest : A project-local loops.json file declaring loop dependencies by OCI references. Lock File : A project-local loops.lock.json file recording resolved digests for deterministic pulls and update checks. Orchestrator : The agent or tool responsible for resolving inputs, running phases, recording outputs, following transitions, and escalating decisions. Referrers API : The OCI Distribution API mechanism used to discover signatures, attestations, and other artifacts attached to a loop artifact. An Agent Loop document is a YAML object that conforms to the structure in this section. JSON representations MAY be used by tooling, but YAML is the canonical authoring and interchange format for loop content layers. An Agent Loop document MUST contain: | Field | Type | Required | Description | |---|---|---|---| apiVersion | string | REQUIRED | MUST be agent-loops.dev/v1alpha1 for this specification version. | kind | string | REQUIRED | MUST be AgentLoop . | metadata | object | REQUIRED | Stable identity and human-facing metadata. | spec | object | REQUIRED | Loop objective and declared inputs. | phases | array | REQUIRED | Ordered phase definitions. MUST contain at least one phase. | escalation | object | OPTIONAL | Root escalation policy and required escalation inputs. | metadata MUST contain: | Field | Type | Required | Description | |---|---|---|---| name | string | REQUIRED | Stable machine-readable loop name. | version | string | REQUIRED | Loop version. Semantic versioning is RECOMMENDED. | title | string | REQUIRED | Human-readable title. | description | string | REQUIRED | Human-readable description of the loop purpose. | spec MUST contain: | Field | Type | Required | Description | |---|---|---|---| objective | string | REQUIRED | Overall loop objective. | inputs | object | REQUIRED | Named input definitions required or accepted by the loop. | dependencies | object | OPTIONAL | Other loops and Agent Skills required by this loop. | Each input definition MUST include: | Field | Type | Required | Description | |---|---|---|---| type | string or single-item array | REQUIRED | One of string , number , boolean , object , or an array containing one of those values. | required | boolean | REQUIRED | Whether the orchestrator must resolve the input before execution. | description | string | REQUIRED | Human-readable input description. | spec.dependencies declares external Agent Loops and Agent Skills the orchestrator must make available before executing the loop. Dependencies are part of the loop contract: they describe the capabilities or sub-loops the author expects the orchestrator to have, but they do not inline or vendor those dependencies into the loop document. spec.dependencies MAY contain: | Field | Type | Required | Description | |---|---|---|---| loops | array | OPTIONAL | Agent Loop artifacts required by this loop. | skills | array | OPTIONAL | Agent Skill artifacts required by this loop. | At least one of loops or skills MUST be present when dependencies is defined. Each loop dependency MUST contain: | Field | Type | Required | Description | |---|---|---|---| name | string | REQUIRED | Local dependency name used by the orchestrator. | ref | string | REQUIRED | OCI reference for the dependency. MUST use standard OCI reference syntax with a tag registry/repository:tag , digest registry/repository@