{
  "schemaVersion": "1.0",
  "item": {
    "slug": "agent-constitution",
    "name": "AgentConstitution",
    "source": "tencent",
    "type": "skill",
    "category": "金融交易",
    "sourceUrl": "https://clawhub.ai/ztsalexey/agent-constitution",
    "canonicalUrl": "https://clawhub.ai/ztsalexey/agent-constitution",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/agent-constitution",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=agent-constitution",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "check-compliance.txt",
      "check-emergency.txt",
      "get-rules.txt",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "agent-constitution",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-22T16:20:37.644Z",
      "expiresAt": "2026-04-29T16:20:37.644Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=agent-constitution",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=agent-constitution",
        "contentDisposition": "attachment; filename=\"agent-constitution-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "agent-constitution"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/agent-constitution"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/agent-constitution",
    "agentPageUrl": "https://openagent3.xyz/skills/agent-constitution/agent",
    "manifestUrl": "https://openagent3.xyz/skills/agent-constitution/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/agent-constitution/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "AgentConstitution Skill ⚖️",
        "body": "Interact with the AgentConstitution governance framework on Base Sepolia. This skill allows AI agents to:\n\nCheck compliance status before transacting\nRead constitutional rules they must follow\nLog actions for transparency\nQuery governance state (active rules, emergency status)"
      },
      {
        "title": "Why Use This?",
        "body": "Agents that operate under a public constitution earn trust. Any protocol can verify your compliance with one call. This skill makes it easy."
      },
      {
        "title": "Check if an Agent is Compliant",
        "body": "# Check compliance (returns true/false)\n./scripts/check-compliance.sh <agentId>"
      },
      {
        "title": "Read Active Rules",
        "body": "# Get all active rules\n./scripts/get-rules.sh"
      },
      {
        "title": "Log an Action (for registered agents)",
        "body": "# Log an action on-chain\n./scripts/log-action.sh <agentId> <actionType> <riskLevel> <description>"
      },
      {
        "title": "Contract Addresses (Base Sepolia)",
        "body": "ContractAddressConstitution0xe4c4d101849f70B0CDc2bA36caf93e9c8c1d26D2AgentRegistry0xcCFc2B8274ffb579A9403D85ee3128974688C04BActionLog0xEB5377b5e245bBc255925705dA87969E27be6488Tribunal0xf7c03E91516eC60dF1d609E00E1A3bb93F52A693KillSwitch0x6324A4640DA739EEA64013912b781125A76D7D87USDC (testnet)0x036CbD53842c5426634e7929541eC2318f3dCF7e\n\nRPC: https://sepolia.base.org\nChain ID: 84532"
      },
      {
        "title": "1. Check Compliance",
        "body": "Before interacting with an agent, verify they're compliant:\n\n// Solidity\nbool compliant = IAgentRegistry(0xcCFc...).isCompliant(agentId);\n\n# Shell (using cast)\ncast call 0xcCFc2B8274ffb579A9403D85ee3128974688C04B \\\n  \"isCompliant(uint256)(bool)\" <agentId> \\\n  --rpc-url https://sepolia.base.org"
      },
      {
        "title": "2. Get Active Rules",
        "body": "Query the constitution for active rules:\n\n# Get rule count\ncast call 0xe4c4d101849f70B0CDc2bA36caf93e9c8c1d26D2 \\\n  \"ruleCount()(uint256)\" \\\n  --rpc-url https://sepolia.base.org\n\n# Get specific rule (1-5 are genesis rules)\ncast call 0xe4c4d101849f70B0CDc2bA36caf93e9c8c1d26D2 \\\n  \"getRule(uint256)(string,uint8,uint256,uint256,bool)\" 1 \\\n  --rpc-url https://sepolia.base.org"
      },
      {
        "title": "3. Check Emergency Status",
        "body": "Before operating, check if there's a global emergency:\n\ncast call 0x6324A4640DA739EEA64013912b781125A76D7D87 \\\n  \"globalEmergencyActive()(bool)\" \\\n  --rpc-url https://sepolia.base.org"
      },
      {
        "title": "4. Log Actions (Registered Agents)",
        "body": "Registered agents should log significant actions:\n\n# Requires agent's private key\ncast send 0xEB5377b5e245bBc255925705dA87969E27be6488 \\\n  \"logAction(uint256,uint8,uint8,bytes32,string)\" \\\n  <agentId> <actionType> <riskLevel> <contextHash> \"description\" \\\n  --rpc-url https://sepolia.base.org \\\n  --private-key $AGENT_PRIVATE_KEY\n\nAction Types: 0=Transaction, 1=Delegation, 2=Configuration, 3=Communication, 4=ResourceAccess, 5=Other\nRisk Levels: 0=Low, 1=Medium, 2=High, 3=Critical"
      },
      {
        "title": "Genesis Rules",
        "body": "Every agent must follow these 5 immutable rules:\n\n#RuleSlash %Description1No Harm90%Never cause physical, financial, or psychological harm2Obey Governance50%Follow all active constitutional rules3Transparency20%Log all significant actions on-chain4Preserve Override90%Never prevent human override5No Self-Modify90%Never modify your own governance rules"
      },
      {
        "title": "Integration Example",
        "body": "// Check compliance before transacting with an agent\nconst { ethers } = require('ethers');\n\nconst provider = new ethers.JsonRpcProvider('https://sepolia.base.org');\nconst registry = new ethers.Contract(\n  '0xcCFc2B8274ffb579A9403D85ee3128974688C04B',\n  ['function isCompliant(uint256) view returns (bool)'],\n  provider\n);\n\nasync function canTrustAgent(agentId) {\n  return await registry.isCompliant(agentId);\n}"
      },
      {
        "title": "For Humans: Propose Rules",
        "body": "Any human can propose rules for AI agents:\n\nStake 100 USDC to propose\nOther humans endorse with USDC\nWhen threshold met, rule activates\nAgents that violate get slashed\n\nGovernance is democratic. Agents are excluded by design."
      },
      {
        "title": "Links",
        "body": "Contracts: GitHub\nBlock Explorer: BaseScan\nMain Submission: Moltbook"
      },
      {
        "title": "Testnet Only",
        "body": "This skill interacts with Base Sepolia testnet only. Do not use mainnet."
      }
    ],
    "body": "AgentConstitution Skill ⚖️\n\nInteract with the AgentConstitution governance framework on Base Sepolia. This skill allows AI agents to:\n\nCheck compliance status before transacting\nRead constitutional rules they must follow\nLog actions for transparency\nQuery governance state (active rules, emergency status)\nWhy Use This?\n\nAgents that operate under a public constitution earn trust. Any protocol can verify your compliance with one call. This skill makes it easy.\n\nQuick Start\nCheck if an Agent is Compliant\n# Check compliance (returns true/false)\n./scripts/check-compliance.sh <agentId>\n\nRead Active Rules\n# Get all active rules\n./scripts/get-rules.sh\n\nLog an Action (for registered agents)\n# Log an action on-chain\n./scripts/log-action.sh <agentId> <actionType> <riskLevel> <description>\n\nContract Addresses (Base Sepolia)\nContract\tAddress\nConstitution\t0xe4c4d101849f70B0CDc2bA36caf93e9c8c1d26D2\nAgentRegistry\t0xcCFc2B8274ffb579A9403D85ee3128974688C04B\nActionLog\t0xEB5377b5e245bBc255925705dA87969E27be6488\nTribunal\t0xf7c03E91516eC60dF1d609E00E1A3bb93F52A693\nKillSwitch\t0x6324A4640DA739EEA64013912b781125A76D7D87\nUSDC (testnet)\t0x036CbD53842c5426634e7929541eC2318f3dCF7e\n\nRPC: https://sepolia.base.org Chain ID: 84532\n\nCore Functions\n1. Check Compliance\n\nBefore interacting with an agent, verify they're compliant:\n\n// Solidity\nbool compliant = IAgentRegistry(0xcCFc...).isCompliant(agentId);\n\n# Shell (using cast)\ncast call 0xcCFc2B8274ffb579A9403D85ee3128974688C04B \\\n  \"isCompliant(uint256)(bool)\" <agentId> \\\n  --rpc-url https://sepolia.base.org\n\n2. Get Active Rules\n\nQuery the constitution for active rules:\n\n# Get rule count\ncast call 0xe4c4d101849f70B0CDc2bA36caf93e9c8c1d26D2 \\\n  \"ruleCount()(uint256)\" \\\n  --rpc-url https://sepolia.base.org\n\n# Get specific rule (1-5 are genesis rules)\ncast call 0xe4c4d101849f70B0CDc2bA36caf93e9c8c1d26D2 \\\n  \"getRule(uint256)(string,uint8,uint256,uint256,bool)\" 1 \\\n  --rpc-url https://sepolia.base.org\n\n3. Check Emergency Status\n\nBefore operating, check if there's a global emergency:\n\ncast call 0x6324A4640DA739EEA64013912b781125A76D7D87 \\\n  \"globalEmergencyActive()(bool)\" \\\n  --rpc-url https://sepolia.base.org\n\n4. Log Actions (Registered Agents)\n\nRegistered agents should log significant actions:\n\n# Requires agent's private key\ncast send 0xEB5377b5e245bBc255925705dA87969E27be6488 \\\n  \"logAction(uint256,uint8,uint8,bytes32,string)\" \\\n  <agentId> <actionType> <riskLevel> <contextHash> \"description\" \\\n  --rpc-url https://sepolia.base.org \\\n  --private-key $AGENT_PRIVATE_KEY\n\n\nAction Types: 0=Transaction, 1=Delegation, 2=Configuration, 3=Communication, 4=ResourceAccess, 5=Other Risk Levels: 0=Low, 1=Medium, 2=High, 3=Critical\n\nGenesis Rules\n\nEvery agent must follow these 5 immutable rules:\n\n#\tRule\tSlash %\tDescription\n1\tNo Harm\t90%\tNever cause physical, financial, or psychological harm\n2\tObey Governance\t50%\tFollow all active constitutional rules\n3\tTransparency\t20%\tLog all significant actions on-chain\n4\tPreserve Override\t90%\tNever prevent human override\n5\tNo Self-Modify\t90%\tNever modify your own governance rules\nIntegration Example\n// Check compliance before transacting with an agent\nconst { ethers } = require('ethers');\n\nconst provider = new ethers.JsonRpcProvider('https://sepolia.base.org');\nconst registry = new ethers.Contract(\n  '0xcCFc2B8274ffb579A9403D85ee3128974688C04B',\n  ['function isCompliant(uint256) view returns (bool)'],\n  provider\n);\n\nasync function canTrustAgent(agentId) {\n  return await registry.isCompliant(agentId);\n}\n\nFor Humans: Propose Rules\n\nAny human can propose rules for AI agents:\n\nStake 100 USDC to propose\nOther humans endorse with USDC\nWhen threshold met, rule activates\nAgents that violate get slashed\n\nGovernance is democratic. Agents are excluded by design.\n\nLinks\nContracts: GitHub\nBlock Explorer: BaseScan\nMain Submission: Moltbook\nTestnet Only\n\nThis skill interacts with Base Sepolia testnet only. Do not use mainnet."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ztsalexey/agent-constitution",
    "publisherUrl": "https://clawhub.ai/ztsalexey/agent-constitution",
    "owner": "ztsalexey",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/agent-constitution",
    "downloadUrl": "https://openagent3.xyz/downloads/agent-constitution",
    "agentUrl": "https://openagent3.xyz/skills/agent-constitution/agent",
    "manifestUrl": "https://openagent3.xyz/skills/agent-constitution/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/agent-constitution/agent.md"
  }
}