Deployment Patterns
Hyphen agents operate in three patterns depending on where autonomy lives in your architecture. All three share the same governance model: structural permissioning, reasoning traces, stuck detection, and human escalation.
Decision Matrix
| Pattern | Agent's Role | Workflow Calls | Waits for Results? | Typical Iterations | Best For |
|---|---|---|---|---|---|
| A: Agent as Step | One step in a deterministic workflow | 0 (agent IS inside a workflow) | N/A | 5–15 | Mostly-deterministic processes with one reasoning-heavy step |
| B: Agent as Trigger | Smart router — classify and dispatch | 1 (fire-and-forget) | No | 3–5 | Unstructured input that needs classification before processing |
| C: Agent as Orchestrator | Coordinator of multiple workflows | 2+ (sequential/conditional) | Yes | 10–20 | Multi-step processes requiring dynamic coordination and synthesis |
The Key Distinction: B vs C
Patterns B and C both use the standalone agent API (POST /agents/execute) and both can trigger workflows. The difference is fundamental:
Pattern B fires and forgets. The agent classifies input, triggers one workflow with wait: false, and completes. It's a smart router — once it dispatches, its job is done. Think of it as a mailroom that opens letters and sends them to the right department.
Pattern C waits and coordinates. The agent triggers a workflow with wait: true, examines the result, decides what to do next, potentially triggers more workflows, synthesizes across results, and escalates when things conflict. Think of it as a project manager running a multi-step process where each step depends on the previous one.
The telltale sign: if your agent's reasoning trace shows wait: true and conditional logic based on workflow results, you're in Pattern C.
Choosing a Pattern
Start with Pattern A (agent as step) if you have an existing deterministic process that needs AI judgment at one point — for example, a reconciliation workflow where matched records are processed automatically but exceptions need investigation.
Use Pattern B (agent as trigger) when input arrives in unstructured form and you need to classify, extract, and route before processing begins — for example, incoming emails that could be invoices, support requests, or vendor inquiries. The agent makes one routing decision and is done.
Use Pattern C (agent as orchestrator) when the process itself is dynamic — the agent needs to decide what to do next based on results from previous steps — for example, customer onboarding where sanctions screening results determine whether enhanced due diligence is needed, and the agent synthesizes results across multiple verification workflows.
Tool Declaration Across Patterns
All three patterns use typed tool declarations, but the composition differs:
Pattern A: Actions only (agent is a specialist within a workflow)
tools: [{ type: "action", name: "search_records" }, { type: "action", name: "analyze_exception" }]
Pattern B: Actions + workflow targets (agent classifies then routes)
tools: [{ type: "action", name: "classify_document" }, { type: "workflow", id: "wf_inv_001" }, ...]
Pattern C: Mostly workflows + a few actions (agent coordinates sub-processes)
tools: [{ type: "workflow", id: "wf_kyc_001" }, { type: "workflow", id: "wf_san_002" }, ..., { type: "action", name: "gmail_send" }]
Implicit tools (__complete__, __pause_for_human__, __store_memory__, __retrieve_memory__, __log_progress__) are auto-injected in all patterns.