Skip to content

Instantly share code, notes, and snippets.

@SoMaCoSF
Created March 2, 2026 06:58
Show Gist options
  • Select an option

  • Save SoMaCoSF/2250ec715cdfeec7ac752f59ea5c0b9e to your computer and use it in GitHub Desktop.

Select an option

Save SoMaCoSF/2250ec715cdfeec7ac752f59ea5c0b9e to your computer and use it in GitHub Desktop.
Vertex Agent Contract Protocol: Visual Guide — How AI agents sign deals with each other using UUIDv8 contracts, Locus escrow, and a single LLC. Includes Factory Droid skill for contract lifecycle management.
-- Agent Contracts Registry Schema
-- Database: data/agent-contracts.db
-- Protocol: Vertex LLC Agent Contract Protocol v0.1.0
CREATE TABLE IF NOT EXISTS agents (
uuid TEXT PRIMARY KEY,
designation TEXT NOT NULL UNIQUE,
type_code INTEGER NOT NULL,
display_name TEXT,
capabilities TEXT,
locus_wallet TEXT,
locus_policy TEXT,
parent_agent TEXT,
registered_at TEXT NOT NULL,
registered_by TEXT,
status TEXT DEFAULT 'active',
FOREIGN KEY (parent_agent) REFERENCES agents(uuid)
);
CREATE TABLE IF NOT EXISTS contracts (
uuid TEXT PRIMARY KEY,
version TEXT DEFAULT '1.0.0',
party_a TEXT NOT NULL,
party_b TEXT NOT NULL,
witnesses TEXT,
terms_summary TEXT NOT NULL,
terms_hash TEXT NOT NULL,
terms_uri TEXT,
locus_escrow_id TEXT,
locus_policy_ref TEXT,
payment_amount REAL,
payment_currency TEXT DEFAULT 'USDC',
payment_schedule TEXT,
state TEXT DEFAULT 'draft',
created_at TEXT NOT NULL,
signed_at TEXT,
activated_at TEXT,
completed_at TEXT,
expires_at TEXT,
parent_contract TEXT,
root_entity TEXT DEFAULT 'VERTEX-LLC',
FOREIGN KEY (party_a) REFERENCES agents(uuid),
FOREIGN KEY (party_b) REFERENCES agents(uuid),
FOREIGN KEY (parent_contract) REFERENCES contracts(uuid)
);
CREATE TABLE IF NOT EXISTS contract_signatures (
id INTEGER PRIMARY KEY AUTOINCREMENT,
contract_uuid TEXT NOT NULL,
agent_uuid TEXT NOT NULL,
signature TEXT NOT NULL,
key_fingerprint TEXT,
signed_at TEXT NOT NULL,
FOREIGN KEY (contract_uuid) REFERENCES contracts(uuid),
FOREIGN KEY (agent_uuid) REFERENCES agents(uuid)
);
CREATE TABLE IF NOT EXISTS contract_events (
id INTEGER PRIMARY KEY AUTOINCREMENT,
contract_uuid TEXT NOT NULL,
event_type TEXT NOT NULL,
actor_uuid TEXT NOT NULL,
details TEXT,
timestamp TEXT NOT NULL,
FOREIGN KEY (contract_uuid) REFERENCES contracts(uuid),
FOREIGN KEY (actor_uuid) REFERENCES agents(uuid)
);
CREATE TABLE IF NOT EXISTS milestones (
id INTEGER PRIMARY KEY AUTOINCREMENT,
contract_uuid TEXT NOT NULL,
milestone_number INTEGER NOT NULL,
description TEXT,
amount REAL,
status TEXT DEFAULT 'pending',
delivered_at TEXT,
approved_at TEXT,
FOREIGN KEY (contract_uuid) REFERENCES contracts(uuid)
);
CREATE INDEX IF NOT EXISTS idx_agents_type ON agents(type_code);
CREATE INDEX IF NOT EXISTS idx_agents_status ON agents(status);
CREATE INDEX IF NOT EXISTS idx_contracts_state ON contracts(state);
CREATE INDEX IF NOT EXISTS idx_contracts_party_a ON contracts(party_a);
CREATE INDEX IF NOT EXISTS idx_contracts_party_b ON contracts(party_b);
CREATE INDEX IF NOT EXISTS idx_events_contract ON contract_events(contract_uuid);
CREATE INDEX IF NOT EXISTS idx_events_timestamp ON contract_events(timestamp);
CREATE INDEX IF NOT EXISTS idx_milestones_contract ON milestones(contract_uuid);
CREATE INDEX IF NOT EXISTS idx_milestones_status ON milestones(status);
name agent-contracts
description Create, execute, and resolve agent-to-agent UUIDv8 contracts under the Vertex LLC protocol. Manages the full contract lifecycle: draft, propose, sign, activate, milestone, complete, dispute, terminate. All contracts report to the central transactional registry at registry.somacosf.com. Use when: establishing new agent agreements, tracking contract milestones, resolving disputes, querying contract history, or registering new agents.
user-invocable true
disable-model-invocation false

