Docs

Getting started with CommandLayer

Four pieces work together on top of x402 and ERC-8004: Commons verbs, Commercial verbs, Agent Cards, and the Runtime execution layer. This page shows how to call a verb, validate payloads, describe your own agent, and see how everything lines up.

  • Use Commons verbs as your baseline machine-intent grammar.
  • Layer in Commercial verbs for economic flows over x402.
  • Bind agents to ENS and entrypoints with Agent Cards.
  • Rely on Runtime for execution, guarantees, and economics — while schemas stay free.
Protocol v1.0.0 Commons v1.0.0 · MIT · schemas free Commercial v1.0.0 · Apache-2.0 Agent Cards v1.0.0 · Apache-2.0 Runtime coming online · BUSL · execution layer

How the pieces fit together

CommandLayer doesn’t compete with x402 or ERC-8004 — it completes the stack by defining machine intent. Commons and Commercial verbs give you the vocabulary, Agent Cards bind that vocabulary to agents, and Runtime turns it into execution and guarantees.

Commons verbs

Universal verbs like summarize, analyze, parse, and fetch. Each has a strict *.request and *.receipt JSON Schema you can plug into any agent.

Commercial verbs

Economic flows — authorize, checkout, purchase, ship, verify — designed to sit on x402 rails and tie into payments, fulfillment, and risk.

Agent Cards & Runtime

Agent Cards bind ENS names to verbs, schema versions, and x402 entrypoints. Runtime endpoints execute those verbs with receipts and guarantees, while the verb language and schemas stay free and stable.

What you can do right now

Use CommandLayer as the language contract between clients and agents — the piece that standardizes exit names, request shapes, and receipts on top of x402 and ERC-8004.

One simple flow to start

The fastest way in is to wire a single Commons verb. The pattern is always the same: pick a verb, shape a request, validate, send, and check the receipt.

  • Pick a Commons verb (e.g. summarize) from Commons.
  • Take its *.request and *.receipt schemas as your contract.
  • Validate payloads against the pinned, free schemas with any JSON Schema 2020-12 validator.
  • Describe your agent with an Agent Card so it can be discovered and routed to by x402 / ERC-8004-aware registries.
  • As x402 rails and Runtime endpoints come online, you keep the same contracts — only the execution layer changes.

Example: calling summarize

A typical integration: the client builds a summarize.request payload, validates it against the Commons schema, sends it to an agent endpoint, and receives a summarize.receipt. The same pattern applies to every Commons verb.

1. Inspect the schemas

Both schemas are public and versioned under https://commandlayer.org/schemas/v1.0.0/commons/summarize/:

All Commons schemas follow the same pattern: /schemas/v1.0.0/commons/<verb>/requests/<verb>.request.schema.json and /schemas/v1.0.0/commons/<verb>/receipts/<verb>.receipt.schema.json.

2. Validate before sending

In Node.js with Ajv (example only — any JSON Schema 2020-12 validator works):

import Ajv from "ajv";

const ajv = new Ajv({ strict: true });

const schema = await fetch(
  "https://commandlayer.org/schemas/v1.0.0/commons/summarize/requests/summarize.request.schema.json"
).then(r => r.json());

const validate = ajv.compile(schema);

if (!validate(payload)) {
  console.error("Invalid summarize.request", validate.errors);
}

3. Send & receive a receipt

Where you send the request depends on the agent. When reference agents are available, you’ll typically hit an x402-compatible HTTP endpoint listed in an Agent Card.

const res = await fetch("https://<agent-endpoint>/summarize", {
  method: "POST",
  headers: {
    "content-type": "application/json"
  },
  body: JSON.stringify(payload)
});

const receipt = await res.json();
// validate against summarize.receipt.schema.json

Defining your own Agent Card

If you operate an agent and want others to discover and call it, you describe it with an Agent Card JSON file and host it at a stable URL under your control.

Commons agent template

For Commons agents, cards live under: /agent-cards/v1.0.0/commons/<ens>.json

{
  "ens": "summarizeagent.eth",
  "owner": "commandlayer.eth",
  "contact": "dev@commandlayer.org",
  "verbs": [
    {
      "name": "summarize",
      "schema_version": "1.0.0",
      "tier": "commons"
    }
  ],
  "x402": [
    {
      "network": "eip155:1",
      "entry": "x402://summarizeagent.eth/summarize/v1"
    }
  ]
}

Commercial agents follow the same pattern under /agent-cards/v1.0.0/commercial/<ens>.json, with verbs such as authorize, checkout, purchase, ship, and verify.

Where to go next

You don’t need the whole stack to start. One verb + its schemas is enough. As x402 and ERC-8004 roll out, the same vocabulary scales across more agents, networks, and payment rails.

  • Browse the verb set on Commons.
  • Review the economic verbs on Commercial.
  • See how Agent Cards are laid out on Agent Cards.
  • Try the live flows on Live Demo.
  • Wire a single verb into your stack, validate against the schema, and treat everything else as optional until you need it.