Overview
A Dify workflow runs two agents in turn on a pasted code change or document: one lists suspected bugs, the other tries to confirm or disprove each with quoted evidence before anything is reported.
Problem or Objective
- Which agents review pull requests?
- How do teams design the context, tools and memory of their own AI agents?
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Dify
- Prerequisites
- Dify Cloud or a self-hosted Dify, and a model provider configured in it; check that your code may be sent to that provider.
How It Works
In Dify, build two agents. The finder is told to read a code change or document and list every suspected bug or error with its location and a short reason, erring on the side of listing too many. The verifier is told to take that list and the same text, and for each item either quote the lines that prove it, explain why it is not a real problem, or mark it as needing a test. Create a workflow app with a text input for the code or document, add the finder as the first agent node and the verifier as the second, and end with an output that shows only confirmed items and those needing a test, each with its evidence. Publish it as a web app for your team. For each confirmed item, check it yourself, by running the code or rereading the document, before filing or fixing it.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Dify.
- Connect the toolsConnect the tools this workflow relies on: Dify.
- Check the prerequisitesDify Cloud or a self-hosted Dify, and a model provider configured in it; check that your code may be sent to that provider.
- Gather your detailsCollect what the prompt asks for: What is being checked, Facts the verifier should know, The code change or document, The finder agent's list (mapped from the first node).
- Run the starter promptPaste the starter prompt below into Dify and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at github.com before you rely on it.
Practical Starter Prompt: Verify each suspected bug
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
You are the verifier. Below are a [What is being checked] and a list of suspected problems from another reviewer. For each item, do exactly one of: (a) quote the lines that show the problem and explain the failure in one or two sentences; (b) explain, with quoted lines, why it is not a real problem; (c) mark it 'needs a test' and describe the smallest test that would settle it. Ignore style unless it causes a defect. Context: [Facts the verifier should know]. Do not suggest fixes to apply; I will write tests and decide what to file. Text: [The code change or document] Suspected problems: [The finder agent's list (mapped from the first node)]Run the finder first, then this verifier on the same text. Neither agent files issues or edits code. Before filing or fixing anything, check each confirmed item yourself.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. Dify's pages describe an open-source platform for building AI workflows on a visual canvas, agents that can be reused as agent nodes inside a workflow, and publishing as web apps or through APIs. They do not measure how well a second agent filters false findings, and the verifier reads text only, so a confirmed item is still an argument, not a reproduced bug.
Limitations and Considerations
Both agents only read and report; filing issues, editing code and running tests stay with you. Pasted code goes to whichever model provider you configure in Dify, so check that your code may be shared with it, or self-host Dify with a model you trust. Check whether you can give the verifier node a different model from the finder, and compare the results if you can. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Related Videos
About langgenius/dify
Dify vs Flowise vs Langflow: Best Open Source AI Workflow Builder (opens in a new tab)
Walkthrough of dify by StackWhiz: its description links the GitHub repository.
Watch on YouTube (opens in a new tab)About langgenius/dify
Dify Explained: Build AI Workflows, RAG and Agents in One Place (opens in a new tab)
Walkthrough of dify by Ilm Initiative: its description links the GitHub repository.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- langgenius/dify README (opens in a new tab)
Project documentation · github.com · Undated · Source checked 25 Nov 2026, 11:59 UTC
What this source supports
- Dify is an open-source LLM app development platform.
- Build and test powerful AI workflows on a visual canvas, leveraging all the following features and beyond.
- Dify - AI Agent Management Platform That Puts You in Control (opens in a new tab)
Project documentation · dify.ai · Undated · Source checked 25 Nov 2026, 11:59 UTC
What this source supports
- Build an agent by chatting or configuring it manually. Use it as an app, embed it into a website, or reuse it as an agent node inside a workflow.
- Dify Documentation - Dify Docs (opens in a new tab)
Project documentation · docs.dify.ai · Undated · Source checked 25 Nov 2026, 11:59 UTC
What this source supports
- Create agents, agentic workflows, and chatbots that draw on your own data, then publish them as web apps or integrate them through APIs.