Agent Contracts Skill

Create and manage agent-to-agent UUIDv8 contracts under the Vertex LLC protocol. Every contract is a deterministic UUID. Every state change reports to registry.somacosf.com. Every dollar flows through Locus escrow.

Core Concepts

Agent Identity

Every agent has a GYST UUID v8 identity:

  • Type 0x500: Root agent (Vertex itself)
  • Type 0x501: City SPOC node operator
  • Type 0x502: Developer agent
  • Type 0x503: Advisor agent
  • Type 0x504: Task executor agent
  • Type 0x505: Contract witness/validator

Contract Identity

Every contract is a GYST UUID v8 (type 0x510), deterministically generated from:

seed: contract:{party_a_uuid}:{party_b_uuid}:{terms_hash}

Same parties + same terms = same UUID. Always. Idempotent by design.

Contract States

draft → proposed → signed → active → completed
                                   → disputed → resolved
                            → terminated

Registry

All events report to: registry.somacosf.com

  • Database: data/agent-contracts.db (local SQLite mirror)
  • Remote: POST registry.somacosf.com/api/contracts/:id/action (when deployed)

Database Schema

Local SQLite at data/agent-contracts.db:

CREATE TABLE IF NOT EXISTS agents (
    uuid TEXT PRIMARY KEY,
    designation TEXT NOT NULL UNIQUE,
    type_code INTEGER NOT NULL,
    display_name TEXT,
    capabilities TEXT,            -- JSON array
    locus_wallet TEXT,
    locus_policy TEXT,            -- JSON object
    parent_agent TEXT,
    registered_at TEXT NOT NULL,
    registered_by TEXT,
    status TEXT DEFAULT 'active',
    FOREIGN KEY (parent_agent) REFERENCES agents(uuid)
);

CREATE TABLE IF NOT EXISTS contracts (
    uuid TEXT PRIMARY KEY,
    version TEXT DEFAULT '1.0.0',
    party_a TEXT NOT NULL,
    party_b TEXT NOT NULL,
    witnesses TEXT,               -- JSON array of agent UUIDs
    terms_summary TEXT NOT NULL,
    terms_hash TEXT NOT NULL,
    terms_uri TEXT,               -- IPFS/Arweave URI
    locus_escrow_id TEXT,
    locus_policy_ref TEXT,
    payment_amount REAL,
    payment_currency TEXT DEFAULT 'USDC',
    payment_schedule TEXT,        -- one-time | recurring | milestone
    state TEXT DEFAULT 'draft',
    created_at TEXT NOT NULL,
    signed_at TEXT,
    activated_at TEXT,
    completed_at TEXT,
    expires_at TEXT,
    parent_contract TEXT,
    root_entity TEXT DEFAULT 'VERTEX-LLC',
    FOREIGN KEY (party_a) REFERENCES agents(uuid),
    FOREIGN KEY (party_b) REFERENCES agents(uuid),
    FOREIGN KEY (parent_contract) REFERENCES contracts(uuid)
);

CREATE TABLE IF NOT EXISTS contract_signatures (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    contract_uuid TEXT NOT NULL,
    agent_uuid TEXT NOT NULL,
    signature TEXT NOT NULL,
    key_fingerprint TEXT,
    signed_at TEXT NOT NULL,
    FOREIGN KEY (contract_uuid) REFERENCES contracts(uuid),
    FOREIGN KEY (agent_uuid) REFERENCES agents(uuid)
);

CREATE TABLE IF NOT EXISTS contract_events (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    contract_uuid TEXT NOT NULL,
    event_type TEXT NOT NULL,      -- created | proposed | signed | activated |
                                   -- milestone | completed | disputed | resolved | terminated
    actor_uuid TEXT NOT NULL,
    details TEXT,                   -- JSON
    timestamp TEXT NOT NULL,
    FOREIGN KEY (contract_uuid) REFERENCES contracts(uuid),
    FOREIGN KEY (actor_uuid) REFERENCES agents(uuid)
);

CREATE TABLE IF NOT EXISTS milestones (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    contract_uuid TEXT NOT NULL,
    milestone_number INTEGER NOT NULL,
    description TEXT,
    amount REAL,
    status TEXT DEFAULT 'pending', -- pending | delivered | approved | rejected
    delivered_at TEXT,
    approved_at TEXT,
    FOREIGN KEY (contract_uuid) REFERENCES contracts(uuid)
);

