agent-architecture-design
Skill1 starsChanged 17 days agoMITView on GitHub
Choose agent patterns and boundaries for a task, comparing deterministic workflows, single-agent loops, routers, planners, supervisors, and multi-agent systems.
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Router: use when input categories can be identified and routed to specialized paths.
- Distinctive: line 15
Planner-executor: use when a task benefits from explicit decomposition, but validate plans and constrain execution.
- Distinctive: line 16
Supervisor with specialists: use when independent domains need different prompts, tools, or context boundaries.
- Distinctive: line 17
Parallel workers: use for independent research or analysis whose outputs can be merged and checked.
- Distinctive: line 18
Stateful graph/workflow: use for long-running tasks, checkpoints, approval pauses, retries, or branching state transitions.
- Distinctive: line 25
Keep permissions and data access least-privilege per component.
- Distinctive: line 27
Add human checkpoints at irreversible or high-impact boundaries.
- Distinctive: line 47
No terminal state or independent completion check.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Architecture Design
Goal
Select the simplest architecture that meets the task's reliability and flexibility requirements. An agent is not automatically better than a deterministic workflow.
Architecture selection
- Deterministic pipeline: preferred when steps and decisions are known and stable.
- Single tool-using agent: suitable when a model must choose among a small set of tools dynamically.
- Router: use when input categories can be identified and routed to specialized paths.
- Planner-executor: use when a task benefits from explicit decomposition, but validate plans and constrain execution.
- Supervisor with specialists: use when independent domains need different prompts, tools, or context boundaries.
- Parallel workers: use for independent research or analysis whose outputs can be merged and checked.
- Stateful graph/workflow: use for long-running tasks, checkpoints, approval pauses, retries, or branching state transitions.
Design workflow
- Define user outcomes, constraints, risk level, latency budget, and failure tolerance.
- Draw the simplest baseline workflow before adding agents.
- Identify exactly which decisions require model flexibility.
- Define state, transitions, tool contracts, error paths, and terminal conditions.
- Keep permissions and data access least-privilege per component.
- Decide whether agents share context, exchange structured summaries, or use isolated state.
- Add human checkpoints at irreversible or high-impact boundaries.
- Define independent verification of outputs and side effects.
- Evaluate the architecture against a baseline for success, cost, latency, and failure recovery.
Multi-agent trade-offs
Delegation can improve parallelism and specialization, but adds coordination overhead, context loss, duplicated work, nondeterminism, and a larger security surface. Use subagents only when the work can be decomposed cleanly and their results can be independently assessed.
Required design artifacts
- Component diagram and responsibility boundaries.
- State schema and transition table.
- Tool and inter-agent message schemas.
- Permission matrix and approval rules.
- Retry, timeout, cancellation, and stop policies.
- Evaluation cases for happy paths, ambiguity, failure, and abuse.
Anti-patterns
- Multi-agent architecture without a measurable need.
- Unbounded recursive delegation.
- Shared unrestricted credentials across all agents.
- Treating another agent's output as trusted fact.
- No terminal state or independent completion check.
- Hiding deterministic business logic inside prompts.
References
- LangGraph overview: https://docs.langchain.com/oss/langgraph/overview
- Microsoft agent design lessons: https://github.com/microsoft/ai-agents-for-beginners
- OpenAI Agents SDK: https://openai.github.io/openai-agents-python/
In this repository28 other files it gives its agents.
- agent-evaluationSkill
- agent-harness-engineeringSkill
- agentic-workflow-testingSkill
- agent-memory-designSkill
- browser-computer-useSkill
- durable-agent-workflowsSkill
- human-in-the-loopSkill
- mcp-developmentSkill
- mcp-server-developmentSkill
- multi-agent-orchestrationSkill
- tool-calling-designSkill
- advanced-retrieval-rerankingSkill
- context-engineeringSkill
- embedding-model-engineeringSkill
- llm-evaluationSkill
- llm-observabilitySkill
- model-serving-inferenceSkill
- multimodal-ai-pipelinesSkill
- prompt-engineeringSkill
- rag-engineeringSkill
- rag-pipeline-engineeringSkill
- structured-outputsSkill
- agentic-securitySkill
- security-reviewSkill
- code-reviewSkill
- debuggingSkill
- test-engineeringSkill
- example-skillSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

