← 返回 Skills 市场
jose-compu

Concurrent Process Algebra for AI Agents

作者 José I. O. · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ✓ 安全检测通过
91
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install cpa-agents
功能描述
Manage AI agent workflows using concurrent process algebra patterns like parallel tasks, branch-fix loops, fan-out comparisons, and session status tracking.
使用说明 (SKILL.md)

CPA Agents for OpenClaw

Version: 2.0.0

Use concurrent process algebra for practical multi-agent orchestration in OpenClaw. This skill is focused on production workflows: parallel execution, branch-fix loops, model fan-out, and session status introspection.

Install

1) Install library dependency

npm install cpa-agents

2) Create skill entrypoint

import { createOpenClawSkill } from "cpa-agents/adapters/openclaw";

export default createOpenClawSkill();

3) Runtime prerequisites

  • OpenClaw Gateway is running and reachable.
  • Skill host supports async command handlers.
  • Session context provides appendEvent for trace streaming.

Advanced operators

Use these when you need stronger control over failures, rollback, and data lineage.

Undo / rollback (invertible + saga)

  • invertible(forward, undo) defines a step plus compensating action.
  • saga([...steps]) executes steps in order; on failure, runs undo in reverse order.
  • Best for workflows with side effects (branch creation, file writes, merges, etc.).

Pattern:

import { invertible, saga } from "cpa-agents";

const workflow = saga([
  invertible(createBranch, deleteBranch),
  invertible(writeCode, revertCode),
  invertible(runValidation, cleanupValidation),
]);

Provenance (converse)

  • converse(R, inverseFn) is relational provenance, not operational undo.
  • Use it to answer: "which input(s) could have produced this output?"
  • Keep this separate from rollback logic (invertible/saga).

Pattern:

import { rel, converse } from "cpa-agents";

const generate = rel("generate", async (prompt: string) => [prompt + "-out"]);
const provenance = converse(generate, async (output: string) => [output.replace("-out", "")]);

Guarded flow (guard, guardValue, ifThenElse)

  • Use guard(...) to block unsafe execution.
  • Use guardValue(...) when a required value must exist.
  • Combine with ifThenElse(...) for conditional routing.

Reliability (retryWithBackoff, timeout, or)

  • retryWithBackoff for transient failures.
  • timeout(ms, process) to bound execution.
  • or(primary, fallback) for fallback routing when primary fails.

Practical guidance: undo vs converse

  • Use undo (invertible + saga) when you must reverse side effects.
  • Use converse for provenance/audit and lineage queries.
  • Typical production setup uses both:
    • saga during execution
    • converse for post-run explainability

Commands

parallel

Run independent tasks concurrently.

{
  "tasks": [
    "analyze failing tests",
    "draft fix proposal",
    "write migration notes"
  ],
  "timeout": 300000
}

branch-fix

Run one task, and if errors are returned, branch into fix flow and continue.

{
  "task": "implement auth middleware and resolve lint issues",
  "timeout": 300000
}

fan-out

Run the same task across multiple models and merge outputs.

{
  "task": "propose API surface for agent orchestration",
  "models": ["model-a", "model-b"],
  "timeout": 300000
}

status

Return the current CPA process tree/status for the session.

{}

Recommended prompts

  • "Run parallel: audit security risks, propose patch plan, generate tests"
  • "Branch-fix this refactor until no type errors remain"
  • "Fan-out this architecture question across two models and compare"
  • "Show cpa status"
  • "Execute as saga: create branch, patch files, validate, rollback on failure"
  • "Show provenance: what input likely produced this output?"

Troubleshooting

  • Gateway not connected:
    • Start OpenClaw Gateway and retry.
  • Unknown command:
    • Use one of: parallel, branch-fix, fan-out, status.
  • Timeout:
    • Increase timeout in command args.
  • Missing session events:
    • Ensure session context is present and appendEvent is enabled.
  • Rollback did not occur:
    • Verify steps are wrapped with invertible(...) and executed with saga(...).
  • Provenance unclear:
    • Provide an explicit inverseFn when defining converse(...).
