Runnable pattern examples and Markdown agent definitions for building agent harnesses.
The examples live under examples/, and the reusable agent definitions live under agents/.
Most agent projects start with a vague prompt and a pile of tools. That works for demos, but it breaks down when the work has policy gates, handoffs, verification, memory, cost limits, or human approvals. This repo turns those recurring coordination problems into concrete patterns.
Each pattern describes:
- the agents involved
- the order of work
- the policy gates that must be enforced
- the input shape a harness should accept
- the output artifact a real system should produce
- a runnable example that validates the expected artifact shape
The value is not just the individual prompts. The useful part is the operating model: who owns a decision, who verifies it, what evidence is required, and where the workflow must stop for safety or human approval.
Use this repo as a starting catalog when designing a production agent harness. Instead of inventing roles from scratch, pick the pattern closest to your workflow and adapt the agents, gates, and output contract.
Examples:
- A support team can start from
support-resolutionto triage tickets, retrieve cited knowledge-base answers, draft customer replies, and escalate low-confidence cases. - An engineering team can start from
coding-senior-engineering-podortest-first-coding-podto split planning, implementation, review, and tests across separate agents. - An operations team can start from
devops-incident-responseto keep alert triage, runbook execution, escalation, and postmortems in separate lanes. - A research workflow can start from
research-evidence-dossierorevidence-first-researchto require source grading, contradiction checks, and citation verification before synthesis. - A governance layer can start from
default-deny-tool-broker,human-approval-gate, andreceipt-led-governanceto make risky tool calls explicit, approved, and auditable.
Consider an enterprise customer support workflow for a SaaS product. A customer reports that SSO stopped working after an identity-provider certificate rotation.
Without a pattern, a single agent might guess from memory, write an answer, and maybe miss an escalation condition. With this repo, you can build the workflow from the support-resolution pattern:
Triagerclassifies the ticket by urgency, customer tier, and sentiment.KB Searcherretrieves only cited product and policy articles.Responderdrafts a customer-facing reply grounded in those articles.Escalatorhands the issue to a human when confidence, severity, or authority is insufficient.Memory Updaterstores only durable, non-sensitive learning for future tickets.
Then you can strengthen it with cross-cutting patterns:
- Add
default-deny-tool-brokerif agents need access to ticketing, shell, CRM, or network tools. - Add
human-approval-gatebefore refunds, credits, account changes, or public commitments. - Add
receipt-led-governanceso material actions leave an audit trail. - Add
memory-distillationso the system learns from repeated incidents without storing raw sensitive history.
That gives you a harness design that is easier to test, safer to run, and clearer to audit than a single all-purpose support bot.
Start with examples/README.md to find a pattern. Each example directory contains:
flow.jsonfor the machine-readable workflow contractinput.jsonfor a concrete scenarioexpected-output.jsonfor the output artifact shapeREADME.mdfor a human-readable walkthrough
Then open agents/README.md and copy the matching Markdown agent definitions into your target harness or host-specific agent directory. The agent files are pattern-scoped so repeated names such as Verifier, Strategist, and Responder can have different responsibilities in different workflows.
For a quick contract check, run an example:
cd examples
python run_example.py support-resolution --checkexamples/- runnable-shape pattern examples and flow contractsagents/- Markdown agent definitions grouped by patterntests/- catalog and example contract teststools/- scripts used to generate and maintain the examples
Inspired by ruvnet/agent-harness-generator.
