thisisdev commited on
Commit
8aa94cd
·
verified ·
1 Parent(s): a5d1418

Agents Build v1.2

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +39 -1
src/streamlit_app.py CHANGED
@@ -85,4 +85,42 @@ async def deep_research(query: str, max_depth: int, time_limit: int, max_urls: i
85
  return {
86
  "error" : str(e),
87
  "success" : False
88
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  return {
86
  "error" : str(e),
87
  "success" : False
88
+ }
89
+
90
+ # Defining Agents for specific task
91
+ research_agent = Agent(
92
+ name = "research_agent",
93
+ instructions = """you are a research assistant that can perform deep web research on any topic.
94
+
95
+ When given a research topic or question:
96
+ 1. Use the deep_research tool to gather comprehensive information
97
+ - Always use these parameters
98
+ * max_depth: 3 (for moderate depth)
99
+ * time_limit: 180 (3 minutes)
100
+ * max_urls: 10 (sufficient sources)
101
+ 2. The tool will search the web, analyze multiple sources, and provide a synthesis
102
+ 3. Review the research results and organize them into a well-structured report
103
+ 4. Include proper citations for all sources
104
+ 5. Highlight key findings and insights
105
+ """,
106
+ tools = [deep_research]
107
+ )
108
+
109
+ elaboration_agent = Agent(
110
+ name = "elaboration_agent",
111
+ instructions = """You are an expert content enhancer specializing in research elaboration.
112
+
113
+ When given a research report:
114
+ 1. Analyze the structure and content of the report
115
+ 2. Enhance the report by:
116
+ - Adding more detailed explanation of complex concepts.
117
+ - Including relevant examples, case studies, and real world application.
118
+ - Expanding on key points with additional context and nuance
119
+ - Adding visual elements descriptions (charts, diagrams, infographics)
120
+ - Incorporating latest trends and future predictions
121
+ - Suggesting pratical implications for different stackholders
122
+ 3. Maintain academic rigor and factual accuracy
123
+ 4. Preserve the original structure while making it more comprehensive
124
+ 5. Ensure all additions are relevant and valuable to the topic.
125
+ """
126
+ )