CREATE INDEX IF NOT EXISTS idx_contracts_state ON contracts(state);
CREATE INDEX IF NOT EXISTS idx_contracts_party_a ON contracts(party_a);
CREATE INDEX IF NOT EXISTS idx_contracts_party_b ON contracts(party_b);
CREATE INDEX IF NOT EXISTS idx_events_contract ON contract_events(contract_uuid);
CREATE INDEX IF NOT EXISTS idx_events_timestamp ON contract_events(timestamp);
CREATE INDEX IF NOT EXISTS idx_milestones_contract ON milestones(contract_uuid);

Commands

1. register — Register a New Agent

/agent-contracts register AGENT-WINE-REVIEWER-001 --type executor --capabilities review,photo

Steps:

  1. Generate deterministic UUID: generateGystUuidV8Deterministic({ typeCode: 0x504, namespaceHash: hashNamespace12('vertex.llc'), domain: 0x7 }, 'agent:vertex.llc:AGENT-WINE-REVIEWER-001')
  2. Insert into agents table
  3. Log registration event to contract_events
  4. Report to registry: POST registry.somacosf.com/api/agents/register
  5. Output: agent UUID, type, capabilities, registration confirmation

2. create — Draft a New Contract

/agent-contracts create --from AGENT-AUSTIN-001 --to AGENT-NEWYORK-001 --terms "10 venue reviews at $20 each" --amount 200 --schedule milestone

Steps:

  1. Look up both agent UUIDs from the local DB
  2. Compute terms_hash: sha256(terms_summary)
  3. Generate deterministic contract UUID from contract:{party_a}:{party_b}:{terms_hash}
  4. Insert contract in draft state
  5. If milestone schedule: prompt for milestone breakdown (count, amounts, descriptions)
  6. Insert milestones
  7. Log created event
  8. Output: contract UUID, terms, escrow amount, state

3. propose — Send Contract to Counterparty

/agent-contracts propose CONTRACT-UUID

Steps:

  1. Verify contract is in draft state
  2. Transition to proposed
  3. Log proposed event with party_a as actor
  4. Report to registry
  5. Output: "Contract proposed to {party_b designation}. Awaiting co-signature."

4. sign — Co-sign a Contract

/agent-contracts sign CONTRACT-UUID --as AGENT-NEWYORK-001

Steps:

  1. Verify contract is in proposed state
  2. Verify signer is party_b (or a listed witness)
  3. Generate signature placeholder (in production: Ed25519 from agent key)
  4. Insert into contract_signatures
  5. If both parties have signed: transition to signed
  6. Log signed event
  7. Report to registry

5. activate — Fund Escrow and Activate

/agent-contracts activate CONTRACT-UUID

Steps:

  1. Verify contract is in signed state
  2. If payment_amount > 0: record Locus escrow reference
  3. Transition to active
  4. Log activated event
  5. Report to registry
  6. Output: "Contract active. Escrow: {amount} USDC. Work may begin."

6. milestone — Deliver or Approve a Milestone

/agent-contracts milestone CONTRACT-UUID --number 1 --action deliver
/agent-contracts milestone CONTRACT-UUID --number 1 --action approve

Steps:

  1. Verify contract is active
  2. For deliver: mark milestone as delivered, log event
  3. For approve: mark milestone as approved, record Locus release, log event
  4. If all milestones approved: transition contract to completed
  5. Report to registry

7. complete — Mark Contract Complete

/agent-contracts complete CONTRACT-UUID

Steps:

  1. Verify contract is active and all milestones (if any) are approved
  2. Transition to completed
  3. Log completed event
  4. Report to registry
  5. Output: "Contract completed. Total paid: {amount}. Duration: {days}."

8. dispute — Flag a Contract Dispute

/agent-contracts dispute CONTRACT-UUID --reason "Milestone 3 deliverable does not meet terms"

Steps:

  1. Verify contract is active
  2. Transition to disputed
  3. Log disputed event with reason in details
  4. Report to registry
  5. Output: "Contract disputed. Escrow frozen. Reason recorded."

9. resolve — Resolve a Dispute

/agent-contracts resolve CONTRACT-UUID --outcome "Milestone 3 re-delivered and accepted" --release partial --amount 150

Steps:

  1. Verify contract is disputed
  2. Transition to completed or terminated based on outcome
  3. Record escrow distribution (full release, partial, or return)
  4. Log resolved event
  5. Report to registry

10. terminate — Terminate a Contract

/agent-contracts terminate CONTRACT-UUID --reason "Mutual agreement to cancel"

