Autonomous research multi agent Product Requirement Document (PRD) creation system - Day 3 (Code on Github)
Day 3: Assembling the Team & The Final Launch
On Day 1, we set the stage. On Day 2, we built the tools (search_web, record_notes) and set the Context.
We will define each agent's role and bring them together under the AgentWorkflow manager.
Each agent is a FunctionAgent.
# Defining the ResearchAgent
research_agent = FunctionAgent(
name="ResearchAgent",
llm=llm, # The standard reasoning LLM
tools=[search_web, record_notes],
system_prompt=(
"Your ONLY job is to research... You MUST NOT write the final report. "
"Once done, you MUST hand off control to the 'WriteAgent'."
)
)
- llm: It's "brain" for reasoning.
- tools: The specific functions it's allowed to use.
- system_prompt: It's "job description" and rules of engagement.
With our three agents defined (Researcher, Writer, Reviewer), we now need a manager to orchestrate them. This is the job of LlamaIndex's AgentWorkflow. We give it the list of agents and the initial_state (the shared whiteboard). This single object now contains our entire autonomous team.
agent_workflow = AgentWorkflow(
agents=[research_agent, write_agent, review_agent],
root_agent=research_agent.name, # The agent that starts
initial_state={
"research_notes": {},
"report_content": "Not written yet.",
},
)
My #BuildInPublic journey for this small project is complete!
The full code and Readme are now available on GitHub.
🔗 GitHub Repo: https://github.com/AIBrahmi/PRDResearchAgents
Thank you for following along. Go build something amazing.
Note: I may add more features in the future if there is a demand from you guys!
Posted Aug 6, 2025, 3:20 PM UTC