> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duckie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# System Map

> The multi-channel, multi-agent architecture for support ticket triage

This system is built around a workflow backbone. Deployments bring tickets into Duckie, workflows control deterministic triage state, and agents handle interpretation, summarization, human review, and improvement loops.

## Operational Flow

```mermaid theme={null}
flowchart TD
  Event["New ticket or message update"]
  Event --> Intake["Ticket intake deployment"]
  Intake --> Normalize["Normalize ticket workflow"]
  Normalize --> Enrich["Customer context enrichment workflow"]
  Enrich --> ContextCheck["Context completeness check"]
  ContextCheck --> Triage["Triage workflow"]
  ContextCheck --> Missing["Mark missing context"]
  Missing --> Triage

  Triage --> Classifier["Intent and tag classifier agent"]
  Classifier --> Confidence["Confidence gate"]
  Confidence --> Routing["Routing workflow"]
  Confidence --> Escalation["Slack escalation agent"]

  Escalation --> Leads["Support triage reviewers"]
  Leads --> Decision["Structured routing decision"]
  Decision --> Routing

  Routing --> Tags["Apply tags and attributes"]
  Tags --> Priority["Calculate priority and SLA"]
  Priority --> Assignment["Assign queue or owner"]
  Assignment --> NextStep["Choose next step"]
  NextStep --> Response["Start response workflow or agent"]
  NextStep --> Specialist["Specialist queue handoff"]
  NextStep --> Clarify["Ask clarifying question"]

  Response --> Update["Update ticket"]
  Specialist --> Update
  Clarify --> Update
  Update --> Runs["Runs and analytics"]
```

## Reporting and Improvement Loop

```mermaid theme={null}
flowchart TD
  Runs["Runs and analytics"]
  Runs --> Scheduler["Scheduler deployment"]
  Scheduler --> Reporting["Duckie Assistant reporting agent"]
  Reporting --> Stakeholders["Support stakeholders channel"]

  Runs --> Feedback["Duckie Assistant feedback agent"]
  Corrections["Human tag and routing corrections"] --> Feedback
  Stakeholders --> Feedback
  Feedback --> Proposals["Improvement proposals"]
  Proposals --> Review["Support operations review"]
  Review --> Updates["Tags, workflows, guidelines, and tools"]
  Updates --> Testing["Replay and batch testing"]
  Testing --> Deploy["Updated deployments"]
```

## Component Responsibilities

| Component                                | Responsibility                                                                                       |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **Ticket intake deployment**             | Starts the system from a helpdesk ticket, chat message, email, or webhook.                           |
| **Normalize ticket workflow**            | Creates a clean ticket record with requester, channel, subject, body, attachments, and source links. |
| **Customer context enrichment workflow** | Fetches account, entitlement, product, order, incident, and prior-ticket context.                    |
| **Triage workflow**                      | Owns triage state, allowed branches, retries, and handoffs.                                          |
| **Intent and tag classifier agent**      | Interprets the ticket and returns intent, topic, urgency, sentiment, and confidence.                 |
| **Routing workflow**                     | Applies deterministic queue, owner, priority, and SLA rules from the classification result.          |
| **Slack escalation agent**               | Sends low-confidence or high-risk tickets to human reviewers and returns structured decisions.       |
| **Duckie Assistant reporting agent**     | Reads runs and operational data to post scheduled triage summaries.                                  |
| **Duckie Assistant feedback agent**      | Reviews corrections, reroutes, and failures to recommend system improvements.                        |

## Deterministic vs Autonomous

Use deterministic workflows for:

* Ticket normalization
* Required field checks
* Customer and account lookups
* Allowed tag value enforcement
* SLA and priority calculation
* Queue and owner assignment
* Helpdesk writebacks
* Retrying failed tools
* Calling reusable subflows

Use autonomous agents for:

* Understanding messy customer language
* Classifying ambiguous intent
* Summarizing customer context
* Identifying missing information
* Drafting handoff notes
* Explaining why a route was chosen
* Summarizing reporting trends
* Proposing taxonomy and workflow improvements

<Tip>
  Keep final routing decisions deterministic. Let the classifier agent recommend intent and tags, then let a workflow apply the support team's routing rules.
</Tip>

## Deployment Inventory

| Deployment                 | Trigger                                                             | Target                           | Mode to start |
| -------------------------- | ------------------------------------------------------------------- | -------------------------------- | ------------- |
| **Ticket triage intake**   | Ticket created, message received, email received, or custom webhook | Triage workflow                  | Testing       |
| **Slack triage review**    | Internal Slack channel or workflow escalation request               | Escalation agent                 | Testing       |
| **Daily triage report**    | Scheduler, such as weekdays at 9 AM                                 | Duckie Assistant reporting agent | Testing       |
| **Triage feedback review** | Scheduler or manual internal request                                | Duckie Assistant feedback agent  | Testing       |

## Related Docs

<CardGroup cols={2}>
  <Card title="Deployments" icon="rocket" href="/deployments/overview">
    Learn how deployments connect triggers to agents and workflows.
  </Card>

  <Card title="Scheduled Deployments" icon="clock" href="/deployments/scheduled-deployments">
    Run reporting and feedback loops on a schedule.
  </Card>

  <Card title="Categories" icon="folder" href="/tagging/categories">
    Track intent, topic, and route categories.
  </Card>

  <Card title="Attributes" icon="tags" href="/tagging/attributes">
    Track priority, confidence, SLA risk, and customer segment.
  </Card>
</CardGroup>
