Learn how to build an AI-powered tool with MetaGPT, DeepSeek and Ollama that helps product managers quickly create comprehensive product requirement documents (PRDs) by using a team of specialized AI agents.
MetaGPT is a multi-agent framework developed by DeepWisdom, a tech startup focused on developing open source tools that automate work by using artificial intelligence, multi-agent systems and agentic workflows.
Unlike a single-agent approach, where one model attempts to handle all aspects of the task, this multi-agent system assigns each agent a specific role and clearly defined responsibilities. By following structured workflows and reviewing each other’s outputs, the team collectively generates a high-quality PRD that is more aligned with stakeholder goals, better organized and less prone to oversight.
Before we begin, here’s a few terms to help familiarize yourself with the application’s tech stack:
MetaGPT: A framework that structures large language model (LLM) agents into collaborative roles, enabling them to work together like a coordinated team.
Ollama: A local runtime for running and managing open source LLMs directly on your personal computer or workstation.
DeepSeek: An open source language model optimized for tasks like research, reasoning and technical writing.
Creating PRDs can be time-consuming but artificial intelligence can assist by accelerating the process of completion.
Multi-agent collaboration is implemented in frameworks like MetaGPT, an AI tool that orchestrates the coordination of multiple role-playing agents to complete a complex task. A complex task can be considered anything that requires more than one step to complete.
AI PRD creation is an excellent use case for multi-agent collaboration because it mirrors a real-world product development process, where multiple stakeholders contribute to stages such as research, planning, review and refinement. To get the full advantage of AI-generated content, one should consider using a multi-agent system versus a single chatbot like OpenAI’s ChatGPT or Microsoft’s Copilot.
MetaGPT uses specialized AI agents with distinct roles where each different role can be customized to fit nearly any workflow with minimal coding. This flexibility is possible because of the LLM’s strong ability to understand natural language. Users define agent behaviors and workflows through prompt engineering and lightweight software development.
The goal of MetaGPT is to enable effective multi-agent collaboration. By simulating a structured team, it enables role-specific reasoning and task delegation, producing more context-aware and consistent outputs like high-quality PRDs.
Later in this tutorial, we’ll show how a single agent generates an initial PRD draft—similar to using a stand-alone chatbot. We’ll then compare this draft to the final, more accurate PRD produced through multi-agent collaboration. This method will demonstrate how teamwork improves quality beyond what one agent can achieve alone.
DeepSeek, developed by DeepSeek-AI, is a family of cutting-edge open-source LLMs optimized for reasoning tasks, structured content creation and efficient AI development workflows. In this project, we use deepseek-r1, a performant base model ideal for automating product documentation.
Here’s why DeepSeek stands out for building PRDs with a multi-agent system like MetaGPT:
While DeepSeek is used in this tutorial, the same multi-agent system can be configured to run with other LLMs compatible with Ollama, Hugging Face or OpenAI’s API. The choice of model depends on the tradeoff between reasoning accuracy, output structure, resource availability and intended deployment environment.
MetaGPT uses the concept of standard operating procedures (SOPs) to align human and AI collaboration by structuring workflows based on real-world teams (that is, a software company or product development team).
A SOP provides detailed, step-by-step guidelines for completing a specific task or process. MetaGPT applies this concept by decomposing complex tasks (like creating a PRD) into clear, actionable steps.
Each action is assigned to a designated “team member” or role-playing AI agent.
MetaGPT agents operate within a structured, role-based system designed to simulate and coordinate their tasks through collaborative workflows.
Each agent follows an organized agentic workflow grounded in four core concepts:
Together, these components form the foundation for agent autonomy and task execution in MetaGPT. Next, we’ll explore how these agents communicate and collaborate to complete multistep tasks like generating a PRD.
MetaGPT agents follow a coordinated process where each agent contributes to a shared goal. Each agent processes information and reasons based on its role, takes action and shares results with others. This approach enables a dynamic, step-by-step collaboration that builds toward the final output
MetaGPT agent workflow:
Agents iterate on this structured loop, building on each other’s work in each round until reaching a final, more complete and accurate output.
With MetaGPT, it’s possible to build a fully automated AI product development team by customizing agent roles, SOPs, PRD templates, stakeholder priorities and overall project goals. The framework is extensible, allowing teams to adapt it to specific workflows and requirements.
Now that we understand how individual agents operate and collaborate, let’s look at how this process is orchestrated at the application level in the full PRD generation workflow.
This section acts as a step-by-step guide to understand the workflow of this multiagent PRD generation application’s team of MetaGPT agents.
Let’s define a structured agentic workflow with our MetaGPT team by creating a SOP. This SOP breaks down the complex task of creating a PRD into clear, actionable steps, assigning each to a specialized agent.
A well-defined SOP clarifies each agent’s role and actions. This structure promotes accountability and smooth execution across the PRD lifecycle: drafting, research enrichment, peer review and revision.
Team roles:
This SOP ensures that the project manager leads the team, coordinating all contributions to automate the creation of a research-backed and reviewed PRD.
To run this tutorial effectively, users need the following requirements:
Note: Running larger models or multiple agents might require more memory (32 GB+ recommended for best performance). Intermittent timeout errors can occur. If you encounter timeout errors, try restarting the process and ensuring your system has sufficient resources.
These steps can be followed here or within the aptly named project folder on GitHub.
First, create a virtual environment to avoid Python dependency issues. This project works most stable with Python 3.11.
Install the latest development version of MetaGPT.
Important: For this tutorial, you must install MetaGPT by using the command above. Do not install MetaGPT from PyPI or other sources, as only the latest development version is supported here.
Install Ollama by using any of the following methods dependent on your OS:
For macOS (using Homebrew)
Download from the official Ollama website (macOS, Linux, Windows)
After installation, you can start the Ollama server and pull a model (deepseek-r1:8b) with:
To configure the Ollama and Deepseek to work with MetaGPT, we need to create and edit a config file.
Initialize the MetaGPT configuration:
This action creates a file at
Edit the file to configure your LLM with the following steps:
1. In a terminal window, run the following command to open the config file in the nano editor:
2. Edit the file to match this Ollama configuration that uses the deepseek-r1:8b model.
Note: If the field
Your LLM configuration changes are now saved!
For additional config examples, see the two provided in the MetaGPT docs here and here.
MetaGPT agents are built from two main components:
An
Actions tell each agent what to do and how to interact with the language model.
Each action typically includes:
Require imports for actions:
The role class represents an AI agent or team member in the workflow. Roles instruct the model how to act and define which specific part of the process it should follow (such as managing, researching or reviewing).
Each role typically includes:
Required imports for roles:
MetaGPT organizes the workflow into rounds, which are iterative cycles where agents collaborate to improve the PRD. Each round consists of the following steps:
Round 1: Initial draft
Round 2 (and beyond): Review and revision:
Repeat
Multiagent PRD generation workflow diagram:
In the next step, you’ll build a team of agents for PRD AI automation.
We’ll define each agent’s role and connect its relevant workflow actions.
In this section, you’ll see how to define agent actions, create agent roles and assemble a team to automate PRD generation, research and review.
Here are the agent actions that the PRD team will perform by using the
Core tasks
The following 5 action classes define the core tasks performed by the agents in this AI-powered PRD generation workflow:
Here are the agent roles that represent the multiagent PRD team. Below is the code that specifies which actions they perform.
Core workflow and role definitions
The following agents collaborate to automate each step of the PRD creation process:
Use the
Important note:
The documents and outputs generated by this tutorial use large language models (LLMs), which are probabilistic and can occasionally produce incomplete, inaccurate or inconsistent results.
Always review and validate all generated content yourself.
LLMs are helpful tools, but cannot fully replace the expertise and judgment of a real product development team.
To run the program with default values for
This command will launch the team of agents, automate the PRD creation process and iterate for the specified number of rounds.
This modular approach allows room for fine-tuning the process of automating complex product development tasks.
When you run the application, the agents collaborate to produce and refine a PRD.
The final PRD.md file includes a section titled document revision notes that summarizes the key changes made during the review and revision process. This section helps stakeholders quickly understand what was updated in the document.
Here are the main enhancements found in the final PRD for the wealth manager application:
By following this tutorial, you’ve learned how to automate the creation and refinement of a product requirements document by using MetaGPT and Ollama. You set up a multi-agent team, defined custom actions and roles and ran an iterative workflow that produces high-quality, actionable PRDs. This modular approach can be adapted for other collaborative AI tasks, making it a powerful tool to streamline AI product management.
Easily design scalable AI assistants and agents, automate repetitive tasks and simplify complex processes with IBM® watsonx Orchestrate™.
Put AI to work in your business with IBM's industry-leading AI expertise and portfolio of solutions at your side.
Reinvent critical workflows and operations by adding AI to maximize experiences, real-time decision-making and business value.