Skip to main content
The dispute handling workflow is the main orchestrator. It should own the case lifecycle and call agents only for the parts that need judgment.

What the Workflow Owns

The workflow should control:
  • Case state
  • Deadline checks
  • Branch routing
  • Tool call order
  • Retry and failure paths
  • Human approval gates
  • Handoffs to subflows
  • Status updates back to the source system
Autonomous agents should not own these process states. They should return structured outputs that the workflow can validate and route.

Main Flow

Subflows

Break repeated deterministic logic into callable workflows:
SubflowPurpose
Case validation workflowNormalize and validate required fields.
Deadline workflowCalculate deadline risk and escalation priority.
Acceptance workflowRecord that the business accepts liability or will not contest.
Evidence preparation workflowGather evidence, draft packet, and prepare approval request.
Human approval workflowRoute packet to reviewers and wait for decision.
Submission workflowSubmit to processor or record manual submission.
Outcome tracking workflowCheck outcome, update source systems, and notify stakeholders.
If two use cases need the same approval logic, make that logic a callable workflow instead of rebuilding it inside every blueprint.

Agent Calls

Use focused agents with clear contracts:
AgentCalled byExpected output
Reason classification agentMain workflowReason category, confidence, recommended path, explanation.
Account communication agentMain workflowMessage draft, requested information, language, next wait state.
Evidence drafting agentEvidence workflowDraft narrative, evidence checklist, missing facts, confidence.
Slack escalation agentApproval workflowReviewer decision, comments, required changes, approver identity.
The workflow should validate the output shape before continuing.

Branching Guidelines

Use deterministic branches for conditions such as:
  • Response deadline has passed
  • Case value is above approval threshold
  • Required evidence is missing
  • Account response is overdue
  • Reviewer rejected the evidence packet
  • Tool call failed
Use agent judgment for conditions such as:
  • Whether the reason text maps to one or more categories
  • What clarification to request from the account
  • How to summarize evidence in a clear narrative
  • Whether reviewer comments imply a specific correction

Workflows

Learn when to use deterministic workflows.

Nodes and Conditions

Build branches, tool nodes, and conditions.

Sub-Agents

Call focused agents from workflows and agents.

Guardrails

Add escalation and restriction rules.