Skip to content

Building AI agents, atomically

merge changes

KennyVaneetvelde85c17cd6ab05
diff --git a/examples/deep_research_multi_agent/agents/info_refiner_agent.py b/examples/deep_research_multi_agent/agents/info_refiner_agent.py
index 00d672f..e582919 100644
--- a/examples/deep_research_multi_agent/agents/info_refiner_agent.py
+++ b/examples/deep_research_multi_agent/agents/info_refiner_agent.py
@@ -7,11 +7,15 @@ from atomic_agents.lib.components.system_prompt_generator import SystemPromptGen
class RefineAnswerInputSchema(BaseIOSchema):
+ """This schema defines the input for the RefineAnswer agent."""
+
question: str = Field(..., description="The question that was asked.")
answer: str = Field(..., description="The initial answer to the question.")
-class RefineAnswerOutputSchema(BaseModel):
+class RefineAnswerOutputSchema(BaseIOSchema):
+ """This schema defines the output for the RefineAnswer agent."""
+
refined_answer: str = Field(..., description="The refined answer to the question.")
diff --git a/examples/deep_research_multi_agent/agents/query_agent.py b/examples/deep_research_multi_agent/agents/query_agent.py
index 315cdc3..e30e0a9 100644
--- a/examples/deep_research_multi_agent/agents/query_agent.py
+++ b/examples/deep_research_multi_agent/agents/query_agent.py
@@ -1,13 +1,16 @@
import instructor
import openai
+from pydantic import Field
from atomic_agents.agents.base_agent import BaseIOSchema, BaseAgent, BaseAgentConfig
from atomic_agents.lib.components.system_prompt_generator import SystemPromptGenerator
from atomic_agents.lib.tools.search.searxng_tool import SearxNGTool
class QueryAgentInputSchema(BaseIOSchema):
- instruction: str = "A detailed instruction or request to generate deep research queries for."
- num_queries: int = "The number of queries to generate."
+ """This is the input schema for the QueryAgent."""
+
+ instruction: str = Field(..., "A detailed instruction or request to generate deep research queries for.")
+ num_queries: int = Field(..., "The number of queries to generate.")
# Create the query agent
diff --git a/examples/deep_research_multi_agent/agents/question_answering_agent.py b/examples/deep_research_multi_agent/agents/question_answering_agent.py
index 1ac127f..dde081f 100644
--- a/examples/deep_research_multi_agent/agents/question_answering_agent.py
+++ b/examples/deep_research_multi_agent/agents/question_answering_agent.py
@@ -6,10 +6,14 @@ from atomic_agents.lib.components.system_prompt_generator import SystemPromptGen
class AnswerAgentInputSchema(BaseIOSchema):
+ """This schema defines the input schema for the AnswerAgent."""
+
question: str = Field(..., description="A question that needs to be answered based on the provided context.")
class AnswerAgentOutputSchema(BaseIOSchema):
+ """This schema defines the output schema for the AnswerAgent."""
+
markdown_output: str = Field(..., description="The answer to the question in markdown format.")
diff --git a/examples/deep_research_multi_agent/agents/top_urls_selector_agent.py b/examples/deep_research_multi_agent/agents/top_urls_selector_agent.py
index a9e6ca2..4f8cd1c 100644
--- a/examples/deep_research_multi_agent/agents/top_urls_selector_agent.py
+++ b/examples/deep_research_multi_agent/agents/top_urls_selector_agent.py
@@ -7,11 +7,15 @@ from atomic_agents.lib.components.system_prompt_generator import SystemPromptGen
class TopUrlsSelectorInputSchema(BaseIOSchema):
+ """This schema defines the input schema for the TopUrlsSelector agent."""
+
user_input: str = Field(..., description="The user input or question.")
num_urls: int = Field(..., description="The number of top URLs to select.")
class TopUrlsSelectorOutputSchema(BaseIOSchema):
+ """This schema defines the output schema for the TopUrlsSelector agent."""
+
top_urls: List[HttpUrl] = Field(..., description="The list of top URLs selected based on the user input.")