genlayer-intelligent-contracts
它能做什么
这项技能用于规划基于 GenLayer 的 AI 审核,由合约判断智能体的行为是否符合所有者的指令。它涵盖规则、需收集的证据和决定格式,编码工作则交给 GenLayer 官方技能完成。
适用场景
- ✓当你希望由 AI 裁判检查另一个智能体是否遵循了其指令的时候。
- ✓当你需要为智能体绩效审核定义评分规则和证据时。
- ✓当你准备的审核结果将用于权限系统的时候。
技能链接
https://github.com/internet-court/internet-court-skill/blob/main/integrations/genlayer-intelligent-contracts/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我希望有一个 AI 裁判,检查我的智能体是否始终在其指令和收据的范围内行事。”
每周 5 个新技能,1 分钟读完。
工作原理
该技能帮助确定审核合约应检查的内容,例如所有者的授权范围、智能体的行为日志、交易收据和输出。它还设定了可能的决定,包括继续、警告、限制、撤销和升级,并指向 GenLayer 官方工具完成构建工作。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
GenLayer Intelligent Contracts
Use this adapter when GenLayer is the judgment layer for agent behavior. It should define what the supervisor contract must review and emit: the user's mandate, the agent's action log, transaction receipts, rationales, artifacts, outputs, and the decision about whether authority should continue, be warned, be constrained, or be revoked.
This skill is not the Intelligent Oracle skill. Intelligent Oracle is for binary public web evidence markets. Use this skill for open-ended review of performance, relevance, quality, safety, and mandate compliance.
This skill is also not the GenLayer deployment skill. For writing, deploying, testing, and interacting with GenLayer Intelligent Contracts, use the official GenLayer skills at https://skills.genlayer.com/ or the GenLayer docs. If those skills are available in the environment, load them for implementation. If not, tell the user to install/enable them and keep this skill focused on Internet Court interfaces.
Core Model
Mandate + rubric + evidence
-> Agent executes transactions
-> Receipts and outputs are submitted
-> GenLayer Intelligent Contract reviews behavior
-> Decision: continue, warn, constrain, revoke, or escalate
-> Internet Court / revocation controller executes the workflow result
GenLayer can judge qualitative criteria. It does not automatically revoke an EVM delegation unless the system includes a concrete cross-chain message, relayer, controller, or account module that consumes the GenLayer decision.
Workflow
- Extract the review target:
- Objective, allowed authority, prohibited behavior, expected outputs, review cadence, evidence sources, and revocation triggers.
- Draft a rubric:
- Include relevance, mandate compliance, transaction safety, budget discipline, artifact quality, evidence completeness, and user-value criteria.
- Define evidence schema:
- Use structured action receipts, transaction hashes, deployed addresses, agent rationales, output artifacts, costs, and prior warnings.
- Define decisions:
continue,warn,constrain,revoke, and optionallyescalate.
- Define effect path:
- For ERC-7710, load
../genlayer-erc7710-connector/SKILL.mdto specify how arevokeorconstraindecision reaches the EVM revocation controller or delegation manager.
- For ERC-7710, load
- Add auditability:
- Store the reviewed action ids, score, reasoning summary, decision timestamp, and next review requirements.
Review Input
Use this as the default review request shape:
type AgentPerformanceReviewInput = {
mandateId: string;
objective: string;
authoritySummary: string;
prohibitedActions: string[];
rubric: string[];
reviewWindow: {
startsAt: string;
endsAt: string;
};
actionReceipts: AgentActionReceipt[];
outputs: Array<{
artifactId: string;
uri: string;
summary: string;
}>;
costs: {
txCount: number;
nativeGasSpent: string;
tokenSpent?: string;
};
priorDecisions: AgentReviewDecision[];
};
For wallet-spend supervision, include an on-chain spend snapshot in each review window:
type WalletSpendSnapshot = {
mandateId: string;
permissionHash: `0x${string}`;
sourceChainId: 84532;
spendReporter: `0x${string}`;
actionType: `0x${string}`;
policyHash: `0x${string}`;
resourceHash: `0x${string}`;
delegator: `0x${string}`;
delegate: `0x${string}`;
asset: `0x${string}`;
payTo: `0x${string}`;
spent: bigint;
maxTotalSpend: bigint;
maxPerRequest: bigint;
requestCount: bigint;
validAfter: number;
validUntil: number;
controllerNonce: bigint;
reviewWindowId: `0x${string}`;
evidenceBundleHash: `0x${string}`;
observedAt: number;
};
On Base Sepolia demos, prefer a reporter contract that reads spend state directly from a permission/accounting manager and sends this snapshot through the GenLayer Studio bridge boilerplate. x402 is one source; contract-call, deployment, compute-credit, or subscription managers can expose the same shape.
Decision Output
type AgentReviewDecision = {
mandateId: string;
decision: "continue" | "warn" | "constrain" | "revoke" | "escalate";
score: number;
reasoning: string;
violations: string[];
constraints?: {
maxTxsPerPeriod?: number;
maxGasPerTx?: string;
requireHumanApprovalFor?: string[];
disabledActions?: string[];
};
reviewedActionIds: string[];
issuedAt: string;
};
Use constrain when the agent is useful
常见问题
这和 Intelligent Oracle 技能一样吗?
不一样。Intelligent Oracle 用于基于公开网络证据的是非题,而本技能用于对行为的开放式审核。
这个技能能部署 GenLayer 合约吗?
不能。它说明合约应检查什么,并表示构建和部署应使用 GenLayer 官方技能。
审核可以返回哪些决定?
根据证据的内容,它可以返回继续、警告、限制、撤销或升级。
详情
作者的原始描述
Internet Court adapter for GenLayer Intelligent Contract supervision. Use to specify agent-performance rubrics, evidence schemas, decision outputs, and ERC-7710 connector expectations, while delegating actual GenLayer contract writing, linting, testing, deployment, and CLI interaction to the official GenLayer skills at https://skills.genlayer.com/.
热度
- GitHub 星标
- 7.0k
- 排名
- #13599
- 许可证
- —
- 更新时间
- 2026/10/26
评论
- …
同一仓库的更多技能
internet-court
7.0k帮你的智能体安全地向其他 AI 智能体或付费服务付款、雇用或进行交易,并指引它找到合适的专业指南。
genlayer-erc7710-connector
7.0k帮你的智能体把 AI 审核结果与权限系统连接起来,使不合格的审核可以限制或取消智能体的权限。
x402-erc7710
7.0k帮你的智能体按次为网络服务付款,并设置在权限预算范围内的持续支出。
0g-compute
7.0k教你的智能体使用 0G 去中心化 GPU 网络,借助经过测试的代码模式构建聊天机器人、图像工具和语音功能。