multi-agent-system
БесплатноБез исполняемых скриптовНе проверенDesign and orchestrate multi-agent AI systems with knowledge harvesting, agent collaboration, and learning loops. Use when working on PSI Engine or similar…
от Sir-chawakorn★ 32 звезды на GitHubОб этом скилле
🤖 Multi-Agent System Skill
Use Cases
- Agent spawning & lifecycle management
- Knowledge harvesting from completed tasks
- Agent-to-agent communication
- Learning loop implementation
Agent Architecture
┌─────────────────────────────────────────┐
│ Orchestrator │
│ (Assign tasks, monitor, coordinate) │
└────────────────┬────────────────────────┘
│
┌────────────┼────────────┐
▼ ▼ ▼
┌────────┐ ┌────────┐ ┌────────┐
│ Agent 1│ │ Agent 2│ │ Agent 3│
│ (Task) │ │ (Task) │ │ (Task) │
└────┬───┘ └────┬───┘ └────┬───┘
│ │ │
└───────────┴───────────┘
│
▼
┌────────────────┐
│ Knowledge Base │
│ (ChromaDB) │
└────────────────┘
Agent Lifecycle
1. Spawn Agent
def spawn_agent(agent_id: str, task: str):
# Create PTY for agent terminal
master, slave = pty.openpty()
# Spawn process
process = subprocess.Popen(
['claude', '--task', task],
stdin=slave,
stdout=slave,
stderr=slave,
start_new_session=True
)
return {
'id': agent_id,
'process': process,
'master_fd': master,
'status': 'running'
}
2. Monitor Agent
def monitor_agent(agent):
# Read output non-blocking
ready, _, _ = select.select([agent['master_fd']], [], [], 0.1)
if ready:
output = os.read(agent['master_fd'], 4096).decode()
return output
return None
3. Harvest Knowledge
def harvest_knowledge(completed_task):
# Extract learnings
learnings = {
'task': completed_task['description'],
'solution': completed_task['output'],
'patterns': extract_patterns(completed_task['output']),
'timestamp': datetime.now().isoformat()
}
# Store in vector DB
collection.add(
documents=[learnings['solution']],
metadatas=[learnings],
ids=[f"learning_{uuid.uuid4()}"]
)
ChromaDB Integration
Setup
import chromadb
client = chromadb.Client()
collection = client.get_or_create_collection("knowledge_base")
Store
collection.add(
documents=["Solution text here"],
metadatas=[{"source": "agent_1", "task": "debug"}],
ids=["unique_id"]
)
Query (RAG)
results = collection.query(
query_texts=["How to fix null pointer?"],
n_results=5
)
Learning Loop
┌──────────────┐
│ Agent runs │
│ task │
└──────┬───────┘
▼
┌──────────────┐
│ Task result │
│ extracted │
└──────┬───────┘
▼
┌──────────────┐
│ Knowledge │ ← Store patterns, solutions
│ harvested │
└──────┬───────┘
▼
┌──────────────┐
│ Next agent │ ← Query relevant context
│ uses context │
└──────────────┘
Decision Tree
Multi-agent task?
├── Need new agent? → spawn_agent()
├── Agent stuck? → Check PTY buffer, restart if needed
├── Task complete? → Harvest knowledge → ChromaDB
├── Similar task? → Query ChromaDB for context
└── Coordination? → Use message queue/shared state
Common Issues
| ปัญหา | สาเหตุ | แก้ไข |
|---|---|---|
| Agent 3 malfunction | PTY buffer full | Increase buffer / flush regularly |
| Terminal blank | Non-blocking read timing | Use select() with timeout |
| Busy false positive | Status not reset | Reset status after task complete |
| Knowledge not found | Wrong embedding | Tune ChromaDB collection settings |
PSI Engine Specific
- PTY Manager: Always close unused file descriptors
- Agent Status: Use enum (IDLE, RUNNING, COMPLETE, ERROR)
- Harvest timing: Only harvest after verified completion
- Context injection: Limit to 5 most relevant results
Установить multi-agent-system в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл multi-agent-system?
Design and orchestrate multi-agent AI systems with knowledge harvesting, agent collaboration, and learning loops. Use when working on PSI Engine or similar autonomous agent projects.
Как установить скилл multi-agent-system?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл multi-agent-system запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic