Mermaid Online
Templates/AI & Data/AI Agent Tool Calling
Sequence template · local export

AI Agent Tool Calling Mermaid Template

Agent sequence diagram: planning, tool calls, observations, and a cited final answer. Edit the code below, choose a publish preset, then export without signup, watermark, or cloud upload.

AI agenttoolsLLM
Paste or edit Mermaid code
Replace the sample below, or load another example.
Load example
Preparing the local renderer without uploading your diagram.Preparing editor…
Live previewSample preview · Clean Docs

Write

Preview

Export

Docs Asset

Preparing local editor…
Render & export

Export controls activate after your diagram renders locally.

Sequence
Mode
Default renderNative MermaidOptimized exportStyled download
Export style
Clean DocsGitHub READMETransparent DocsWarm Editorial✦ ProWhiteboard Sketch✦ ProAurora Noir✦ ProBlueprint✦ ProChampagne✦ ProEmerald Suite✦ ProEditorial✦ Pro
Scale
1x2x4x
Or exact width, e.g. 1200px wide
Output: White · comfortable padding
Size: calculated after render
Filename: mermaid-sequence-white-2x.png

When to use the AI Agent Tool Calling template

An agentic tool-use loop as a sequence diagram: the User's task reaches the Agent, which loads prior context from Memory and asks the LLM to plan the next action. The chosen tool call (search_files) executes, its Observation feeds back into the LLM, and the loop ends with a cited final answer returned to the user.

Template code

The full Mermaid source for this template — copy it into any Mermaid-compatible tool, or edit and export it in the editor above.

sequenceDiagram
  participant User
  participant Agent
  participant LLM
  participant Tools
  participant Memory

  User->>Agent: Ask task
  Agent->>Memory: Load context
  Agent->>LLM: Plan next action
  LLM-->>Agent: Call search_files
  Agent->>Tools: Execute tool call
  Tools-->>Agent: Observation
  Agent->>LLM: Continue with evidence
  LLM-->>Agent: Final response
  Agent-->>User: Answer with citations

How to customize this template

Related guides