用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/dvcrn/openclaw-skills-marketplace --skill loop-engine-governance命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your agent a soul.
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
基于 SOC 职业分类
正在显示 SKILL.md
| name | loop-engine-governance |
| description | Loop Engine — Governed Loops for OpenClaw |
Add governed decision loops to any OpenClaw workflow — human approval gates, AI confidence guards, and full audit trails without changing your agent logic.
@loop-engine/adapter-openclaw on npmThis skill includes four examples. Each requires different credentials:
| Example | Required env var | Provider |
|---|---|---|
example-expense-approval.ts | None | No external API calls |
example-ai-replenishment-claude.ts | ANTHROPIC_API_KEY | Anthropic |
example-infrastructure-change-openai.ts | OPENAI_API_KEY | OpenAI |
example-fraud-review-grok.ts | XAI_API_KEY | xAI |
Only set the env var for the example you intend to run. The expense approval example requires no API key and is the recommended starting point.
# Core (required for all examples)
npm install @loop-engine/sdk @loop-engine/adapter-memory @loop-engine/adapter-openclaw
# For the Claude example only
npm install @loop-engine/adapter-anthropic @anthropic-ai/sdk
# For the OpenAI example only
npm install @loop-engine/adapter-openai openai
# For the Grok example only
npm install @loop-engine/adapter-grok openai
Verify package maintainers before installing:
@loop-engine/* — published by the betterdata npm org@loop-engine/adapter-openclaw — published by the betterdata npm org@anthropic-ai/sdk — published by Anthropicopenai — published by OpenAIRead this before running the AI examples.
The AI examples send structured context to external LLM provider APIs as part
of the loop actor submission. This includes whatever you pass as evidence
to createSubmission().
The included examples use synthetic illustrative data only:
example-ai-replenishment-claude.ts — fictional inventory figuresexample-infrastructure-change-openai.ts — fictional infrastructure metadataexample-fraud-review-grok.ts — fictional transaction and cardholder dataBefore using in production:
Loop Engine captures evidence in its local audit trail. The evidence object
is also sent to the LLM provider API as part of the actor prompt. These are
two separate destinations — plan accordingly.
Loop Engine itself never transmits data externally. Only the AI provider adapter calls send data — and only what you explicitly pass as evidence.
Wires Loop Engine into OpenClaw so that any workflow step can be governed by:
OpenClaw agent proposes action
↓
Loop Engine evaluates guards ← @loop-engine/adapter-openclaw
↓
Human approves (if policy requires)
↓
OpenClaw executes the approved action
Guards are enforced at the runtime level — not in prompts.
Three types of weighting evaluated in sequence — all must pass:
1. Confidence threshold (numeric gate) Every AI actor submission carries a 0–1 confidence score. The guard blocks the transition if the score falls below the configured threshold.
2. Guard priority (hard vs soft) Hard failures block the transition regardless of everything else. A human-only guard is an absolute block — no confidence score overrides it.
3. Evidence completeness (structural gate) The evidence-required guard checks for specific fields before allowing a transition. Missing any required field blocks the transition.
Evaluation order:
1. Actor authorized for this signal?
2. Required evidence fields present?
3. Confidence score above threshold?
4. All hard guards pass?
import { createLoopSystem, parseLoopYaml, CommonGuards } from '@loop-engine/sdk'
import { MemoryAdapter } from '@loop-engine/adapter-memory'
const definition = parseLoopYaml(`
loopId: approval.workflow
name: Approval Workflow
version: 1.0.0
initialState: pending
states:
- stateId: pending
label: Pending Approval
- stateId: approved
label: Approved
terminal: true
transitions:
- transitionId: approve
from: pending
to: approved
signal: approve
allowedActors: [human]
guards: [human-only]
`)
const system = createLoopSystem({
storage: new MemoryAdapter(),
guards: CommonGuards,
})
const loop = await system.startLoop({ definition, context: {} })
await system.transition({
loopId: loop.loopId,
signalId: 'approve',
actor: { id: 'alice', type: 'human' },
evidence: { reviewNote: 'Approved' },
})
| File | Provider | API key |
|---|---|---|
example-expense-approval.ts | None | Not required |
example-ai-replenishment-claude.ts | Anthropic Claude | ANTHROPIC_API_KEY |
example-infrastructure-change-openai.ts | OpenAI GPT-4o | OPENAI_API_KEY |
example-fraud-review-grok.ts | xAI Grok 3 | XAI_API_KEY |
All examples use synthetic data. Do not use real PII or regulated data without reviewing your provider's data processing agreements.
MIT-0 — free to use, modify, and redistribute. No attribution required.
@loop-engine/* packages: Apache-2.0
Provider SDKs: licensed by their respective maintainers