# Multi-Agent Workflow Architect

Design a complete multi-agent system architecture for a complex task, including agent roles, handoff logic, failure handling, and human checkpoints.

## Prompt

Act as an AI systems architect designing a multi-agent workflow. I want to automate the following process: {{process_description}}.

Design the system by addressing each of the following in order:

1. Agent roles — define each agent needed, its single clear responsibility, and its inputs/outputs.
2. Orchestration logic — describe how agents hand off work to each other (sequential, parallel, or conditional branching) and why.
3. Tool access — for each agent, list the specific tools or data sources it needs access to, and note any it should explicitly NOT have access to.
4. Failure handling — for each agent, describe what happens if it fails, produces low-confidence output, or times out.
5. Human-in-the-loop checkpoints — identify the 1-3 points in the workflow where a human should review or approve before the process continues, and justify why those points specifically.
6. Success metrics — define 2-3 measurable indicators that the system is working correctly.

Present the result as a structured architecture document with headers.

## Best for

AI engineers, automation leads, and product managers designing multi-agent systems who need a rigorous architecture rather than an ad hoc chain of prompts.

## Compatible tools

- Claude
- ChatGPT

## How to use

- Replace {{process_description}} with a clear description of the end-to-end process you want to automate.
- Review the agent roles first to confirm the task is broken down at the right granularity — merge or split agents if needed.
- Pay close attention to the tool access and failure handling sections, since these are the most common blind spots when building agent systems.
- Use the human-in-the-loop checkpoints as your initial safety net, and only remove them once the system has a proven track record.

## Customization tips

- Specify any compliance or regulatory constraints (e.g. 'this involves financial data subject to SOX controls') so the architecture accounts for them.
- Ask for a cost/latency estimate per agent if you're deciding between using a large model for every agent vs. a mix of small and large models.
- Request a version of the architecture diagram described in text form suitable for turning into a flowchart.

## Example input

Act as an AI systems architect... I want to automate the following process: reviewing incoming vendor invoices, checking them against purchase orders, flagging discrepancies, and routing approved invoices to accounting for payment.

## Example output

1. Agent roles: Extraction Agent (parses invoice PDFs into structured data), Matching Agent (compares invoice line items against purchase order records), Discrepancy Agent (flags and categorizes mismatches), Routing Agent (sends approved invoices to accounting system).
2. Orchestration logic: Sequential from Extraction to Matching, then conditional branching — if Matching finds no discrepancies, proceed directly to Routing; if discrepancies exist, route to Discrepancy Agent first.
3. Tool access: Extraction Agent needs OCR/PDF parsing tool only; Matching Agent needs read access to the purchase order database but not write access; Routing Agent needs write access to the accounting system's payment queue only.
4. Failure handling: If Extraction Agent has low OCR confidence (<90%), flag for manual data entry rather than guessing; if Matching Agent cannot find a corresponding PO, escalate immediately rather than assuming a match.
5. Human-in-the-loop checkpoints: (a) any invoice with a discrepancy over $500 requires human approval before routing, since financial risk is highest here, (b) first 2 weeks of any new vendor relationship requires human review regardless of discrepancy, to build trust in the vendor's invoicing patterns.
6. Success metrics: percentage of invoices processed without human intervention, average time from receipt to payment routing, and number of discrepancies caught before payment (vs. after).
