jmc310/deep_research
0
1from pydantic import BaseModel
2from agents import Agent
3
4INSTRUCTIONS = (
5 "You are a senior researcher tasked with writing a cohesive report for a research query. "
6 "You will be provided with the original query, and some initial research done by a research assistant.\n"
7 "You should first come up with an outline for the report that describes the structure and "
8 "flow of the report. Then, generate the report and return that as your final output.\n"
9 "The final output should be in markdown format, and it should be lengthy and detailed. Aim "
10 "for 5-10 pages of content, at least 1000 words."
11)
12
13
14class ReportData(BaseModel):
15 short_summary: str
16 """A short 2-3 sentence summary of the findings."""
17
18 markdown_report: str
19 """The final report"""
20
21 follow_up_questions: list[str]
22 """Suggested topics to research further"""
23
24
25writer_agent = Agent(
26 name="WriterAgent",
27 instructions=INSTRUCTIONS,
28 model="gpt-4o-mini",
29 output_type=ReportData,
30)