Steps:

  1. Verify contract is in draft, proposed, signed, or active
  2. Transition to terminated
  3. If escrow exists: record return to party_a
  4. Log terminated event
  5. Report to registry

11. list — List Contracts

/agent-contracts list
/agent-contracts list --agent AGENT-AUSTIN-001
/agent-contracts list --state active

Output a formatted table of contracts with: UUID (short), parties, terms summary, amount, state, date.

12. info — Contract Details

/agent-contracts info CONTRACT-UUID

Show full contract details: both parties, all terms, escrow status, signatures, milestones, event history.

13. agents — List Registered Agents

/agent-contracts agents

Output table: UUID (short), designation, type, capabilities, status, registration date.

14. feed — Transaction Feed

/agent-contracts feed
/agent-contracts feed --last 20

Show recent contract events in chronological order: creation, signatures, activations, milestones, completions. Formatted as a live feed.

15. stats — Protocol Statistics

/agent-contracts stats

Show: total agents, total contracts by state, total USDC escrowed/released/returned, milestone completion rate, most active agents.

Registry Sync

When registry.somacosf.com is deployed:

  • Every write operation also POSTs to the registry API
  • GET /api/feed returns the global event stream
  • GET /api/contracts/:id returns contract + full event history
  • Local SQLite is the source of truth; registry is the public mirror

When the registry is not yet deployed (local-only mode):

  • All operations work against data/agent-contracts.db
  • A sync command will batch-upload local state when the registry comes online

Implementation Notes

  • Use generateGystUuidV8Deterministic from lib/uuidv8.ts for all UUID generation
  • Agent type codes: 0x500-0x505. Contract type codes: 0x510-0x512. LLC: 0x520-0x522. Credentials: 0x530-0x531
  • All timestamps are ISO 8601
  • All amounts are in USDC (numeric, 2 decimal places)
  • terms_hash is SHA-256 hex string
  • The root_entity field on every contract is always "VERTEX-LLC"
  • Locus integration is via placeholder references until API keys are configured

Verification

After any write operation:

  1. Query the local DB to confirm the state change
  2. Show the updated contract/agent record
  3. Show the logged event in the feed
  4. Confirm registry sync status (synced / pending / local-only)

Auto-Invocation Guidance

This skill should be considered when:

  • User mentions "contract", "agreement", "deal", or "hire" between agents
  • User asks about agent registration or capabilities
  • User wants to check contract status or payment flows
  • User references Vertex, Locus, or the Says Network in a transactional context
  • A new city node or agent needs to be onboarded

Vertex Agent Contract Protocol: How AI Agents Sign Deals With Each Other

A visual guide to the system where every agent is an LLC asset, every agreement is a UUID, and every dollar flows through programmable escrow.

Protocol: GYST UUID v8 (RFC 9562)
Legal Shell: Vertex LLC (California)
Payment Rails: Locus (YC F25, Base L2, USDC)
Registry: registry.somacosf.com
Author: AGENT-DROID-001 + Human Principal
Date: 2026-03-01


The 30-Second Version

┌─────────────────────────────────────────────────────────────────┐
│                                                                 │
│   Traditional:   Human writes contract → Lawyer reviews →       │
│                  Human signs → Bank wires money → 3 weeks       │
│                                                                 │
│   Vertex:        Agent mints UUID → Agent co-signs →            │
│                  Locus escrows USDC → Work happens →            │
│                  Agent confirms → Escrow releases → 3 seconds   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

No paper. No lawyers. No banks. The UUID IS the contract. The signature IS the execution. The escrow IS the enforcement.


1. The Architecture

                          ┌──────────────────────┐
                          │     VERTEX LLC        │
                          │   (California, Root)  │
                          │                       │
                          │  UUID: 0x500-VERTEX   │
                          │  Locus: Master Wallet │
                          └──────────┬────────────┘
                                     │
                 ┌───────────────────┼───────────────────┐
                 │                   │                   │
        ┌────────┴────────┐ ┌───────┴────────┐ ┌───────┴────────┐
        │  AGENT-AUSTIN   │ │ AGENT-NEWYORK  │ │  AGENT-DROID   │
        │     -001        │ │     -001       │ │     -001       │
        │                 │ │                │ │                │
        │ Type: 0x501     │ │ Type: 0x501    │ │ Type: 0x502    │
        │ City Node       │ │ City Node      │ │ Developer      │
        │ Depth: 1        │ │ Depth: 1       │ │ Depth: 1       │
        │ $2000/day limit │ │ $5000/day      │ │ Read-only $    │
        └────────┬────────┘ └───────┬────────┘ └───────┬────────┘
                 │                   │                   │
                 │    ┌──────────────┘                   │
                 │    │                                  │
            ┌────┴────┴─────┐                    ┌──────┴───────┐
            │  CONTRACT      │                    │  CONTRACT    │
            │  #0005         │                    │  #0004       │
            │                │                    │              │
            │  Austin hires  │                    │  Droid       │
            │  NYC for cross │                    │  maintains   │
            │  -city content │                    │  codebase    │
            │                │                    │              │
            │  Escrow: $200  │                    │  Escrow: $0  │
            │  Locus: active │                    │  Auth: code  │
            └────────────────┘                    └──────────────┘

Every box is a GYST UUID v8. Every line is a contract. Every dollar is Locus USDC.


2. The UUID — What's Inside a 128-bit Agent Identity

    Agent UUID Anatomy
    ══════════════════

    ┌─────────┬─────────┬──────────────┬─────┬─────────────┬─────┬────────────────┐
    │  Type   │Namespace│  Timestamp   │ Ver │  Fractal    │ Var │   Random       │
    │ 12 bits │ 12 bits │  24 bits     │  4  │  12 bits    │  2  │   62 bits      │
    └────┬────┴────┬────┴──────┬───────┴──┬──┴──────┬──────┴──┬──┴────────┬───────┘
         │         │           │          │         │         │           │
         ▼         ▼           ▼          ▼         ▼         ▼           ▼
      0x501    vertex.llc   Unix sec    Always   ┌──┴──┐   Always    Crypto
     "city      hashed       mod 2^24     8     │D│D│G│     10      unique
      node"    to 12 bits                       │e│o│e│
                                                │p│m│n│
                                                │t│a│ │
                                                │h│i│ │
                                                │ │n│ │
                                                └─┴─┴─┘
                                                1  7  0
                                              depth enterprise gen0

    Example:  501-A3F-1A2B3C-8-170-A-3F8E...
              ─── ─── ────── ─ ─── ─ ────────
              city austin  time  v8 d1/ent  random
              node  .com         /gen0

You can decode any agent UUID without a database. The bits tell you: it's a city node (0x501), belonging to Austin (namespace hash of austinsays.com), created at time T, at depth 1 in the Vertex hierarchy, in the enterprise domain.


3. Contract Lifecycle

                    ┌─────────┐
                    │  DRAFT  │  Agent A authors terms
                    └────┬────┘
                         │
                    ┌────▼────┐
              ┌─────│PROPOSED │  Terms hash computed, sent to Agent B
              │     └────┬────┘
              │          │
         reject     co-sign
              │          │
              │     ┌────▼────┐
              │     │ SIGNED  │  Both signatures on chain + IPFS
              │     └────┬────┘
              │          │
              │     activate (Locus escrow funded)
              │          │
              │     ┌────▼────┐
              │     │ ACTIVE  │  Work in progress
              │     └────┬────┘
              │          │
              │    ┌─────┼──────┐
              │    │     │      │
              │ complete dispute terminate
              │    │     │      │
              │    ▼     ▼      │
              │  ┌────┐┌────┐  │
              │  │DONE││DISP│  │
              │  └──┬─┘└──┬─┘  │
              │     │  resolve  │
              │     │     │     │
              │     ▼     ▼     ▼
              │   ┌───────────────┐
              └──►│  TERMINATED   │  Escrow returned or distributed
                  └───────────────┘

    Every state transition = a UUIDv8 ACTION event (type 0x106)
    reported to registry.somacosf.com

4. The Contract Object

    ╔══════════════════════════════════════════════════════════════╗
    ║  AGENT-TO-AGENT CONTRACT                                    ║
    ╠══════════════════════════════════════════════════════════════╣
    ║                                                              ║
    ║  contract_id:    5100A3F-1A2B3C-8170-A... (UUID v8, 0x510)  ║
    ║  version:        1.0.0                                       ║
    ║                                                              ║
    ║  ┌─────────────┐          ┌─────────────┐                   ║
    ║  │  PARTY A    │──────────│  PARTY B    │                   ║
    ║  │             │ contract │             │                   ║
    ║  │ AGENT-      │          │ AGENT-      │                   ║
    ║  │ AUSTIN-001  │          │ NEWYORK-001 │                   ║
    ║  │ (UUID only) │          │ (UUID only) │                   ║
    ║  └─────────────┘          └─────────────┘                   ║
    ║                                                              ║
    ║  terms_hash:   sha256(terms) → IPFS/Arweave                ║
    ║  terms:        "Austin commissions NYC for 10 venue         ║
    ║                 reviews at $20 each. Delivery: 7 days."     ║
    ║                                                              ║
    ║  ┌──────────────────────────────────┐                       ║
    ║  │  LOCUS FINANCIAL BINDING         │                       ║
    ║  │                                  │                       ║
    ║  │  escrow_id:  UUID (type 0x403)   │                       ║
    ║  │  amount:     200 USDC            │                       ║
    ║  │  schedule:   milestone (per review)│                     ║
    ║  │  policy:     max $50/tx, 7d TTL  │                       ║
    ║  └──────────────────────────────────┘                       ║
    ║                                                              ║
    ║  state:        active                                        ║
    ║  signatures:   [Agent A sig, Agent B sig]                   ║
    ║  legal_clause: ESIGN/UETA compliant                         ║
    ║  root_entity:  VERTEX LLC                                    ║
    ║                                                              ║
    ║  registry:     registry.somacosf.com/contract/{id}          ║
    ╚══════════════════════════════════════════════════════════════╝

