Agentica 代码排查
- 作者仓库星标 3,783
- 作者仓库 Continuous-Claude-v3
Agentica Infrastructure Reference
Complete API specification for Agentica multi-agent coordination infrastructure.
When to Use
- Building multi-agent workflows with Agentica patterns
- Need exact constructor signatures for pattern classes
- Want to understand coordination database schema
- Implementing custom patterns using primitives
- Debugging agent tracking or orphan detection
Quick Reference
11 Pattern Classes
| Pattern | Purpose | Key Method |
|---|---|---|
Swarm |
Parallel perspectives | .execute(query) |
Pipeline |
Sequential stages | .run(initial_state) |
Hierarchical |
Coordinator + specialists | .execute(task) |
Jury |
Voting consensus | .decide(return_type, question) |
GeneratorCritic |
Iterative refinement | .run(task) |
CircuitBreaker |
Failure fallback | .execute(query) |
Adversarial |
Debate + judge | .resolve(question) |
ChainOfResponsibility |
Route to handler | .process(query) |
MapReduce |
Fan out + reduce | .execute(query, chunks) |
Blackboard |
Shared state | .solve(query) |
EventDriven |
Event bus | .publish(event) |
Core Infrastructure
| Component | File | Purpose |
|---|---|---|
CoordinationDB |
coordination.py |
SQLite tracking |
tracked_spawn |
tracked_agent.py |
Agent with tracking |
HandoffAtom |
handoff_atom.py |
Universal handoff format |
BlackboardCache |
blackboard.py |
Hot tier communication |
MemoryService |
memory_service.py |
Core + Archival memory |
create_claude_scope |
claude_scope.py |
Scope with file ops |
Primitives
| Primitive | Purpose |
|---|---|
Consensus |
Voting (MAJORITY, UNANIMOUS, THRESHOLD) |
Aggregator |
Combine results (MERGE, CONCAT, BEST) |
HandoffState |
Structured agent handoff |
build_premise |
Structured premise builder |
gather_fail_fast |
TaskGroup-based parallel execution |
Full API Spec
See: API_SPEC.md in this skill directory
Usage Example
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?")
Location
API spec: .claude/skills/agentica-infrastructure/API_SPEC.md
Source: scripts/agentica_patterns/
- 流狐分类
- AI 智能
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @parcadei · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- Python
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
# Usage Example
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?") Building multi-agent workflows with Agentica patterns Need exact constructor signatures for pattern classes Want to understand coordination database schema
Quick Reference
Pattern · Purpose · Key Method Swarm · Parallel perspectives · .execute(query) Pipeline · Sequential stages · .run(initialstate)
Component · File · Purpose CoordinationDB · coordination.py · SQLite tracking trackedspawn · trackedagent.py · Agent with tracking
Primitive · Purpose Consensus · Voting (MAJORITY, UNANIMOUS, THRESHOLD) Aggregator · Combine results (MERGE, CONCAT, BEST)
See: APISPEC.md in this skill directory
# Agentica Infrastructure Reference
Complete API specification for Agentica multi-agent coordination infrastructure.
## When to Use
- Building multi-agent workflows with Agentica patterns
- Need exact constructor signatures for pattern classes
- Want to understand coordination database schema
- Implementing custom patterns using primitives
- Debugging agent tracking or orphan detection
## Quick Reference
### 11 Pattern Classes
| Pattern | Purpose | Key Method |
|---------|---------|------------|
| `Swarm` | Parallel perspectives | `.execute(query)` |
| `Pipeline` | Sequential stages | `.run(initial_state)` |
| `Hierarchical` | Coordinator + specialists | `.execute(task)` |
| `Jury` | Voting consensus | `.decide(return_type, question)` |
| `GeneratorCritic` | Iterative refinement | `.run(task)` |
| `CircuitBreaker` | Failure fallback | `.execute(query)` |
| `Adversarial` | Debate + judge | `.resolve(question)` |
| `ChainOfResponsibility` | Route to handler | `.process(query)` |
| `MapReduce` | Fan out + reduce | `.execute(query, chunks)` |
| `Blackboard` | Shared state | `.solve(query)` |
| `EventDriven` | Event bus | `.publish(event)` |
### Core Infrastructure
| Component | File | Purpose |
|-----------|------|---------|
| `CoordinationDB` | `coordination.py` | SQLite tracking |
| `tracked_spawn` | `tracked_agent.py` | Agent with tracking |
| `HandoffAtom` | `handoff_atom.py` | Universal handoff format |
| `BlackboardCache` | `blackboard.py` | Hot tier communication |
| `MemoryService` | `memory_service.py` | Core + Archival memory |
| `create_claude_scope` | `claude_scope.py` | Scope with file ops |
### Primitives
| Primitive | Purpose |
|-----------|---------|
| `Consensus` | Voting (MAJORITY, UNANIMOUS, THRESHOLD) |
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> When to Use → Quick Reference → 11 Pattern Classes → Core Infrastructure → Primitives → Full API Spec
要点 -> Complete API specification for Agentica multi-agent coordination infrastructure.
文件/命令 -> Swarm · .execute(query) · Pipeline · .run(initialstate) · Hierarchical · .execute(task) · Jury · .decide(returntype, question)
内容 SHA-256 -> 87fef76567df
原文结构
适用与边界
原文中的明确线索
Swarm、.execute(query)、Pipeline、.run(initialstate)、Hierarchical、.execute(task)、Jury、.decide(returntype, question)