Multi-agent coordination prompt builder
Multi-agent systems fail in predictable ways: agents talk past each other, the orchestrator never stops, and a single worker error cascades. The fix is a shared protocol — a fixed handoff format, clear role boundaries, defined error handling, and a hard termination condition. This builder writes a matched pair of system prompts (one orchestrator, one worker) that speak the same protocol, so the agents coordinate instead of collide. Paste each prompt into its agent’s system slot in your framework of choice.
How it works
You describe the overall task, list the worker roles, pick a handoff format (JSON or tagged blocks), set a termination condition, and note an error-handling policy. The tool generates two prompts. The orchestrator prompt instructs the model to decompose the task, delegate to named workers using the handoff format, aggregate results, and stop the moment the termination condition is met. The worker prompt instructs each worker to accept a delegated subtask, do exactly that subtask, and reply in the same format — including a structured error reply when it cannot complete. Both run locally until you deploy them.
Tips and examples
- Keep workers narrow. A worker that does one thing well is far more reliable than a general one. List specific roles like “researcher,” “coder,” “verifier.”
- Make termination unambiguous. “Stop after 5 iterations or when the verifier returns PASS” leaves no room for an endless loop.
- Standardize errors. A worker that returns
{"status":"error","reason":...}lets the orchestrator retry or reroute instead of crashing. - Match the format to your parser. If your code parses JSON, choose JSON; if you scan for tags, choose tagged blocks — consistency beats elegance.