# Mermaid agent flow diagram in Markdown to PDF

An AI agent's work becomes a flow of typed steps: what comes in, what it does, which tools it calls and where it decides.

An AI agent's steps as typed nodes: inputs, tasks, tool calls and decisions, inside a flow, for the triage agent of a customer support team.

- PDF: https://legivel.com/examples/mermaid-diagrams/agent-flow-diagram.pdf
- Page: https://legivel.com/examples/mermaid-diagrams/agent-flow-diagram
- Open in the editor: https://legivel.com/markdown-to-pdf?sample=mermaid-agentflow
- More mermaid diagrams in Markdown to PDF: https://legivel.com/examples/mermaid-diagrams

## Markdown source

````markdown
---
title: Support triage agent
author: Support operations
---

# How the triage agent handles a ticket

A software company in Singapore lets an agent sort incoming support tickets before a person reads them. Every step and tool call is in the flow below.

```mermaid
agentflow TB
  flow triage["Triage agent"]
    ticket["New ticket"]@{ shape: input }
    classify["Classify topic and urgency"]@{ shape: task }
    search["search_known_issues"]@{ shape: tool }
    known["Known issue?"]@{ shape: decision }
    reply["Draft reply with the fix"]@{ shape: task }
    route["Route to a person"]@{ shape: task }

    ticket --> classify --> search --> known
    known --> reply
    known --> route
  end
```

A person approves every drafted reply before it is sent.
````
