OCP is an open file format for agent orchestration runs. One JSON document records one run: the work graph, every attempt with its harness, model, reasoning effort and token cost, and each outcome with the evidence behind it. Tools that run agents write it. Tools that price, compare or learn from runs read it.

Read the specification

Version 0.3, its JSON Schema, and the numbered rules a checker enforces.

Quickstart

Write a first document and validate it.

Examples

One run per workflow shape, and a pass and a fail file for every rule.

This is an OCP document

A review sent the first attempt back, and the second attempt passed the tests. The values are made up; the checker output is real.
run.ocp.json
What it records
  • Five parts are required: ocp, producer, privacy, run and nodes. Everything else is optional and typed.
  • Two units of work, implement and review, joined by a dep edge whose evidence tier says how the edge is known.
  • Three attempts. A retry is a new attempt whose cause points back at what triggered it, here the review.
  • Each attempt names its harness, its model as the tool knew it, and its reasoning effort as a separate field.
  • Cost is per attempt, with cached input kept apart from uncached input because they are priced an order of magnitude apart. basis says the counts were measured, not apportioned.
  • Each outcome says how it is known: the rejection was reported by the review, the acceptance verified by the tests.
  • metadata_only: no prompt, completion or transcript text anywhere in the file.
Terminal

Why a format for runs

Every agent tool logs runs in its own shape. Comparing two workflows, pricing a run or learning which setup works for which task means a parser per tool, and most logs miss the three facts that matter: which attempt spent which tokens, why a retry happened, and whether the result was accepted. OCP fixes that shape once, so a tool implements one writer and every reader can use its runs.

Cost per attempt

Tokens split into uncached input, cached input, cache writes and output (with its reasoning share), summed per attempt and marked as measured or allocated. Dollars are optional and carry the price table they came from.

Acceptance with evidence

Every edge and every inferred label carries an evidence tier: verified by a check, inferred by a heuristic, or reported. An outcome may say how it is known too, down to merely asserted, which is how one without evidence counts. A tier is never upgraded without new evidence.

Private by default

Every document declares a privacy profile. Under metadata_only it keeps structure, models, tokens and verdicts, and no prompt, completion or transcript text.

What a document holds

Who writes and reads OCP

loopmath, the reference implementation

Stores every run it records as an OCP 0.3 document, reads them to predict success and cost for the next task, and validates and migrates any OCP file. Open source, MIT.

Your tool

How the records of common agent tools and frameworks map onto OCP 0.3, what each can fill, and where an exporter hooks in.

Stable by design

A reader accepts 0.1, 0.2 and 0.3 documents and ignores fields it does not know, at every level. 0.3 is a strict superset of 0.2: every field 0.3 adds is optional. 0.2 is not a superset of 0.1, because 0.2 requires tier on every edge, so a 0.1 document needs loopmath ocp migrate, which writes the 0.3 form. A field is removed only after a deprecation notice that names its replacement and stays in the specification for at least two minor versions. See Versioning.
OCP is open source under the MIT license and maintained in the open by the loopmath project. Anyone can propose a change; see Governance and Proposals.

Privacy