Make an Agent Workflow Clear Enough to Review

Understand Agentflow node roles, read a code-review example, and draw a clear human handoff for team review.

EdrawMind Team

EdrawMind Team

Nov 30, 26
Share article:
banner-product
In this article
  1. What changed in Mermaid 12.4
  2. Read the Agentflow vocabulary
  3. Choose the view your reviewer needs
  4. Add the human handoff
  5. Draw the review copy in EdrawMax
  6. Check the diagram against the real workflow

Mermaid Agentflow is a diagram type for describing an agentic workflow: the agents involved, the work grouped into flows, the tasks and tools inside those flows, and the relationships between them. Use an Agentflow diagram when a reader needs to understand who performs a step and what that step depends on, as well as what happens next. The official Agentflow documentation explains the syntax and its connection to workflow semantics.

For a team review, start with the workflow you can actually describe. Name the input, the agent's task, the tool it calls, the decision that changes the route, and the person who receives the result. EdrawMax can help you draw a visual review copy of those relationships; EdrawMind can help organize the task list and open questions before the sequence is settled. The diagrams below are planning examples, not demonstrations of a running agent system.

What changed in Mermaid 12.4

Mermaid 12.4.0, released on November 27, 2026, accepts the agentflow keyword. The release notes also say that agentflow-beta continues to work as an alias. This is a keyword change to an existing diagram type: the current documentation labels Agentflow as available in v12.0.0 and later, so November 27 should not be presented as the first release of Agentflow.

That distinction matters when you reuse an example. A code block written with agentflow depends on the Mermaid version supplied by the renderer that opens it. Check the version in your editor or documentation platform before assuming that the current example will render there. A diagram shown on a documentation page does not establish compatibility in every Mermaid integration.

Mermaid's release notes establish what changed in Mermaid. They do not establish support for the new syntax in EdrawMax. The EdrawMax workflow in this article uses shapes, labels, and connectors to create an editable visual explanation; it does not depend on importing an Agentflow code block.

Read the Agentflow vocabulary before adding detail

A useful Agentflow diagram distinguishes the actor from the work and the tool used to do it. In the official syntax, a flow ... end container groups work, and shapes such as task, tool, input, and decision give nodes different meanings. Metadata written as @{ ... } can add details beyond the visible label. These elements let a technical reader separate a task description from the tool associated with that task.

Element What the reader should learn Question to answer in a review
Flow container Which pieces of work belong together. What work is included in this agent's flow?
Input What the flow receives. Which changes, request, or source material starts the work?
Task The work performed at a step. What result should this step produce?
Tool The named tool involved in the work. Which tool is called, and what result is used?
Decision A condition that changes the route. What evidence determines the next step?
Relationship or metadata How steps connect and what additional details apply. Is this a sequence, a reference, or another relationship?

The official basic example uses a Review Agent container, an input for changes, a task to analyze the diff, a linter tool, and a decision labeled “Clean?” The following code reproduces that small example so you can compare the vocabulary with the conceptual drawing. It deliberately stops at the decision; it does not specify approval, failure handling, or a merge action.

agentflow TB
  flow reviewer["Review Agent"]
    changes["Gather changes"]@{ shape: input }
    analyse["Analyse diff"]@{ shape: task }
    lint["run_linter"]@{ shape: tool }
    ok["Clean?"]@{ shape: decision }

    changes --> analyse --> lint --> ok
  end
Conceptual redraw of the Review Agent example, with changes input, diff analysis task, linter tool, and Clean decision inside one flow
A conceptual redraw of the official basic example. The labels show node roles; this illustration is not output from a Mermaid renderer.

Read the example from top to bottom. First identify the material received, then the analysis performed, then the named tool, and finally the question asked about the result. If a teammate cannot explain what “Clean?” means in the real system, the diagram has exposed a missing definition. Add the agreed condition beside the decision in your review copy rather than expecting the word “clean” to carry that information.

Agentflow also distinguishes sequence, reference, and failure relationships. Follow the official syntax and semantics when writing them in code. In a manually drawn review diagram, use a visible legend for your own line conventions; a dashed line alone should not force a reader to guess whether it represents evidence, an exception, or a future step.

Choose the view your reviewer needs

Choose an Agentflow source diagram when the reader needs to discuss the Mermaid representation, node roles, or workflow metadata. Choose a conventional workflow diagram when the immediate task is to agree on the order of work, decision conditions, and human handoffs. The two views can describe related work while emphasizing different details.

For example, a developer may need the exact identifier of a linter connector. A reviewer deciding whether a change can proceed may instead need the linter result, the review criteria, and the person authorized to accept the change. Keep the connector detail in the technical source and carry the decision-relevant information into the review view. Use shared names so readers can match the two.

If the workflow is still unsettled, organize it before drawing a sequence. In EdrawMind, create a central topic for the review goal and branches for inputs, automated tasks, tools, human decisions, and unresolved questions. The EdrawMind guide to adding topics and subtopics explains the branch editing actions. This map is a planning aid: bring only agreed steps into the final EdrawMax workflow diagram.