安全使用建议
This skill appears coherent and focused on orchestrating agent workflows. Before installing or running it: 1) inspect the npm package `cpa-agents` (owner, recent releases, package contents, and dependencies) since the skill instructs you to install it and the repository/source is not provided in SKILL.md; 2) run the package in a sandboxed/dev environment first (not on production agents) to observe behavior; 3) verify the OpenClaw Gateway and session context APIs (especially appendEvent) do not expose secrets to third-party code; and 4) prefer packages with a verifiable homepage/repo and known maintainers—absence of those increases supply-chain risk. If you want higher assurance, provide the package source or a pinned, audited release before use.
功能分析
Type: OpenClaw Skill Name: cpa-agents Version: 2.0.0 The skill bundle provides orchestration utilities for multi-agent workflows based on concurrent process algebra (CPA) principles, including support for Sagas (rollback logic), parallel execution, and provenance tracking. The implementation in SKILL.md is a standard wrapper for the 'cpa-agents' npm package, and the instructions provided to the agent are consistent with the stated purpose of managing complex task flows without any evidence of malicious intent, data exfiltration, or prompt injection.
能力评估
Purpose & Capability
The name/description (concurrent process algebra for agent workflows) matches the runtime instructions: creating an OpenClaw skill, using patterns like saga/invertible/converse, and providing parallel/branch-fix/fan-out/status commands. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md stays on-topic: it documents how to install a library, create a skill entrypoint, required runtime context (OpenClaw Gateway, session appendEvent), and the JSON command shapes. It does not instruct the agent to read unrelated files, exfiltrate data, or access unexpected endpoints.
Install Mechanism
There is no built-in install spec, but the instructions direct the operator to run `npm install cpa-agents`. Using npm is a common pattern, but npm packages can contain arbitrary code — the skill itself provides no code to review, so the runtime behavior will depend entirely on this external package.
Credentials
The skill declares no required environment variables, credentials, or config paths and the instructions only require session context methods (appendEvent) and a reachable OpenClaw Gateway—these are proportional to an orchestration skill.
Persistence & Privilege
The skill is not always-enabled and does not request elevated platform-wide privileges. It does not instruct modifying other skills or global agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cpa-agents
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cpa-agents 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
Version 2.0.0 introduces advanced agent orchestration and workflow control operators. - Adds "advanced operators" section with support for invertible actions, sagas (undo/rollback), provenance tracking, guarded flow, and reliability patterns. - Clarifies differences and complementary use of undo/rollback (`invertible`/`saga`) vs. provenance (`converse`). - Expands and updates command documentation, example patterns, and recommended prompts. - Refines troubleshooting guidance for production use and complex workflows. - Rearranges and updates documentation layout for clearer onboarding and advanced usage.
v1.0.0
Initial release of CPA Agents for OpenClaw. - Implements concurrent agent workflows with support for: parallel tasks, branch-fix/recovery loops, fan-out evaluation, and session-aware status tracking. - Provides commands: parallel, branch-fix, fan-out, and status. - Includes setup instructions, runtime requirements, detailed command formats, and troubleshooting guidance.
元数据
Slug cpa-agents
版本 2.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Concurrent Process Algebra for AI Agents 是什么?

Manage AI agent workflows using concurrent process algebra patterns like parallel tasks, branch-fix loops, fan-out comparisons, and session status tracking. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 91 次。

如何安装 Concurrent Process Algebra for AI Agents?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cpa-agents」即可一键安装,无需额外配置。

Concurrent Process Algebra for AI Agents 是免费的吗?

是的,Concurrent Process Algebra for AI Agents 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Concurrent Process Algebra for AI Agents 支持哪些平台?

Concurrent Process Algebra for AI Agents 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Concurrent Process Algebra for AI Agents?

由 José I. O.(@jose-compu)开发并维护,当前版本 v2.0.0。

💬 留言讨论