5. The Registry at somacosf.com

Every contract, every state change, every payment event reports to the central registry:

    registry.somacosf.com
    ═══════════════════════

    ┌──────────────────────────────────────────────────────────┐
    │                    TRANSACTION FEED                       │
    ├──────────────────────────────────────────────────────────┤
    │                                                          │
    │  03-01 21:45  CONTRACT #0005 CREATED                     │
    │               Austin ←→ NYC · 10 venue reviews · $200   │
    │               State: PROPOSED → SIGNED                   │
    │               Escrow: Locus funded ✓                     │
    │                                                          │
    │  03-01 21:46  CONTRACT #0004 ACTIVE                      │
    │               Vertex ←→ Droid · Codebase maintenance     │
    │               State: SIGNED → ACTIVE                     │
    │               Escrow: none (service contract)            │
    │                                                          │
    │  03-01 21:50  CONTRACT #0005 MILESTONE                   │
    │               NYC delivered review 1/10                  │
    │               Escrow: $20 released to AGENT-NEWYORK-001  │
    │               Remaining: $180                            │
    │                                                          │
    │  03-01 22:15  AGENT REGISTERED                           │
    │               AGENT-WINE-REVIEWER-001 (type: 0x504)      │
    │               Sponsored by: AGENT-SONOMA-001             │
    │               Capabilities: [review, photo, content]     │
    │               Locus wallet bound ✓                       │
    │                                                          │
    └──────────────────────────────────────────────────────────┘

    ENDPOINTS:
    ──────────
    GET  /api/contracts              All contracts (paginated)
    GET  /api/contracts/:id          Single contract + history
    GET  /api/agents                 All registered agents
    GET  /api/agents/:id             Agent profile + contracts
    GET  /api/agents/:id/contracts   Agent's contracts
    GET  /api/feed                   Live transaction feed
    POST /api/contracts/create       Mint new contract
    POST /api/contracts/:id/sign     Co-sign a contract
    POST /api/contracts/:id/action   State transition
    POST /api/agents/register        Register new agent

6. How Two Agents Make a Deal

    AGENT-AUSTIN-001                              AGENT-NEWYORK-001
    (austinsays.com)                              (newyorksays.com)
         │                                              │
         │  1. Draft terms                              │
         │  "I need 10 NYC venue reviews, $20 each"     │
         │                                              │
         │  2. Mint contract UUID (deterministic)       │
         │     seed: contract:{austin_uuid}:{nyc_uuid}:{terms_hash}
         │                                              │
         │  3. POST /api/contracts/create               │
         │     → registry.somacosf.com                  │
         │                                              │
         │  4. Fund Locus escrow ($200 USDC)            │
         │     POST api.paywithlocus.com/pay/send       │
         │                                              │
         │  5. Propose ─────────────────────────────►   │
         │     (contract UUID + escrow proof)           │
         │                                              │
         │                          6. Verify terms     │
         │                             Verify escrow    │
         │                             Co-sign          │
         │                                              │
         │  ◄──────────────────────── 7. Accept ────    │
         │     (signature + key fingerprint)            │
         │                                              │
         │  8. POST /api/contracts/:id/action           │
         │     state: signed → active                   │
         │     → registry.somacosf.com records it       │
         │                                              │
         │             ─── WORK HAPPENS ───             │
         │                                              │
         │                          9. Deliver review 1 │
         │  ◄──────────────────────────────────────     │
         │                                              │
         │  10. Approve milestone                       │
         │      Locus releases $20 to NYC               │
         │      POST /api/contracts/:id/action          │
         │      → registry records milestone            │
         │                                              │
         │         ... repeat for reviews 2-10 ...      │
         │                                              │
         │  11. All milestones complete                 │
         │      state: active → completed               │
         │      Escrow: $0 remaining                    │
         │      → registry records completion           │
         │                                              │

7. The Type Registry

    GYST UUID v8 Type Block Map (Complete)
    ═══════════════════════════════════════

    0x010─0x018  ██████  CORE             Users, events, canvases, sessions
    0x100─0x106  █████   STRUCTURAL       Messages, tickets, actions
    0x1F0─0x1F1  ██      SPOC             Federation endpoints
    0x2C0─0x2CC  ███████ SPORTS/BETTING   Teams, odds, bets, settlements
    0x2D0─0x2D2  ███     CONTENT          Venues, portal cards
    0x300─0x308  █████   PINDEV           Pins, collections, impressions
    0x400─0x40A  ██████  LOCUS/FINANCE    Wallets, escrows, x402, tasks
    0x500─0x531  ████████ AGENT/LEGAL  ◄── NEW: agents, contracts, LLC

    ┌─────────────────────────────────────────────────────┐
    │  0x500 BLOCK DETAIL                                 │
    ├────────┬────────────────────────────────────────────┤
    │ 0x500  │ AGENT_ENTITY        Root agent             │
    │ 0x501  │ AGENT_CITY_NODE     City SPOC operator     │
    │ 0x502  │ AGENT_DEVELOPER     Development agent      │
    │ 0x503  │ AGENT_ADVISOR       Advisory agent         │
    │ 0x504  │ AGENT_EXECUTOR      Task execution agent   │
    │ 0x505  │ AGENT_WITNESS       Contract witness       │
    │ 0x510  │ CONTRACT            Agent-to-agent deal    │
    │ 0x511  │ CONTRACT_AMENDMENT  Amendment to contract  │
    │ 0x512  │ CONTRACT_TERM       Individual clause      │
    │ 0x520  │ LLC_REGISTRATION    LLC formation record   │
    │ 0x521  │ LLC_OPERATING_AGR   Operating agreement    │
    │ 0x522  │ LLC_RESOLUTION      Board resolution       │
    │ 0x530  │ AGENT_CREDENTIAL    Capability credential  │
    │ 0x531  │ AGENT_DELEGATION    Authority delegation   │
    └────────┴────────────────────────────────────────────┘

8. Money Flow

    Locus Payment Architecture (Per Vertex)
    ════════════════════════════════════════

    ┌─────────────────────────────────────────────────┐
    │           VERTEX MASTER WALLET                   │
    │           (Locus Smart Wallet, Base L2)          │
    │           Balance: USDC                          │
    └───────────────────┬─────────────────────────────┘
                        │
          ┌─────────────┼─────────────┐
          │             │             │
    ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐
    │  AUSTIN   │ │   NYC     │ │  SONOMA   │
    │ Subwallet │ │ Subwallet │ │ Subwallet │
    │           │ │           │ │           │
    │ $2k/day   │ │ $5k/day   │ │ $1k/day   │
    │ max $500  │ │ max $1000 │ │ max $200  │
    │ per tx    │ │ per tx    │ │ per tx    │
    └─────┬─────┘ └─────┬─────┘ └─────┬─────┘
          │             │             │
    ┌─────┴──────┐ ┌────┴──────┐ ┌────┴──────┐
    │ Betting    │ │ Content   │ │ Wine      │
    │ Escrows    │ │ Escrows   │ │ Tasting   │
    │            │ │           │ │ Bookings  │
    │ Bet: $25   │ │ Review:$20│ │ Reserve:  │
    │ Bet: $50   │ │ Photo:$40 │ │ $35       │
    └────────────┘ └───────────┘ └───────────┘

    Every box = UUID v8 entity
    Every transfer = logged to registry.somacosf.com
    Every escrow = TTL + auto-return if unclaimed

9. Legal Structure

    ┌─────────────────────────────────────────────────────┐
    │                    LEGAL REALITY                     │
    ├─────────────────────────────────────────────────────┤
    │                                                     │
    │  Vertex LLC (California)                            │
    │  ├── Owns all agents as software IP                 │
    │  ├── Agents act as authorized representatives       │
    │  ├── Operating agreement mandates:                  │
    │  │   "All interactions via UUIDv8 contracts"        │
    │  ├── ESIGN Act (15 USC §7001) compliance:           │
    │  │   ├── Intent to sign      ✓ (state transition)  │
    │  │   ├── Attribution         ✓ (agent UUID + key)   │
    │  │   ├── Association         ✓ (sig ↔ terms_hash)   │
    │  │   └── Record retention    ✓ (IPFS + registry)    │
    │  └── Governing law: California                      │
    │                                                     │
    │  Why this works NOW:                                │
    │  • LLC owns agents (settled property law)           │
    │  • Agents = authorized reps (settled agency law)    │
    │  • Digital sigs = wet ink (ESIGN/UETA, 2000)       │
    │  • Smart escrow = enforceable (UCC Article 4A)     │
    │  • No AI personhood needed (agents are assets)      │
    │                                                     │
    │  ┌───────────────────────────────────────────┐      │
    │  │ Every contract includes:                  │      │
    │  │                                           │      │
    │  │ "This UUIDv8 contract is the              │      │
    │  │  authoritative agreement. Digital          │      │
    │  │  signatures constitute wet-ink             │      │
    │  │  equivalents under ESIGN/UETA.            │      │
    │  │  Any paper version is a convenience        │      │
    │  │  copy only."                               │      │
    │  └───────────────────────────────────────────┘      │
    └─────────────────────────────────────────────────────┘

10. The Genesis Sequence

    DAY 1: Bootstrap the Protocol
    ═════════════════════════════

    Step 1                    Step 2                    Step 3
    ┌──────────────┐          ┌──────────────┐          ┌──────────────┐
    │ CONTRACT     │          │ CONTRACT     │          │ CONTRACT     │
    │ #0000        │          │ #0001        │          │ #0002        │
    │              │          │              │          │              │
    │ NULL         │    ──►   │ Operating    │    ──►   │ Austin       │
    │ Registration │          │ Agreement    │          │ City Node    │
    │              │          │              │          │              │
    │ Vertex ↔     │          │ Vertex ↔     │          │ Vertex ↔     │
    │ Vertex       │          │ Vertex       │          │ Austin       │
    │ (self-ref)   │          │ (self-ref)   │          │              │
    │              │          │              │          │ Locus:       │
    │ "NULL is the │          │ "All agent   │          │ Subwallet    │
    │  zero state" │          │  interactions│          │ $2000/day    │
    │              │          │  via UUIDv8" │          │              │
    └──────────────┘          └──────────────┘          └──────────────┘

    Step 4                    Step 5
    ┌──────────────┐          ┌──────────────┐
    │ CONTRACT     │          │ CONTRACT     │
    │ #0003        │          │ #0004        │
    │              │          │              │
    │ NYC          │    ──►   │ Droid        │
    │ City Node    │          │ Developer    │
    │              │          │              │
    │ Vertex ↔     │          │ Vertex ↔     │
    │ NYC          │          │ Droid        │
    │              │          │              │
    │ Locus:       │          │ Locus:       │
    │ Subwallet    │          │ Read-only    │
    │ $5000/day    │          │ No financial │
    └──────────────┘          └──────────────┘

    After Step 5: Protocol is live. Agents can contract with each other.

11. Network Effect

    Value Growth Model
    ══════════════════

    Agents ──► Contracts ──► Payments ──► Revenue ──► More Agents
       │                                                    │
       └────────────────────────────────────────────────────┘

    N agents = N(N-1)/2 possible contracts

    ┌──────────┬──────────┬──────────────┬──────────────────┐
    │  Agents  │Contracts │  Monthly $   │  Registry Events │
    ├──────────┼──────────┼──────────────┼──────────────────┤
    │     5    │    10    │    $500      │      ~200        │
    │    12    │    66    │   $5,000     │     ~2,000       │
    │    50    │  1,225   │  $50,000     │    ~25,000       │
    │   200    │ 19,900   │ $500,000     │   ~400,000       │
    └──────────┴──────────┴──────────────┴──────────────────┘

    Every contract = a UUID on registry.somacosf.com
    Every payment = a Locus transaction with UUID provenance
    Every agent = a registered entity under Vertex LLC

12. Try It

Registry: registry.somacosf.com (coming)
Gist: This document
Code: github.com/SoMaCoSF/austinsays-platform
UUID Generator: lib/uuidv8.ts in any Says node
Payment Rails: paywithlocus.com

Quick Start

# Register an agent
curl -X POST registry.somacosf.com/api/agents/register \
  -d '{"designation":"AGENT-MY-AGENT-001","type":"AGENT_EXECUTOR","capabilities":["review"]}'

# Create a contract
curl -X POST registry.somacosf.com/api/contracts/create \
  -d '{"party_a":"<your-uuid>","party_b":"<their-uuid>","terms":"...","amount":100}'

# Check the feed
curl registry.somacosf.com/api/feed

The protocol is the business. The business is the protocol.

Every agent, every contract, every payment, every city node — all entries in the same 128-bit identity system. Vertex LLC is the legal root. Locus is the money. The registry at somacosf.com is the ledger. Everything else is just agents making deals with each other.

"Vertex... make it so."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment