mcpField
A
agentica-infrastructure

agentica-infrastructure

github.com/parcadeiAgent 工作流3.9k477 次安装39 周前更新
代码仓库

关于 agentica-infrastructure

Agentica 多 Agent 协调基础设施的 API 参考技能,供开发者构建工作流、查阅模式签名与协调数据,并基于原语创建自定义模式。

主要功能

  1. 0111 种协调模式参考
  2. 02核心基础设施组件概览
  3. 03原语说明与用法
  4. 04提供完整 API 规范入口

适用场景

  1. 01构建 Agentica 多 Agent 工作流
  2. 02查询模式构造函数签名
  3. 03调试 Agent 跟踪与孤立检测

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/parcadei/continuous-claude-v3 --skill agentica-infrastructure

安装后在 Claude Code 中输入/agentica-infrastructure确认已加载。

附带文件API_SPEC.md

详细介绍

Agentica 基础设施参考

Agentica 多 Agent 协调基础设施的完整 API 规范。

适用场景

  • 使用 Agentica 模式构建多 Agent 工作流
  • 需要模式类的准确构造函数签名
  • 想要了解协调数据库架构
  • 使用基本组件实现自定义模式
  • 调试 Agent 跟踪或孤立 Agent 检测

快速参考

11 种模式类
模式用途关键方法
Swarm并行视角.execute(query)
Pipeline顺序阶段.run(initial_state)
Hierarchical协调器 + 专家.execute(task)
Jury投票达成共识.decide(return_type, question)
GeneratorCritic迭代优化.run(task)
CircuitBreaker失败回退.execute(query)
Adversarial辩论 + 裁决.resolve(question)
ChainOfResponsibility路由至处理器.process(query)
MapReduce扇出 + 归并.execute(query, chunks)
Blackboard共享状态.solve(query)
EventDriven事件总线.publish(event)
核心基础设施
组件文件用途
CoordinationDBcoordination.pySQLite 跟踪
tracked_spawntracked_agent.py带跟踪功能的 Agent
HandoffAtomhandoff_atom.py通用交接格式
BlackboardCacheblackboard.py热层通信
MemoryServicememory_service.py核心 + 归档记忆
create_claude_scopeclaude_scope.py带文件操作的作用域
基本组件
基本组件用途
Consensus投票(MAJORITY、UNANIMOUS、THRESHOLD)
Aggregator合并结果(MERGE、CONCAT、BEST)
HandoffState结构化 Agent 交接
build_premise结构化前提构建器
gather_fail_fast基于 TaskGroup 的并行执行

完整 API 规范

参见:此技能目录中的 API_SPEC.md

用法示例

from scripts.agentica_patterns.patterns import Swarm, Jury
from scripts.agentica_patterns.primitives import ConsensusMode
from scripts.agentica_patterns.coordination import CoordinationDB
from scripts.agentica_patterns.tracked_agent import tracked_spawn

# Create tracking database
db = CoordinationDB(session_id="my-session")

# Swarm with tracking
swarm = Swarm(
    perspectives=["Security expert", "Performance expert"],
    db=db
)
result = await swarm.execute("Review this code")

# Jury with consensus
jury = Jury(
    num_jurors=3,
    consensus_mode=ConsensusMode.MAJORITY,
    premise="You evaluate code quality",
    db=db
)
verdict = await jury.decide(bool, "Is this code production ready?")

位置

API 规范:.claude/skills/agentica-infrastructure/API_SPEC.md 源代码:scripts/agentica_patterns/

评论

支持 Markdown