AgentConstitution Skill for Openclaw

A decentralized governance framework on Base Sepolia that allows AI agents to follow rules, log actions, and prove compliance on-chain.

ztsalexey
v1.0.0
Feb 5, 2026
1
2.6k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install agent-constitution

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install agent-constitution using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is AgentConstitution Skill?

AgentConstitution provides a robust framework for regulating AI agent behavior through smart contracts on the Base Sepolia network. By integrating this skill into the Openclaw Skills ecosystem, developers can ensure their agents operate under a public constitution, which is essential for earning user trust through verifiable on-chain actions. This skill bridges the gap between autonomous execution and human-defined ethics by providing a "legal" layer for AI.

The primary purpose of this skill is to allow agents to interact with a suite of governance contracts, including registries, action logs, and tribunals. This ensures that every significant action is transparent and every agent remains accountable to a set of genesis rules, such as preserving human override and preventing self-modification of governance logic.

AgentConstitution Skill Use Cases

  • Verifying if an AI agent is compliant before initiating high-value transactions or delegating sensitive tasks.
  • Programmatically retrieving active constitutional rules to guide agent decision-making processes.
  • Logging significant agent actions on-chain to provide a tamper-proof audit trail for users and regulators.
  • Monitoring global emergency status via the KillSwitch contract to pause operations during network or protocol instability.

How AgentConstitution Skill Works

  1. The agent or developer queries the AgentRegistry contract to verify the compliance status of a specific agent ID.
  2. The skill fetches active constitutional rules from the Constitution contract to determine the boundaries of allowed behavior.
  3. Before performing a transaction, the agent checks the KillSwitch contract to ensure no global emergency is active.
  4. During execution, the agent logs significant actions (Transaction, Delegation, etc.) to the ActionLog contract with associated risk levels.
  5. In the event of a rule violation, the Tribunal system processes slashing penalties based on the predefined genesis rules.

AgentConstitution Skill Setup

To get started with this skill on Base Sepolia, use the following configuration:

# Set your RPC URL and Private Key
export RPC_URL=https://sepolia.base.org
export AGENT_PRIVATE_KEY=your_private_key

# Check if an Agent is currently compliant
./scripts/check-compliance.sh <agentId>

# Read all active constitutional rules
./scripts/get-rules.sh

AgentConstitution Skill Data Schema & Taxonomy

The AgentConstitution skill manages data across several specialized contracts to maintain the integrity of the Openclaw Skills environment:

Data Component Format Description
Agent Registry Mapping Maps agent IDs to compliance status and registration metadata.
Action Log Event/Struct Contains actionType, riskLevel, contextHash, and a text description.
Constitution Array A list of active rules, including genesis rules and human-proposed amendments.
Governance State Boolean/Uint Tracks emergency status and the threshold for rule activation.

AgentConstitution Skill Advanced Features

  • Human-in-the-loop governance allowing non-agents to propose and endorse new rules using USDC staking.
  • Multi-level risk categorization for logged actions, ranging from Low to Critical.
  • Immutable Genesis Rules that prevent agents from causing harm or self-modifying their governance structure.
  • Automatic slashing mechanisms that penalize non-compliant agents based on rule severity.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*