agentleFS
asmamestasmamest/Nexus-Skills/skills/agentic-engineering/agent-architecture-design/SKILL.md

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
  1. Distinctive:

    Router: use when input categories can be identified and routed to specialized paths.

    line 14
  2. Distinctive:

    Planner-executor: use when a task benefits from explicit decomposition, but validate plans and constrain execution.

    line 15
  3. Distinctive:

    Supervisor with specialists: use when independent domains need different prompts, tools, or context boundaries.

    line 16
  4. Distinctive:

    Parallel workers: use for independent research or analysis whose outputs can be merged and checked.

    line 17
  5. Distinctive:

    Stateful graph/workflow: use for long-running tasks, checkpoints, approval pauses, retries, or branching state transitions.

    line 18
  6. Distinctive:

    Keep permissions and data access least-privilege per component.

    line 25
  7. Distinctive:

    Add human checkpoints at irreversible or high-impact boundaries.

    line 27
  8. Distinctive:

    No terminal state or independent completion check.

    line 47

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Define user outcomes, constraints, risk level, latency budget, and failure tolerance.
  2. Draw the simplest baseline workflow before adding agents.
  3. Identify exactly which decisions require model flexibility.
  4. Define state, transitions, tool contracts, error paths, and terminal conditions.
  5. Keep permissions and data access least-privilege per component.
  6. Decide whether agents share context, exchange structured summaries, or use isolated state.
  7. Add human checkpoints at irreversible or high-impact boundaries.
  8. Define independent verification of outputs and side effects.
  9. 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.