Templates
Production-ready workflow patterns. Each template includes the complete JSON workflow definition, required action registrations, sample data, and expected execution flow.
The Graduated Pipeline
Every template follows the same architecture — deterministic rules first, AI reasoning second, human review last:
The ratio varies — reconciliation workflows route ~80% through rules, while incident response may route ~70% — but the pattern is always the same.
Finance & Accounting
Templates for matching, reconciliation, and payment processing.
AP Invoice Reconciliation
Match invoices to payments with tolerance for amount discrepancies, date offsets, and vendor name variations. Agent investigates unmatched exceptions. Human approves write-offs and adjustments.
Primitives used: Matcher → Loop (react) → PbotApproval → Custom Table Graduated split: ~75% auto-matched, ~15% AI-investigated, ~10% human-reviewed
Vendor Payment Reconciliation
Cross-border payment reconciliation handling FX volatility, intermediary bank fees, and asynchronous settlement windows. Multi-stage matching with cascading tolerance.
Primitives used: Matcher (two-pass) → Loop (foreach) → Loop (react) → PbotApproval → Custom Table Graduated split: ~70% auto-matched, ~20% AI-investigated, ~10% human-reviewed
Healthcare
Templates for claims processing and revenue cycle management.
Insurance Claims Adjudication
Dual-matcher pipeline: first match claims to policies, then match service codes to fee schedules. Agent analyzes complex cases involving medical necessity, bundling disputes, and authorization gaps. Clinical reviewer handles edge cases.
Primitives used: Matcher (dual) → Loop (react) → PbotApproval → Custom Table Graduated split: ~70% auto-adjudicated, ~20% AI-analyzed, ~10% clinical review
Healthcare Denial Management
Automated denial analysis, categorization, and appeal generation. Agent classifies denial reasons, searches for supporting documentation, and drafts appeal letters. Compliance reviewer approves before submission.
Primitives used: Loop (foreach) → Loop (react) → PbotApproval → Custom Table Graduated split: ~60% auto-categorized, ~25% AI-drafted appeals, ~15% compliance review
IT & Security
Templates for incident response and operational monitoring.
IT Incident Response
SOC alert triage workflow. Matcher correlates alerts against known benign indicators. Agent enriches with threat intelligence, queries SIEM, classifies severity, and recommends containment. SOC analyst reviews high-severity and ambiguous cases.
Primitives used: Matcher → Loop (react) → PbotApproval → Custom Table
Graduated split: ~70% known-benign auto-closed, ~20% auto-contained, ~10% SOC escalation
Structural permissioning demo: Agent can block_ip and isolate_host but cannot delete_firewall_rule or shutdown_server — tool list = architectural constraint.
Legal & Compliance
Templates for contract analysis and regulatory processing.
Contract Review
Automated contract analysis pipeline. LLM extracts terms, matcher compares against standard playbook, agent assesses deviations and drafts redlines. Legal counsel reviews high-risk and high-value contracts. Custom table builds searchable contract registry.
Primitives used: LLM extraction → Matcher → Loop (react) → PbotApproval → Custom Table Graduated split: ~60% standard-term auto-approved, ~25% AI-analyzed deviations, ~15% legal review
People Operations
Templates for employee lifecycle management.
Employee Onboarding
Agent-as-orchestrator pattern. A coordinator agent sequences four sub-workflows — IT provisioning, benefits enrollment, training assignment, equipment ordering — handling dependencies, async form collection, and failure recovery. Demonstrates why agent-as-orchestrator replaces human coordinator judgment.
Primitives used: Loop (react) with __run_workflow__ → PbotApproval (within sub-workflows) → PbotForm (benefits) → Custom Table
Pattern: Agent as Orchestrator (Pattern C)
Identity & Risk
Templates for customer verification and compliance screening.
KYC Customer Onboarding
Identity verification, sanctions screening, risk assessment, and account provisioning. Agent coordinates across verification providers, handles conflicting signals, and escalates high-risk applications. Compliance officer makes final determination on edge cases.
Primitives used: Loop (react) with __run_workflow__ → PbotApproval → Custom Table
Pattern: Agent as Orchestrator (Pattern C)
Customization Guide
Matching Thresholds
Adjust based on your tolerance for false positives vs. false negatives:
| Profile | tolerance |
fuzzyThreshold |
dateWindowDays |
Use When |
|---|---|---|---|---|
| Conservative | 0.005 (0.5%) | 95 | 1 | High-value transactions, regulated reporting |
| Balanced | 0.02 (2%) | 85 | 3 | General reconciliation, invoice matching |
| Permissive | 0.05 (5%) | 75 | 7 | Cross-border payments, legacy system data |
Agent Boundaries
| Profile | max_iterations |
on_stuck |
timeout_ms |
Use When |
|---|---|---|---|---|
| Tight | 5 | fail after 2 | 60000 | Simple lookups, low-risk decisions |
| Standard | 10–15 | escalate after 3 | 300000 | Exception investigation, document analysis |
| Exploratory | 20–25 | retry_with_hint after 4 | 600000 | Complex research, multi-system coordination |
Tool Declarations
Use typed tool declarations to give agents access to your registered actions and workflows:
{
"tools": [
{ "type": "action", "name": "your_registered_action" },
{ "type": "workflow", "id": "wf_sub_process_id" }
]
}
Built-in tools (__complete__, __pause_for_human__, __store_memory__, __retrieve_memory__, __log_progress__) are always auto-injected. See Tool Declarations for the full reference.
Building Your Own Template
Every template follows the same structure. To create a custom workflow:
- Identify the graduated split — What percentage of events can be handled by rules? What needs AI? What needs a human?
- Define the matcher — What two datasets are you comparing? What fields should match? What tolerances make sense?
- Scope the agent — What tools does the agent need? What's the objective? How many iterations is reasonable?
- Set the approval trigger — What conditions require human review? Amount thresholds? Confidence thresholds? Risk levels?
- Design the audit trail — What fields should the custom table capture for compliance and analysis?
Start with the Quickstart, then adapt the template closest to your use case.