@zack/support-escalation-loop

Portable support orchestration loop for triage, response drafting, and escalation handoff decisions.

Install
agentpm install @zack/support-escalation-loop@0.1.0
Load
import { loadLoop } from '@agentpm/sdk';
const loop = await loadLoop('@zack/support-escalation-loop@0.1.0');
Weekly installs
2
0%
Last publish
1d ago
v0.1.0
agent.json
{
  "name": "support-escalation-loop",
  "version": "0.1.0",
  "description": "Portable support orchestration loop for triage, response drafting, and escalation handoff decisions.",
  "loop": {
    "archetype": "support-escalation",
    "entry_phase": "triage",
    "limits": {
      "max_steps": 8
    },
    "phases": [
      {
        "id": "triage",
        "access": {
          "tools": true,
          "memory": {
            "read": true
          },
          "knowledge": true
        },
        "outcomes": [
          {
            "id": "can-reply",
            "description": "The issue can move into a direct customer response."
          },
          {
            "id": "needs-escalation",
            "description": "The issue requires a specialist handoff or explicit escalation review."
          }
        ],
        "objective": "Assess the customer issue, determine whether a direct response is possible, and decide whether escalation is required."
      },
      {
        "id": "draft-response",
        "access": {
          "tools": true,
          "memory": {
            "read": true,
            "write": true
          },
          "knowledge": true
        },
        "outcomes": [
          {
            "id": "ready-to-send",
            "description": "The reply is complete and the thread can close without escalation."
          },
          {
            "id": "needs-revision",
            "description": "The current draft is incomplete or unclear and needs another pass through triage."
          },
          {
            "id": "needs-escalation",
            "description": "The draft surfaced a risk, ownership boundary, or missing authority that requires escalation."
          }
        ],
        "objective": "Prepare a customer-facing reply that states the current status, names ownership, and sets the next checkpoint clearly."
      },
      {
        "id": "prepare-handoff",
        "access": {
          "tools": false,
          "memory": {
            "read": true,
            "write": true
          },
          "knowledge": true
        },
        "objective": "Capture the escalation reason, preserve the next-step context, and package the handoff clearly for the receiving owner."
      }
    ],
    "transitions": [
      {
        "from": "triage",
        "on": "can-reply",
        "to": "draft-response"
      },
      {
        "from": "triage",
        "on": "needs-escalation",
        "to": "prepare-handoff"
      },
      {
        "from": "draft-response",
        "on": "ready-to-send",
        "to": "$end"
      },
      {
        "from": "draft-response",
        "on": "needs-revision",
        "to": "triage"
      },
      {
        "from": "draft-response",
        "on": "needs-escalation",
        "to": "prepare-handoff"
      },
      {
        "from": "prepare-handoff",
        "on": "complete",
        "to": "$handoff"
      }
    ],
    "checkpoints": [
      {
        "id": "approve-escalation-handoff",
        "type": "approval",
        "on_reject": "$abort",
        "before_phase": "prepare-handoff"
      }
    ],
    "error_policy": {
      "tool_failure": {
        "action": "retry",
        "max_retries": 2,
        "on_exhausted": "fail_phase"
      },
      "phase_failure": {
        "action": "handoff"
      }
    }
  },
  "readme": "README.md",
  "license": {
    "spdx": "MIT"
  }
}
Loop graph
3 phases6 transitions5 explicit outcomes
Archetype
support-escalation
Entry phase
triage
Max steps
8
Terminal targets
$end$handoff
EntryCheckpointed phaseTerminal targets
can-replyneeds-escalationready-to-sendneeds-revisionneeds-escalationcompletetriagedraft-responseprepare-handoffimplicit complete$end$handoff
Checkpoints
approve-escalation-handoff
approval
Before prepare-handoff, reject routes to $abort.
Error policy
Tool failure
Retry up to 2 time(s), then fail_phase.
Phase failure
On phase failure: handoff.