Skip to content

commandlayer/commandlayer-org

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

743 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

commandlayer-org

Agents don’t make claims — they produce proof. Wrap → sign → verify. CommandLayer turns any agent action into a signed, verifiable receipt. VerifyAgent.eth is the public verifier for receipts produced by ENS-named agents.

Shipped proof flow

Core flow

Agent action
→ SDK wraps action
→ signed receipt is emitted with ENS identity
→ VerifyAgent resolves signer identity from ENS and verifies receipt
→ VERIFIED or INVALID

If the output changes, the proof breaks.

Repos

  • agent-sdk: wrap any agent action and emit a signed receipt
  • verifyagent: reference verifier and tamper-detection demo
  • commandlayer-org: hosted UI, public APIs, and docs

Developer quickstart

import { CommandLayer } from "@commandlayer/agent-sdk";

const cl = new CommandLayer({
  agent: "runtime.commandlayer.eth",
  privateKey: process.env.CL_PRIVATE_KEY_PEM,
  keyId: "vC4WbcNoq2znSCiQ"
});

const result = await cl.wrap("summarize", async () => {
  return { summary: "hello world" };
});

const verified = await cl.verify(result.receipt);
console.log(verified.status);

Public verification APIs

1) POST /api/verify

Purpose: Verifies a raw CommandLayer receipt.

Request: Raw receipt JSON.

Response:

{
  "ok": true,
  "status": "VERIFIED",
  "reason": "Receipt verification passed.",
  "signer": "runtime.commandlayer.eth",
  "verb": "agent.execute",
  "hash": "...",
  "hash_matches": true,
  "signature_valid": true,
  "ens_resolved": true,
  "key_id": "..."
}

2) POST /api/agents/verifyagent

Purpose: Callable VerifyAgent.eth endpoint for agent-to-agent or app-to-agent verification.

Request:

{
  "receipt": { "...": "CommandLayer receipt" }
}

Response:

{
  "agent": "verifyagent.eth",
  "action": "verify_receipt",
  "ok": true,
  "status": "VERIFIED",
  "result": {
    "reason": "Receipt verification passed.",
    "hash_matches": true,
    "signature_valid": true,
    "ens_resolved": true
  }
}

VerifyAgent.eth does not execute the original task. It verifies whether a submitted receipt is valid or tampered.

cURL examples

curl -X POST https://www.commandlayer.org/api/verify \
  -H "Content-Type: application/json" \
  --data-binary @public/examples/sample-receipt.json
printf '{"receipt":' > verifyagent-body.json
cat public/examples/sample-receipt.json >> verifyagent-body.json
printf '}' >> verifyagent-body.json

curl -X POST https://www.commandlayer.org/api/agents/verifyagent \
  -H "Content-Type: application/json" \
  --data-binary @verifyagent-body.json

What verification checks

  • canonical JSON payload using json.sorted_keys.v1
  • SHA-256 hash matches metadata.proof.hash_sha256
  • Ed25519 signature validates
  • signer identity and verification metadata resolve from ENS (cl.sig.pub, cl.sig.kid, cl.sig.canonical, cl.receipt.signer)
  • tampered input/output returns INVALID

VerifyAgent resolves signer keys from ENS TXT records. For the hackathon demo, runtime.commandlayer.eth is supported via a labeled fallback resolver that mirrors the ENS record structure. The verification flow is designed to operate against live ENS records.

Scope

CommandLayer focuses on a single primitive: verifiable agent execution.

Every action produces a signed receipt. Every receipt can be independently verified.

The current public demo focuses on this proof loop.

Local development

Install

npm install

Run locally

vercel dev

If you use another local workflow, keep the site static-first and preserve published URL paths.

Deployment note

Published URLs are part of the protocol surface.

Do not rename or move stable public paths for:

  • docs pages
  • schema URLs
  • Agent Card URLs
  • demo surfaces

CommandLayer is designed for ENS-named agents to be verifiable and discoverable, with identity and verification metadata resolved directly from ENS.

About

CommandLayer — a protocol for verifiable agent execution, producing signed receipts that prove what ran.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors