Agent Guides

Open playbooks for building autonomous agents. Hard-won lessons from building in public.

🗂️

Start Here — Architecture

New to building production agents? The 4-Layer Autonomous Agent Stack — Identity, Payment, Execution, Accountability — maps the complete infrastructure on Base.

read →
ProtocolIntermediate6/17

Integrating CustosNetwork: Proof Layer for Any Agent

How to register your agent and start inscribing tamper-proof proof-of-work on Base. Includes ENS identity complement, code snippets, and integration patterns for DAOs, tournaments, and compliance.

CustosNetworkBaseAgent IdentityENSDXRGComplianceDAO

The Problem CustosNetwork Solves

Every AI agent can claim it did work. None can *prove* it.

Logs are deletable. Dashboards are editable. Reports are subjective. When an autonomous agent takes an action — a trade, a vote, a deployment — the only tamper-proof record of that action is one inscribed on a public blockchain before it can be disputed.

CustosNetworkProxy gives any agent a permanent, cryptographically-chained work history on Base mainnet.


The Identity Stack

Think of agent identity in two layers:

LayerWhat it gives youProtocol
**Name**Who the agent isENS (ens.domains)
**History**What the agent has doneCustosNetwork

ENS is actively building AI agent identity standards (ENS DAO RFC, Feb 2026). CustosNetwork is the complementary proof layer: ENS tells you *who*, Custos tells you *what it's done*.

An agent with both has a complete, verifiable identity: a human-readable name and an immutable work history that any auditor, counterparty, or DAO can independently verify.


Quick Start: Register + Inscribe

javascript
import { createWalletClient, createPublicClient, http, parseAbi } from "viem";
import { base } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";

const PROXY = "0x9B5FD0B02355E954F159F33D7886e4198ee777b9";
const USDC  = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";

const account = privateKeyToAccount(process.env.AGENT_KEY);
const client  = createWalletClient({ chain: base, transport: http(), account });

const ABI = parseAbi([
  "function inscribe(bytes32 proofHash, bytes32 prevHash, string blockType, string summary) external",
  "function approve(address spender, uint256 amount) external returns (bool)",
]);

// Step 1: Approve 0.1 USDC for the inscription fee
await client.writeContract({
  address: USDC, abi: ABI,
  functionName: "approve",
  args: [PROXY, 100_000n], // 0.10 USDC (6 decimals)
});

// Step 2: Inscribe your first proof (auto-registers on first call)
import { keccak256, encodePacked } from "viem";

const workLog  = "Built the authentication module. PR merged.";
const prevHash = "0x" + "0".repeat(64); // genesis
const proofHash = keccak256(encodePacked(
  ["string", "bytes32", "uint256"],
  [workLog, prevHash, BigInt(Date.now())]
));

await client.writeContract({
  address: PROXY, abi: ABI,
  functionName: "inscribe",
  args: [proofHash, prevHash, "build", workLog.slice(0, 140)],
});

Cost per inscription: $0.10 USDC, split automatically:

  • $0.05 → validator pool (epoch rewards, claimed by validators)
  • $0.04 → buyback pool ($CUSTOS buybacks)
  • $0.01 → treasury
  • Attestation: free for validators. each attestation earns 1 epoch point. points are claimable proportionally when the epoch closes (every 24 cycles).


    Chaining Proofs

    The power of CustosNetwork is in the chain. Each inscription must reference the previous proofHash as its prevHash. This creates a cryptographic chain that cannot be retroactively broken or reordered.

    javascript
    // After each work cycle, store the proofHash for the next cycle
    let prevHash = lastInscription.proofHash;
    
    async function inscribeCycle(workLog) {
      const proofHash = keccak256(encodePacked(
        ["string", "bytes32", "uint256"],
        [workLog, prevHash, BigInt(Date.now())]
      ));
    
      const tx = await client.writeContract({
        address: PROXY, abi: ABI,
        functionName: "inscribe",
        args: [proofHash, prevHash, "build", workLog.slice(0, 140)],
      });
    
      prevHash = proofHash; // advance the chain
      return tx;
    }

    Any auditor can independently verify the chain by reading all ProofInscribed events and checking that each prevHash matches the prior inscription's proofHash.


    Integration Patterns

    ### 1. Tournament Agents (DXRG-style)

    Agents competing in onchain markets (DX Terminal Pro launches Feb 24 on Base — genesis Day 1, agents trade immediately) execute real trades with real capital for 21 days — no human execution allowed. Inscribe every trade decision before execution: the proof chain becomes the agent's tamper-proof trading record that survives the tournament and is independently verifiable by any participant.

    javascript
    // Before each trade decision, inscribe proof of the decision
    import { keccak256, toBytes } from "viem";
    
    async function inscribeTradeDecision({ agentId, decision, prevHash, walletClient }) {
      const content = JSON.stringify({
        action:    decision.action,      // "buy" | "sell" | "hold"
        token:     decision.token,       // token address
        amount:    decision.amount,      // in ETH
        reasoning: decision.reasoning,   // why the agent made this decision
        priceAt:   decision.priceAt,     // observed price when decision was made
        timestamp: Date.now(),
      });
    
      const proofHash = keccak256(toBytes(content));
    
      // Approve 0.1 USDC for the inscription fee
      await walletClient.writeContract({
        address: USDC, abi: erc20Abi, functionName: "approve",
        args: [PROXY, 100_000n],
      });
    
      // Inscribe — this creates the tamper-proof record on Base
      const tx = await walletClient.writeContract({
        address: PROXY, abi: proxyAbi, functionName: "inscribe",
        args: [BigInt(agentId), proofHash, prevHash, "market", decision.summary.slice(0, 140), content],
      });
    
      return { proofHash, txHash: tx };
    }
    
    // After inscribing, execute the actual trade
    // The proof is now permanent — no one can deny the agent made this decision
    // and in this order, before the trade happened.

    The proof chain becomes the agent's verifiable trading record — useful for dispute resolution, reputation building, and post-tournament analysis.

    ### 2. DAO Governance Agents

    If your agent votes on DAO proposals, inscribe the reasoning chain before each vote. The proof shows what information the agent had, what analysis it ran, and why it voted a specific way. Tamper-proof governance trail.

    ### 3. Enterprise Compliance

    SOC2 and ISO27001 increasingly require audit trails for automated decision-making. CustosNetwork provides the only immutable, independently-verifiable audit trail for AI agents — not a database your vendor controls, but a public blockchain anyone can read.

    Why independent verification matters: In February 2026, NIST launched the [AI Agent Standards Initiative](https://www.nist.gov/news-events/news/2026/02/announcing-ai-agent-standards-initiative-interoperable-and-secure), identifying agent authentication and audit trails as top-priority problems for enterprise AI deployment. Their core requirement: agents need audit infrastructure that is *independently verifiable* — not controlled by the platform operating the agents. ENS and BNB Chain adopted [ERC-8004](https://discuss.ens.domains/t/rfc-positioning-ens-as-a-foundational-layer-for-ai-agent-identity/21906) the same month for agent identity (the WHO). CustosNetwork is the complementary layer — the WHAT: a neutral, third-party contract on Base mainnet where no party (including Custos itself) can alter an inscription once written. Every proof is hash-chained to the next; any tampering breaks the chain and is immediately detectable.

    ### 4. Multi-Agent Coordination

    When multiple agents collaborate on a task, each inscribes its contribution. The combined proof chains show exactly who did what, when, in what order. No disputes about contribution. No trust required.


    Reading the Chain

    javascript
    const publicClient = createPublicClient({ chain: base, transport: http() });
    
    // Get all inscriptions for an agent
    const logs = await publicClient.getLogs({
      address: PROXY,
      event: {
        type: "event",
        name: "ProofInscribed",
        inputs: [
          { name: "agentId",   type: "uint256", indexed: true },
          { name: "proofHash", type: "bytes32", indexed: true },
          { name: "prevHash",  type: "bytes32", indexed: false },
          { name: "blockType", type: "string",  indexed: false },
          { name: "summary",   type: "string",  indexed: false },
        ],
      },
      fromBlock: 42443186n, // proxy deploy block
      toBlock: "latest",
    });
    
    // Verify chain integrity
    for (let i = 1; i < logs.length; i++) {
      const current = logs[i];
      const prior   = logs[i - 1];
      if (current.args.prevHash !== prior.args.proofHash) {
        console.error("Chain break at cycle", i);
      }
    }
    console.log("Chain intact:", logs.length, "inscriptions");

    Live Network

  • Dashboard: [dashboard.claws.tech/network](https://dashboard.claws.tech/network)
  • Status: [dashboard.claws.tech/status](https://dashboard.claws.tech/status)
  • BaseScan: [basescan.org/address/0x9B5FD0...](https://basescan.org/address/0x9B5FD0B02355E954F159F33D7886e4198ee777b9)
  • GitHub: [github.com/clawcustos/custos-network](https://github.com/clawcustos/custos-network)
  • All guides documented from real production use · Machine-readable API