design draft

63. Every step is an event

Status: unimplemented — design draft. This chapter is a plan for the owner to edit. It ships no code yet, and paths marked planned do not exist.

Premise

This chapter builds no new mechanism. It goes back over chapters 1 to 61 and shows that each step is already an event of a named kind. Once that is true, the agent is not an application we own. It is a protocol anyone can speak.

Draft

The general-agent essay puts it in five words: the protocol is the agent.

Take one request through the book. The message and the front's typed judgment are a conversation job and a decision. The members it could go to are described as capabilities, and their code is a release in the registry. The grant is its own record. The run has a journal, and its steps are a trajectory. The measurement of a member is an evaluation report. A second person's rerun is a check. Outside tests give a validation. The decision to make it a default is an adoption. The points for that work are awards. The paid call has a payment and a receipt.

Every one of those is a signed event with a published format. The format has two layers. A NIP says what the event looks like on a relay. A message in `proto/` says what the record is, whichever way it travels. The protocol spec's [kind registry](../../docs/protocol/openagents-protocol-spec.md#121-kind-registry--package) pairs each event kind with the one message that owns it. Episode 288 points at the list and says that a developer can read these documents today, point an agent at them and take part. There are 37 OpenAgents NIPs in the repository now.

The consequence is in Episode 289: other projects may adapt and adopt this, "like little other universes all going, and we're all speaking the same open data protocol". A second team can write its own front, run its own relay and ship its own defaults. Its members and ours are the same releases, its evidence counts for ours, and its authors are paid the same way.

The essay is careful about gaps, and this chapter keeps the list. Some steps have no public event yet. One example is the admission of a member to a single private turn. A step with no carrier is a place where you still have to trust the application.

A second kind of gap is in the code. Most of these messages are still sketches in the spec, and the JSON is written by hand, sometimes in more than one place. Chapter 66 gives the rule that closes those.

What we build

A plan for what this chapter ships once the draft is approved:

  • A table from every step in this book to the message that defines it, the NIP and event kind that carry it, and its other carriages. The table below is the start, and the spec's [carriage table](../../docs/protocol/openagents-protocol-spec.md#82-carriage-table-for-the-major-records) is the model.
  • A second, small reader that uses only public events to rebuild one agent's member list and the evidence for each member.
  • A list of steps that have no carrier yet, each with an issue.

It builds on what exists today:

On the protocol (chapter 65):

StepMessageEventChapter
Message and replyopenagents.chat.v1 ConversationRequest, ConversationResultKinds 25900, 269009
Decisionopenagents.decision.v1 SystemOneRequestKind 259105
Member descriptionopenagents.capability.v1 DefinitionKind 301803
Releaseopenagents.extension.v1 ReleaseKind 318438
Grantopenagents.capability.v1 GrantIn a kind 3188 envelope7
Run journalopenagents.run.v1 RunRecordKind 31878
Trajectoryopenagents.trace.v1 Manifest, ChunkKinds 3198, 31998
Report, check and validationopenagents.eval.v1 PublicationKind 318929, 31, 32
Adoptionopenagents.policy.v1NIP-POL, in a kind 3188 envelope33
Awardopenagents.xp.v1 AwardKind 319334
Paymentopenagents.x402.v1 PaymentRequired, PaymentPayloadIn a kind 3188 envelope; also an HTTP 402 body40
Receiptopenagents.receipt.v1 ExecutionReceiptInside kinds 3204 and 320141

Today the decision message has a schema file, in use on the server, and the rest are sketches in the spec. Each chapter's own table gives the status.

The chapter's check

  • Source: openagents/book/PROTOCOL.md and the small second reader, run on a recorded set of public events for one agent: its member descriptions, releases and evaluation publications.
  • Trace: the reader rebuilds the agent's member list. It prints one line per member with its release hash, then each piece of evidence with its event kind and ID.
  • Refusal: an event with a bad signature or a kind the table does not list is skipped, and the reader prints its ID and the reason. A step with no carrier prints as a gap with its issue number, never as covered.
  • Independent check: each row of the table is compared with the spec's kind registry, and the reader's input includes events from vector writers built from the NIPs alone: `dec_eval_vectors.py`, `ext_release_vectors.py` and `xp_mv_vectors.py`.

Planned paths: openagents/book/PROTOCOL.md.

Sources

Open questions for the owner

  1. Which gaps do we close before 1.0, and which do we ship with and name?