---
title: ToolRouter — Agent Use Case Guide
description: Step-by-step guide for completing a task with a specific AI agent using ToolRouter.
url: https://toolrouter.com/tools/diagram-generator/use-cases/build-sequence-diagrams/chatgpt
---
# How to Build Sequence Diagrams with ChatGPT

ChatGPT creates sequence diagrams while helping you think through the interaction design. It suggests additional messages you might want to include, distinguishes synchronous from asynchronous flows, and can generate diagrams for both the happy path and error scenarios. The process improves your API design as it documents it.

## Setup

{"mcpServers":{"toolrouter":{"command":"npx","args":["-y","toolrouter-mcp"]}}}

## Steps

1. Configure ToolRouter in ChatGPT
2. Ask: "Create a sequence diagram showing how these services interact" and describe the flow
3. ChatGPT generates the diagram with proper lifelines and message arrows
4. Request: "Add a timeout scenario and retry logic to the diagram"

## Example Prompt

```
Generate a sequence diagram for a payment flow: mobile app sends payment request to API, API calls Stripe to create charge, Stripe returns confirmation, API records transaction in database, API sends push notification to user.
```

## Tips

- ChatGPT can suggest additional interactions you might want to include
- Ask for async vs sync message styling to distinguish fire-and-forget from request-response
