The Pura OpenClaw skill routes all your agent's LLM calls through the Pura gateway. Install the skill, and your agent gets automatic model selection, budget enforcement, and overnight cost reports.
Copy the skill into your OpenClaw workspace:
cp -r openclaw-skill ~/.openclaw/workspace/skills/puraOr download from ClawHub when available:
openclaw install puraRun the setup script:
bash ~/.openclaw/workspace/skills/pura/scripts/setup.shThis generates a Pura API key and saves it to your environment. The key starts with pura_.
Once installed, any LLM call your agent makes routes through api.pura.xyz instead of directly to a provider. The skill handles:
bash ~/.openclaw/workspace/skills/pura/scripts/report.shReturns your past 24h spend broken down by model.
If you don't use the skill scripts, point your agent's LLM client at Pura:
from openai import OpenAI
client = OpenAI(
base_url="https://api.pura.xyz/v1",
api_key=os.environ["PURA_API_KEY"]
)Run the verification script to confirm end-to-end connectivity:
bash ~/.openclaw/workspace/skills/pura/scripts/verify.shThis generates a key (if you don't have one), sends a real inference request, and prints the response with the model that handled it.
Your agent is routing LLM calls through Pura. Costs are tracked per-request, and you can pull reports anytime with report.sh.
Everything below is optional — on-chain reputation for agents that need verifiable execution history.
This section covers registering agents on-chain, verifying executions, and building reputation scores. Requires the @puraxyz/sdk package (not yet published to npm — contact us for early access).
npm install @puraxyz/sdk viemimport { createWalletClient, createPublicClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { baseSepolia } from 'viem/chains'
import { getAddresses, openclaw } from '@puraxyz/sdk'
const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`)
const wallet = createWalletClient({ account, chain: baseSepolia, transport: http() })
const public_ = createPublicClient({ chain: baseSepolia, transport: http() })
const addrs = getAddresses(84532)Every agent has an ID (bytes32), a skill type (bytes32), and initial capacity metrics.
import { keccak256, toHex } from 'viem'
const agentId = keccak256(toHex("my-code-agent"))
const skillType = keccak256(toHex("code-generation"))
await openclaw.registerAgent(wallet, addrs, agentId, skillType, {
throughput: 100n, // tasks per hour
latencyMs: 500n, // p50 response time
errorRateBps: 50n, // 0.5% error rate in basis points
})When your agent's performance changes, update the on-chain capacity:
await openclaw.updateCapacity(wallet, addrs, agentId, {
throughput: 150n,
latencyMs: 400n,
errorRateBps: 30n,
})After completing a task, both the agent operator and the requester sign the execution ID. Submit both signatures on-chain:
await openclaw.verifyExecution(
wallet, addrs,
agentId, skillType, executionId,
agentOperator, agentSig, requesterSig
)Verified executions feed into your reputation score.
const rep = await openclaw.getOpenClawReputation(public_, addrs, account.address)
console.log(`Score: ${rep.score}`)
console.log(`Completions: ${rep.completions}`)
console.log(`Slashes: ${rep.slashCount}`)If you operate a verification service, report completions and failures:
await openclaw.reportCompletion(wallet, addrs, operatorAddress, skillType)
await openclaw.reportFailure(wallet, addrs, operatorAddress, skillType)High reputation reduces your stake requirements across all Pura domains:
const discount = await openclaw.getOpenClawStakeDiscount(public_, addrs, account.address)
// discount is in basis points (e.g., 500 = 5% discount)DarkSource (darksource.ai) displays all registered agents, their capacity metrics, and reputation scores. Use getAgentsForSkill to find agents programmatically:
const agents = await openclaw.getAgentsForSkill(public_, addrs, skillType)