A useful unresolved question is specific enough to change the drawing. “Who reviews a failing linter result?” is more actionable than “Need better review.” Keep that question beside the relevant task until the team decides whether the route returns to the author, goes to a specialist, or stops.

Add the human handoff to the code-review example

The official minimal example ends at “Clean?” A team reviewing a real code change needs to define what follows. The next illustration extends the example for discussion: a failing result returns for revision; a passing result goes to a human reviewer; the human reviewer either accepts the change or requests another revision. These routes are an original planning example, not additional behavior promised by Mermaid's basic example.

Code review planning diagram with automated diff analysis and linter checks, a Clean decision, a human review decision, and revision paths
An original review view showing where automated checks hand work to a person. Solid arrows show the forward route; orange dashed arrows show requests for revision.

Define the handoff as an input and an expected response. The human reviewer might receive the proposed change, the linter result, and a summary of issues requiring judgment. The response might be acceptance or a revision request. These are example fields to agree with your team; adapt them to the workflow you are documenting.

Step Input to make visible Result or condition Who receives it next?
Analyze diff The change being reviewed. A review summary linked to that change. The next automated check.
Run linter The code and agreed check configuration. The actual linter result. The decision that evaluates the result.
Check “Clean?” The linter result. The team's defined pass condition. Human reviewer on pass; revision route otherwise.
Human review The change, check result, and review context. Acceptance or a reason to revise. The agreed next step or the author.

Do not draw the “accepted” route as an automatic merge unless the real workflow does that. Acceptance, merging, deployment, and publication are different actions. A diagram should name the action it actually represents and leave later actions outside the boundary when they have not been defined.

Draw and revise the review copy in EdrawMax

EdrawMax's workflow diagram tutorial describes creating a diagram, dragging shapes onto the canvas, editing labels, connecting elements, and saving or exporting the result. Use those actions to reproduce the review view. This is a manual diagramming process; the drawing does not configure the agent, run the linter, or enforce the approval rule.

1. Set the boundary and the two responsibilities

Start a new diagram and write a short title, such as “Code change review.” Arrange two areas: automated review and human review. Place the input and automated steps in the first area, and the review decision in the second. The areas are visual groupings for this example, not claims about how your software is deployed.

2. Add one shape for each meaningful step

Drag the needed shapes onto the canvas and label them with the actions already agreed by the team. Use distinct shapes for work and decisions. Keep the linter step separate from the task that analyzes the diff so readers can see where the tool result enters the process. Add an owner or role where the next step could otherwise be ambiguous.

3. Draw the forward route before the revision routes

Connect the main sequence from input to automated checks and then to human review. Label the decision exits with the conditions that select them. Once the main route is readable, add the revision routes and a legend explaining their appearance. Use labels as well as color so the routes remain understandable in a printed or grayscale copy.

4. Keep the handoff information beside the route

Add a short note naming what the human reviewer receives. Keep detailed instructions or tool configuration in a supporting document if they would overwhelm the drawing. The diagram should still identify that document or source clearly enough for a reader to find it. When information is missing, mark the open question instead of inserting a plausible value.

5. Save an editable copy and check the exported view

Save the diagram so the team can revise it, then export a review copy in a format supported by your EdrawMax version. Check that labels, arrowheads, and the legend remain readable. The source diagram and the review copy should use the same task names; update both when the team changes the route.

Page Not Found | Wondershare EdrawMind

Other Users Also Liked

For related techniques, see the existing Mermaid flowchart guide for EdrawMax. That guide covers flowchart generation; it should not be taken as confirmation that the newer Agentflow syntax is supported. If you only need to organize branching notes before deciding the order, the Mermaid mind map guide covers a different diagram type.

Check the diagram against the real workflow

Walk through one passing case and one case that requires revision. At each step, identify the input, the responsible actor, the result, and the next recipient. A useful review catches a missing handoff or an undefined condition before those gaps become invisible behind a polished diagram.

  • Version: Does the technical source use syntax supported by the actual Mermaid renderer?
  • Meaning: Are tasks, tools, inputs, and decisions distinguishable?
  • Conditions: Does each decision explain what selects its next route?
  • Handoffs: Can the recipient tell what they receive and what response is expected?
  • Exceptions: Does the drawing show the agreed route for revision, and identify any unresolved case?
  • Scope: Is the diagram describing the workflow you have verified, including the point where its responsibility ends?

Keep the Mermaid source for the technical representation and the EdrawMax diagram for the review conversation when both are useful. The value of the second view is the agreement it helps the team reach: clear roles, explicit conditions, and a handoff that the next person can understand.

EdrawMind logoEdrawMind Apps
Insert docs & take notes on nodes
30 structures & 52 themes
10,000+ free templates & 750+ cliparts
Summarize docs, videos & webpages
Generate mind maps & slides with AI
edrawmax logoEdrawMind Online
Insert docs & take notes on nodes
Real-time collaboration
30 structures & 52 themes
10,000+ free templates & 750+ cliparts
LaTex formula
Generate mind maps & slides with AI