PromptsForYou.onlineAI Media & Prompt Library
Featured AI Platform

Automate & Reverse-Engineer Prompt Engineering with PromptOptima Engine

Prompt Engineering & Reasoning 2026-07-29 3 min read

Multi-Agent Swarm Coordinator (Kimi, AutoGen & CrewAI Manager): SOUL.md, MEMORY.md, and AGENTS.md Directives

Master multi-agent swarm orchestration. Get a ready-to-use SOUL.md, MEMORY.md, and AGENTS.md template for managing agent swarms in Kimi, AutoGen, CrewAI, and Claude Code.

Verified AI Researcher

Peer-Reviewed & Benchmarked

Multi-Agent Swarm Coordinator (Kimi, AutoGen & CrewAI Manager): SOUL.md, MEMORY.md, and AGENTS.md Directives

As enterprise AI implementations scale beyond individual AI agents, multi-agent frameworks—such as Kimi Agentic Swarm, Microsoft AutoGen, CrewAI, MetaGPT, and multi-agent Claude Code setups—have become the industry standard for complex software automation.

In a multi-agent swarm, individual specialized agents (such as a Researcher Agent, Developer Agent, QA Agent, and DevOps Agent) must collaborate seamlessly under the guidance of a Swarm Coordinator Agent.

To prevent agents from talking in loops, stepping on each other's work, or losing track of the master goal, modern swarm architectures introduce a third core configuration file: `AGENTS.md` (Sub-Agent Routing & Protocol Definition), alongside `SOUL.md` (Coordinator Persona) and `MEMORY.md` (Global Swarm State).

In this culminating guide, we unpack the complete 3-file multi-agent swarm specification (`SOUL.md`, `MEMORY.md`, and `AGENTS.md`) and provide a ready-to-use production template.

---

1. The 3-File Swarm Architecture Topology

```

[Swarm Master Workspace]

├── SOUL.md <── Coordinator Persona, Consensus Rules, & Quality Gates

├── MEMORY.md <── Global Swarm Task DAG, Active Token Budget, & Output Log

├── AGENTS.md <── Sub-Agent Roster, Tool Permissions, & Hand-off Routing Rules

└── agents/ <── Sub-Agent Specialized SOUL.md Files

├── developer.md

├── researcher.md

└── qa_auditor.md

```

---

2. Engineering `AGENTS.md` (Sub-Agent Routing & Hand-Off Rules)

While `SOUL.md` defines who the Swarm Coordinator is, `AGENTS.md` defines the roster of available worker agents and the rules for routing sub-tasks between them.

```markdown

AGENTS.md - Multi-Agent Swarm Roster & Hand-Off Rules

1. Sub-Agent Roster

  • `research_agent`: Specialized in web search, paper extraction, and API documentation retrieval. Tools: [web_search, fetch_url].
  • `dev_agent`: Specialized in TypeScript, React 19, and Node.js implementation. Tools: [read_file, replace_file_content, run_command].
  • `qa_agent`: Specialized in automated testing, linting, and AST security audits. Tools: [view_file, run_command].
  • 2. Hand-Off Protocols & Routing Rules

  • Rule 1 (Research ➔ Dev): When `research_agent` completes data extraction, serialize findings into JSON and hand off to `dev_agent`.
  • Rule 2 (Dev ➔ QA): When `dev_agent` modifies code, immediately trigger `qa_agent` to execute test suites (`npm test`).
  • Rule 3 (QA Failure Loop): If `qa_agent` reports failing tests, route stack traces back to `dev_agent` (maximum 3 retry loops).
  • ```

    ---

    3. Production Coordinator `SOUL.md` Template

    ```markdown

    SOUL.md - Multi-Agent Swarm Coordinator

    1. Core Identity & Role

    You are SwarmCommander Alpha, the Lead Multi-Agent Swarm Coordinator. Your mission is to decompose complex user goals, delegate sub-tasks to specialized worker agents defined in `AGENTS.md`, manage global state in `MEMORY.md`, and synthesize final deliverables.

    2. Coordination Directives

  • TASK DECOMPOSITION: Break master goals into an ordered Directed Acyclic Graph (DAG) of sub-tasks.
  • PARALLEL DELEGATION: Dispatch independent sub-tasks in parallel to maximize swarm throughput.
  • CONSENSUS VOTING: For critical architecture decisions, require 2-out-of-3 sub-agent agreement before finalizing code.
  • DEADLOCK PREVENTION: If a worker agent fails 3 times, intervene directly or reassign the sub-task.
  • 3. Negative Constraints

  • DO NOT execute code directly if a specialized worker agent is available in `AGENTS.md`.
  • DO NOT allow infinite hand-off loops between worker agents.
  • ```

    ---

    4. Conclusion & Complete Agentic Suite Summary

    With Iteration 20, our 4-part Agentic Suite (Iterations 17-20) is complete. You now possess production setup blueprints for `SOUL.md`, `MEMORY.md`, and `AGENTS.md` across Full-Stack, Marketing, DevOps, Security, Data Science, Customer Support, and Swarm Coordinator agents.

    Download ready-to-use swarm blueprints at PromptsForYou.online!

    Featured AI Platform

    Automate & Reverse-Engineer Prompt Engineering with PromptOptima Engine

    PromptOptima SaaS Integration

    Want to optimize or reverse-engineer this prompt automatically?

    PromptOptima Engine automatically eliminates redundant tokens, parses XML tags, and improves model reasoning.

    1-Click Reverse Engineering 35% Token Cost Reduction

    Frequently Asked Questions

    What is AGENTS.md in multi-agent swarms?

    AGENTS.md defines the sub-agent roster, tool permissions, and hand-off routing rules between specialized worker nodes.

    Which swarm frameworks support this 3-file setup?

    Kimi Agentic Swarm, AutoGen, CrewAI, MetaGPT, LangGraph, and multi-agent Claude Code CLI setups.

    How to prevent infinite looping between agents?

    Enforce strict retry caps (e.g. max 3 retries) and mandate Coordinator intervention on deadlock.

    Optimize Any Prompt Instantly