Skip to content

Building AI agents, atomically

update docs

KennyVaneetveldef4fdf594c136
diff --git a/docs/api/README.md b/docs/api/README.md
index 2a1fe61..1309404 100644
--- a/docs/api/README.md
+++ b/docs/api/README.md
@@ -6,11 +6,11 @@ A full list of `Atomic_agents` project modules.
- [Atomic Agents](atomic_agents/index.md#atomic-agents)
- [Agents](atomic_agents/agents/index.md#agents)
- - [BaseAgent](atomic_agents/agents/base_agent.md#baseAgent)
+ - [BaseAgent](atomic_agents/agents/base_agent.md#baseagent)
- [ToolInterfaceAgent](atomic_agents/agents/tool_interface_agent.md#toolinterfaceagent)
- [Lib](atomic_agents/lib/index.md#lib)
- [Components](atomic_agents/lib/components/index.md#components)
- - [AgentMemory](atomic_agents/lib/components/agent_memory.md#AgentMemory)
+ - [AgentMemory](atomic_agents/lib/components/agent_memory.md#agentmemory)
- [SystemPromptGenerator](atomic_agents/lib/components/system_prompt_generator.md#systempromptgenerator)
- [Models](atomic_agents/lib/models/index.md#models)
- [WebDocument](atomic_agents/lib/models/web_document.md#webdocument)
diff --git a/docs/api/atomic_agents/agents/base_agent.md b/docs/api/atomic_agents/agents/base_agent.md
index c1f0ff1..82e97ab 100644
--- a/docs/api/atomic_agents/agents/base_agent.md
+++ b/docs/api/atomic_agents/agents/base_agent.md
@@ -4,41 +4,22 @@
> Auto-generated documentation for [atomic_agents.agents.base_agent](../../../../atomic_agents/agents/base_agent.py) module.
-- [BaseAgent](#baseAgent)
+- [BaseAgent](#baseagent)
+ - [BaseAgent](#baseagent-1)
+ - [BaseAgent().get_context_provider](#baseagent()get_context_provider)
+ - [BaseAgent().get_response](#baseagent()get_response)
+ - [BaseAgent().register_context_provider](#baseagent()register_context_provider)
+ - [BaseAgent().reset_memory](#baseagent()reset_memory)
+ - [BaseAgent().run](#baseagent()run)
+ - [BaseAgent().unregister_context_provider](#baseagent()unregister_context_provider)
+ - [BaseAgentConfig](#baseagentconfig)
- [BaseAgentIO](#baseagentio)
- - [BaseAgent](#baseAgent-1)
- - [BaseAgent()._get_and_handle_response](#baseAgent()_get_and_handle_response)
- - [BaseAgent()._init_run](#baseAgent()_init_run)
- - [BaseAgent()._post_run](#baseAgent()_post_run)
- - [BaseAgent()._pre_run](#baseAgent()_pre_run)
- - [BaseAgent().get_context_provider](#baseAgent()get_context_provider)
- - [BaseAgent().get_response](#baseAgent()get_response)
- - [BaseAgent().get_system_prompt](#baseAgent()get_system_prompt)
- - [BaseAgent().register_context_provider](#baseAgent()register_context_provider)
- - [BaseAgent().reset_memory](#baseAgent()reset_memory)
- - [BaseAgent().run](#baseAgent()run)
- - [BaseAgent().unregister_context_provider](#baseAgent()unregister_context_provider)
- - [BaseAgentConfig](#baseAgentconfig)
- - [BaseAgentInputSchema](#baseAgentinputschema)
- - [BaseAgentOutputSchema](#baseAgentoutputschema)
-
-## BaseAgentIO
-
-[Show source in base_agent.py:10](../../../../atomic_agents/agents/base_agent.py#L10)
-
-Base class for input and output schemas for chat agents.
-
-#### Signature
-
-```python
-class BaseAgentIO(BaseModel): ...
-```
-
-
+ - [BaseAgentInputSchema](#baseagentinputschema)
+ - [BaseAgentOutputSchema](#baseagentoutputschema)
## BaseAgent
-[Show source in base_agent.py:62](../../../../atomic_agents/agents/base_agent.py#L62)
+[Show source in base_agent.py:71](../../../../atomic_agents/agents/base_agent.py#L71)
Base class for chat agents.
@@ -59,85 +40,16 @@ generating system prompts, and obtaining responses from a language model.
```python
class BaseAgent:
- def __init__(
- self,
- config: BaseAgentConfig = BaseAgentConfig(
- client=instructor.from_openai(openai.OpenAI())
- ),
- ): ...
+ def __init__(self, config: BaseAgentConfig): ...
```
#### See also
-- [BaseAgentConfig](#baseAgentconfig)
-
-### BaseAgent()._get_and_handle_response
-
-[Show source in base_agent.py:150](../../../../atomic_agents/agents/base_agent.py#L150)
-
-Handles obtaining and processing the response.
-
-#### Returns
-
-- `Type[BaseModel]` - The processed response.
-
-#### Signature
-
-```python
-def _get_and_handle_response(self): ...
-```
-
-### BaseAgent()._init_run
-
-[Show source in base_agent.py:159](../../../../atomic_agents/agents/base_agent.py#L159)
-
-Initializes the run with the given user input.
-
-#### Arguments
-
-- `user_input` *str* - The input text from the user.
-
-#### Signature
-
-```python
-def _init_run(self, user_input: Type[BaseAgentIO]): ...
-```
-
-#### See also
-
-- [BaseAgentIO](#baseagentio)
-
-### BaseAgent()._post_run
-
-[Show source in base_agent.py:175](../../../../atomic_agents/agents/base_agent.py#L175)
-
-Finalizes the run with the given response.
-
-#### Arguments
-
-- `response` *Type[BaseModel]* - The response from the chat agent.
-
-#### Signature
-
-```python
-def _post_run(self, response): ...
-```
-
-### BaseAgent()._pre_run
-
-[Show source in base_agent.py:169](../../../../atomic_agents/agents/base_agent.py#L169)
-
-Prepares for the run. This method can be overridden by subclasses to add custom pre-run logic.
-
-#### Signature
-
-```python
-def _pre_run(self): ...
-```
+- [BaseAgentConfig](#baseagentconfig)
### BaseAgent().get_context_provider
-[Show source in base_agent.py:184](../../../../atomic_agents/agents/base_agent.py#L184)
+[Show source in base_agent.py:155](../../../../atomic_agents/agents/base_agent.py#L155)
Retrieves a context provider by name.
@@ -167,13 +79,14 @@ def get_context_provider(
### BaseAgent().get_response
-[Show source in base_agent.py:112](../../../../atomic_agents/agents/base_agent.py#L112)
+[Show source in base_agent.py:113](../../../../atomic_agents/agents/base_agent.py#L113)
Obtains a response from the language model.
#### Arguments
-- `response_model` *Type[BaseModel], optional* - The schema for the response data. If not set, self.output_schema is used.
+response_model (Type[BaseModel], optional):
+ The schema for the response data. If not set, self.output_schema is used.
#### Returns
@@ -185,25 +98,9 @@ Obtains a response from the language model.
def get_response(self, response_model=None) -> Type[BaseModel]: ...
```
-### BaseAgent().get_system_prompt
-
-[Show source in base_agent.py:103](../../../../atomic_agents/agents/base_agent.py#L103)
-
-Generates the system prompt.
-
-#### Returns
-
-- `str` - The generated system prompt.
-
-#### Signature
-
-```python
-def get_system_prompt(self) -> str: ...
-```
-
### BaseAgent().register_context_provider
-[Show source in base_agent.py:201](../../../../atomic_agents/agents/base_agent.py#L201)
+[Show source in base_agent.py:172](../../../../atomic_agents/agents/base_agent.py#L172)
Registers a new context provider.
@@ -226,7 +123,7 @@ def register_context_provider(
### BaseAgent().reset_memory
-[Show source in base_agent.py:97](../../../../atomic_agents/agents/base_agent.py#L97)
+[Show source in base_agent.py:107](../../../../atomic_agents/agents/base_agent.py#L107)
Resets the memory to its initial state.
@@ -238,17 +135,17 @@ def reset_memory(self): ...
### BaseAgent().run
-[Show source in base_agent.py:133](../../../../atomic_agents/agents/base_agent.py#L133)
+[Show source in base_agent.py:136](../../../../atomic_agents/agents/base_agent.py#L136)
Runs the chat agent with the given user input.
#### Arguments
-- `user_input` *Optional[str]* - The input text from the user. If not provided, skips the initialization step.
+- `user_input` *Optional[Type[BaseAgentIO]]* - The input from the user. If not provided, skips adding to memory.
#### Returns
-- `str` - The response from the chat agent.
+- `Type[BaseAgentIO]` - The response from the chat agent.
#### Signature
@@ -262,7 +159,7 @@ def run(self, user_input: Optional[Type[BaseAgentIO]] = None) -> Type[BaseAgentI
### BaseAgent().unregister_context_provider
-[Show source in base_agent.py:211](../../../../atomic_agents/agents/base_agent.py#L211)
+[Show source in base_agent.py:182](../../../../atomic_agents/agents/base_agent.py#L182)
Unregisters an existing context provider.
@@ -280,7 +177,7 @@ def unregister_context_provider(self, provider_name: str): ...
## BaseAgentConfig
-[Show source in base_agent.py:51](../../../../atomic_agents/agents/base_agent.py#L51)
+[Show source in base_agent.py:57](../../../../atomic_agents/agents/base_agent.py#L57)
#### Signature
@@ -290,9 +187,23 @@ class BaseAgentConfig(BaseModel): ...
+## BaseAgentIO
+
+[Show source in base_agent.py:11](../../../../atomic_agents/agents/base_agent.py#L11)
+
+Base class for input and output schemas for chat agents.
+
+#### Signature
+
+```python
+class BaseAgentIO(BaseModel): ...
+```
+
+
+
## BaseAgentInputSchema
-[Show source in base_agent.py:21](../../../../atomic_agents/agents/base_agent.py#L21)
+[Show source in base_agent.py:24](../../../../atomic_agents/agents/base_agent.py#L24)
#### Signature
@@ -308,7 +219,7 @@ class BaseAgentInputSchema(BaseAgentIO): ...
## BaseAgentOutputSchema
-[Show source in base_agent.py:36](../../../../atomic_agents/agents/base_agent.py#L36)
+[Show source in base_agent.py:39](../../../../atomic_agents/agents/base_agent.py#L39)
#### Signature
diff --git a/docs/api/atomic_agents/agents/tool_interface_agent.md b/docs/api/atomic_agents/agents/tool_interface_agent.md
index 93f766f..c2144b4 100644
--- a/docs/api/atomic_agents/agents/tool_interface_agent.md
+++ b/docs/api/atomic_agents/agents/tool_interface_agent.md
@@ -12,7 +12,7 @@
## ToolInputModel
-[Show source in tool_interface_agent.py:12](../../../../atomic_agents/agents/tool_interface_agent.py#L12)
+[Show source in tool_interface_agent.py:16](../../../../atomic_agents/agents/tool_interface_agent.py#L16)
#### Signature
@@ -28,7 +28,7 @@ class ToolInputModel(BaseAgentIO): ...
## ToolInterfaceAgent
-[Show source in tool_interface_agent.py:23](../../../../atomic_agents/agents/tool_interface_agent.py#L23)
+[Show source in tool_interface_agent.py:28](../../../../atomic_agents/agents/tool_interface_agent.py#L28)
A specialized chat agent designed to interact with a specific tool.
@@ -49,12 +49,12 @@ class ToolInterfaceAgent(BaseAgent):
#### See also
-- [BaseAgent](./base_agent.md#baseAgent)
+- [BaseAgent](./base_agent.md#baseagent)
- [ToolInterfaceAgentConfig](#toolinterfaceagentconfig)
### ToolInterfaceAgent()._get_and_handle_response
-[Show source in tool_interface_agent.py:84](../../../../atomic_agents/agents/tool_interface_agent.py#L84)
+[Show source in tool_interface_agent.py:104](../../../../atomic_agents/agents/tool_interface_agent.py#L104)
Handles obtaining and processing the response from the tool.
@@ -76,7 +76,7 @@ def _get_and_handle_response(self): ...
## ToolInterfaceAgentConfig
-[Show source in tool_interface_agent.py:8](../../../../atomic_agents/agents/tool_interface_agent.py#L8)
+[Show source in tool_interface_agent.py:11](../../../../atomic_agents/agents/tool_interface_agent.py#L11)
#### Signature
@@ -86,4 +86,4 @@ class ToolInterfaceAgentConfig(BaseAgentConfig): ...
#### See also
-- [BaseAgentConfig](./base_agent.md#baseAgentconfig)
\ No newline at end of file
+- [BaseAgentConfig](./base_agent.md#baseagentconfig)
\ No newline at end of file
diff --git a/docs/api/atomic_agents/lib/components/agent_memory.md b/docs/api/atomic_agents/lib/components/agent_memory.md
index f66dd3b..1490b51 100644
--- a/docs/api/atomic_agents/lib/components/agent_memory.md
+++ b/docs/api/atomic_agents/lib/components/agent_memory.md
@@ -4,42 +4,20 @@
> Auto-generated documentation for [atomic_agents.lib.components.agent_memory](../../../../../atomic_agents/lib/components/agent_memory.py) module.
-#### Attributes
-
-- `memory` - Create a AgentMemory with a maximum of 5 messages: AgentMemory(max_messages=5)
-
-- `content` - Test Case 1: Text()
-
-- `content` - Test Case 2: Text()
-
-- `content` - Test Case 3: Text()
-
-- `content` - Test Case 4: Text()
-
-- `content` - Test Case 5: Text()
-
-- `content` - Test Case 6: Text()
-
-- `content` - Test Case 7: Text()
-
-- `content` - Test Case 8: Text()
-
-
-- [AgentMemory](#AgentMemory)
- - [AgentMemory](#AgentMemory-1)
- - [AgentMemory()._manage_overflow](#AgentMemory()_manage_overflow)
- - [AgentMemory().add_message](#AgentMemory()add_message)
- - [AgentMemory().copy](#AgentMemory()copy)
- - [AgentMemory().dump](#AgentMemory()dump)
- - [AgentMemory().get_history](#AgentMemory()get_history)
- - [AgentMemory().get_message_count](#AgentMemory()get_message_count)
- - [AgentMemory().load](#AgentMemory()load)
+- [AgentMemory](#agentmemory)
+ - [AgentMemory](#agentmemory-1)
+ - [AgentMemory()._manage_overflow](#agentmemory()_manage_overflow)
+ - [AgentMemory().add_message](#agentmemory()add_message)
+ - [AgentMemory().copy](#agentmemory()copy)
+ - [AgentMemory().dump](#agentmemory()dump)
+ - [AgentMemory().get_history](#agentmemory()get_history)
+ - [AgentMemory().get_message_count](#agentmemory()get_message_count)
+ - [AgentMemory().load](#agentmemory()load)
- [Message](#message)
- - [print_panel](#print_panel)
## AgentMemory
-[Show source in agent_memory.py:19](../../../../../atomic_agents/lib/components/agent_memory.py#L19)
+[Show source in agent_memory.py:23](../../../../../atomic_agents/lib/components/agent_memory.py#L23)
Manages the chat history for an AI agent.
@@ -57,7 +35,7 @@ class AgentMemory:
### AgentMemory()._manage_overflow
-[Show source in agent_memory.py:61](../../../../../atomic_agents/lib/components/agent_memory.py#L61)
+[Show source in agent_memory.py:71](../../../../../atomic_agents/lib/components/agent_memory.py#L71)
Manages the chat history overflow based on max_messages constraint.
@@ -69,7 +47,7 @@ def _manage_overflow(self) -> None: ...
### AgentMemory().add_message
-[Show source in agent_memory.py:38](../../../../../atomic_agents/lib/components/agent_memory.py#L38)
+[Show source in agent_memory.py:42](../../../../../atomic_agents/lib/components/agent_memory.py#L42)
Adds a message to the chat history and manages overflow.
@@ -77,7 +55,7 @@ Adds a message to the chat history and manages overflow.
- `role` *str* - The role of the message sender.
content (Union[str, Dict]): The content of the message.
-- [tool_message](#AgentMemory) *Optional[Dict]* - Optional tool message to be included.
+- `tool_message` *Optional[Dict]* - Optional tool message to be included.
- `tool_id` *Optional[str]* - Optional unique identifier for the tool call.
#### Signature
@@ -94,13 +72,13 @@ def add_message(
### AgentMemory().copy
-[Show source in agent_memory.py:109](../../../../../atomic_agents/lib/components/agent_memory.py#L109)
+[Show source in agent_memory.py:119](../../../../../atomic_agents/lib/components/agent_memory.py#L119)
Creates a copy of the chat memory.
#### Returns
-- [AgentMemory](#AgentMemory) - A copy of the chat memory.
+- [AgentMemory](#agentmemory) - A copy of the chat memory.
#### Signature
@@ -110,7 +88,7 @@ def copy(self) -> "AgentMemory": ...
### AgentMemory().dump
-[Show source in agent_memory.py:78](../../../../../atomic_agents/lib/components/agent_memory.py#L78)
+[Show source in agent_memory.py:88](../../../../../atomic_agents/lib/components/agent_memory.py#L88)
Converts the chat history to a list of dictionaries.
@@ -126,7 +104,7 @@ def dump(self) -> List[Dict]: ...
### AgentMemory().get_history
-[Show source in agent_memory.py:69](../../../../../atomic_agents/lib/components/agent_memory.py#L69)
+[Show source in agent_memory.py:79](../../../../../atomic_agents/lib/components/agent_memory.py#L79)
Retrieves the chat history.
@@ -146,7 +124,7 @@ def get_history(self) -> List[Message]: ...
### AgentMemory().get_message_count
-[Show source in agent_memory.py:121](../../../../../atomic_agents/lib/components/agent_memory.py#L121)
+[Show source in agent_memory.py:131](../../../../../atomic_agents/lib/components/agent_memory.py#L131)
Returns the number of messages in the chat history.
@@ -162,7 +140,7 @@ def get_message_count(self) -> int: ...
### AgentMemory().load
-[Show source in agent_memory.py:87](../../../../../atomic_agents/lib/components/agent_memory.py#L87)
+[Show source in agent_memory.py:97](../../../../../atomic_agents/lib/components/agent_memory.py#L97)
Loads the chat history from a list of dictionaries using Pydantic's parsing.
@@ -180,7 +158,7 @@ def load(self, dict_list: List[Dict]) -> None: ...
## Message
-[Show source in agent_memory.py:4](../../../../../atomic_agents/lib/components/agent_memory.py#L4)
+[Show source in agent_memory.py:6](../../../../../atomic_agents/lib/components/agent_memory.py#L6)
Represents a message in the chat history.
@@ -195,16 +173,4 @@ content (Union[str, Dict]): The content of the message.
```python
class Message(BaseModel): ...
-```
-
-
-
-## print_panel
-
-[Show source in agent_memory.py:139](../../../../../atomic_agents/lib/components/agent_memory.py#L139)
-
-#### Signature
-
-```python
-def print_panel(title, content): ...
```
\ No newline at end of file
diff --git a/docs/api/atomic_agents/lib/components/system_prompt_generator.md b/docs/api/atomic_agents/lib/components/system_prompt_generator.md
index 7f3c3b1..1eb4ba6 100644
--- a/docs/api/atomic_agents/lib/components/system_prompt_generator.md
+++ b/docs/api/atomic_agents/lib/components/system_prompt_generator.md
@@ -5,69 +5,12 @@
> Auto-generated documentation for [atomic_agents.lib.components.system_prompt_generator](../../../../../atomic_agents/lib/components/system_prompt_generator.py) module.
- [SystemPromptGenerator](#systempromptgenerator)
- - [CurrentDateProvider](#currentdateprovider)
- - [CurrentDateProvider().get_info](#currentdateprovider()get_info)
- - [LoremIpsumProvider](#loremipsumprovider)
- - [LoremIpsumProvider().get_info](#loremipsumprovider()get_info)
- [SystemPromptContextProviderBase](#systempromptcontextproviderbase)
- [SystemPromptContextProviderBase().get_info](#systempromptcontextproviderbase()get_info)
- [SystemPromptGenerator](#systempromptgenerator-1)
- [SystemPromptGenerator().generate_prompt](#systempromptgenerator()generate_prompt)
- [SystemPromptInfo](#systempromptinfo)
-## CurrentDateProvider
-
-[Show source in system_prompt_generator.py:64](../../../../../atomic_agents/lib/components/system_prompt_generator.py#L64)
-
-#### Signature
-
-```python
-class CurrentDateProvider(SystemPromptContextProviderBase):
- def __init__(self, title, format: str = "%Y-%m-%d %H:%M:%S"): ...
-```
-
-#### See also
-
-- [SystemPromptContextProviderBase](#systempromptcontextproviderbase)
-
-### CurrentDateProvider().get_info
-
-[Show source in system_prompt_generator.py:69](../../../../../atomic_agents/lib/components/system_prompt_generator.py#L69)
-
-#### Signature
-
-```python
-def get_info(self) -> str: ...
-```
-
-
-
-## LoremIpsumProvider
-
-[Show source in system_prompt_generator.py:72](../../../../../atomic_agents/lib/components/system_prompt_generator.py#L72)
-
-#### Signature
-
-```python
-class LoremIpsumProvider(SystemPromptContextProviderBase): ...
-```
-
-#### See also
-
-- [SystemPromptContextProviderBase](#systempromptcontextproviderbase)
-
-### LoremIpsumProvider().get_info
-
-[Show source in system_prompt_generator.py:73](../../../../../atomic_agents/lib/components/system_prompt_generator.py#L73)
-
-#### Signature
-
-```python
-def get_info(self) -> str: ...
-```
-
-
-
## SystemPromptContextProviderBase
[Show source in system_prompt_generator.py:6](../../../../../atomic_agents/lib/components/system_prompt_generator.py#L6)
@@ -94,13 +37,13 @@ def get_info(self) -> str: ...
## SystemPromptGenerator
-[Show source in system_prompt_generator.py:24](../../../../../atomic_agents/lib/components/system_prompt_generator.py#L24)
+[Show source in system_prompt_generator.py:26](../../../../../atomic_agents/lib/components/system_prompt_generator.py#L26)
#### Signature
```python
class SystemPromptGenerator:
- def __init__(self, system_prompt_info: SystemPromptInfo = None): ...
+ def __init__(self, system_prompt_info: Optional[SystemPromptInfo] = None): ...
```
#### See also
@@ -109,7 +52,7 @@ class SystemPromptGenerator:
### SystemPromptGenerator().generate_prompt
-[Show source in system_prompt_generator.py:38](../../../../../atomic_agents/lib/components/system_prompt_generator.py#L38)
+[Show source in system_prompt_generator.py:39](../../../../../atomic_agents/lib/components/system_prompt_generator.py#L39)
#### Signature
@@ -121,7 +64,7 @@ def generate_prompt(self) -> str: ...
## SystemPromptInfo
-[Show source in system_prompt_generator.py:18](../../../../../atomic_agents/lib/components/system_prompt_generator.py#L18)
+[Show source in system_prompt_generator.py:19](../../../../../atomic_agents/lib/components/system_prompt_generator.py#L19)
#### Signature
diff --git a/docs/api/atomic_agents/lib/models/web_document.md b/docs/api/atomic_agents/lib/models/web_document.md
index 03e45b4..677672c 100644
--- a/docs/api/atomic_agents/lib/models/web_document.md
+++ b/docs/api/atomic_agents/lib/models/web_document.md
@@ -10,7 +10,7 @@
## WebDocument
-[Show source in web_document.py:12](../../../../../atomic_agents/lib/models/web_document.py#L12)
+[Show source in web_document.py:14](../../../../../atomic_agents/lib/models/web_document.py#L14)
#### Signature
@@ -26,7 +26,7 @@ class WebDocument(BaseAgentIO): ...
## WebDocumentMetadata
-[Show source in web_document.py:5](../../../../../atomic_agents/lib/models/web_document.py#L5)
+[Show source in web_document.py:6](../../../../../atomic_agents/lib/models/web_document.py#L6)
#### Signature
diff --git a/docs/api/atomic_agents/lib/tools/base.md b/docs/api/atomic_agents/lib/tools/base.md
index 21950b4..8f22666 100644
--- a/docs/api/atomic_agents/lib/tools/base.md
+++ b/docs/api/atomic_agents/lib/tools/base.md
@@ -11,7 +11,7 @@
## BaseTool
-[Show source in base.py:11](../../../../../atomic_agents/lib/tools/base.py#L11)
+[Show source in base.py:13](../../../../../atomic_agents/lib/tools/base.py#L13)
Base class for all tools in the Atomic Agents framework.
@@ -20,7 +20,8 @@ Base class for all tools in the Atomic Agents framework.
- `input_schema` *Type[BaseAgentIO]* - The schema for the input data.
- `output_schema` *Type[BaseAgentIO]* - The schema for the output data.
- `tool_name` *str* - The name of the tool, derived from the input schema's title.
-- `tool_description` *str* - The description of the tool, derived from the input schema's description or overridden by the user.
+tool_description (str):
+ The description of the tool, derived from the input schema's description or overridden by the user.
#### Signature
@@ -35,7 +36,7 @@ class BaseTool:
### BaseTool().run
-[Show source in base.py:35](../../../../../atomic_agents/lib/tools/base.py#L35)
+[Show source in base.py:38](../../../../../atomic_agents/lib/tools/base.py#L38)
Runs the tool with the given parameters. This method should be implemented by subclasses.
@@ -65,7 +66,7 @@ def run(self, params: Type[BaseAgentIO]) -> BaseAgentIO: ...
## BaseToolConfig
-[Show source in base.py:7](../../../../../atomic_agents/lib/tools/base.py#L7)
+[Show source in base.py:8](../../../../../atomic_agents/lib/tools/base.py#L8)
#### Signature
diff --git a/docs/api/atomic_agents/lib/tools/calculator_tool.md b/docs/api/atomic_agents/lib/tools/calculator_tool.md
index 44c13f3..c3403a3 100644
--- a/docs/api/atomic_agents/lib/tools/calculator_tool.md
+++ b/docs/api/atomic_agents/lib/tools/calculator_tool.md
@@ -13,7 +13,7 @@
## CalculatorTool
-[Show source in calculator_tool.py:35](../../../../../atomic_agents/lib/tools/calculator_tool.py#L35)
+[Show source in calculator_tool.py:43](../../../../../atomic_agents/lib/tools/calculator_tool.py#L43)
Tool for performing calculations based on the provided mathematical expression.
@@ -36,7 +36,7 @@ class CalculatorTool(BaseTool):
### CalculatorTool().run
-[Show source in calculator_tool.py:55](../../../../../atomic_agents/lib/tools/calculator_tool.py#L55)
+[Show source in calculator_tool.py:64](../../../../../atomic_agents/lib/tools/calculator_tool.py#L64)
Runs the CalculatorTool with the given parameters.
@@ -48,10 +48,6 @@ Runs the CalculatorTool with the given parameters.
- [CalculatorToolOutputSchema](#calculatortooloutputschema) - The output of the tool, adhering to the output schema.
-#### Raises
-
-- `ValueError` - If there is an error evaluating the expression.
-
#### Signature
```python
@@ -67,7 +63,7 @@ def run(self, params: CalculatorToolSchema) -> CalculatorToolOutputSchema: ...
## CalculatorToolConfig
-[Show source in calculator_tool.py:32](../../../../../atomic_agents/lib/tools/calculator_tool.py#L32)
+[Show source in calculator_tool.py:39](../../../../../atomic_agents/lib/tools/calculator_tool.py#L39)
#### Signature
@@ -83,7 +79,7 @@ class CalculatorToolConfig(BaseToolConfig): ...
## CalculatorToolOutputSchema
-[Show source in calculator_tool.py:25](../../../../../atomic_agents/lib/tools/calculator_tool.py#L25)
+[Show source in calculator_tool.py:32](../../../../../atomic_agents/lib/tools/calculator_tool.py#L32)
#### Signature
@@ -99,7 +95,7 @@ class CalculatorToolOutputSchema(BaseAgentIO): ...
## CalculatorToolSchema
-[Show source in calculator_tool.py:11](../../../../../atomic_agents/lib/tools/calculator_tool.py#L11)
+[Show source in calculator_tool.py:13](../../../../../atomic_agents/lib/tools/calculator_tool.py#L13)
#### Signature
diff --git a/docs/api/atomic_agents/lib/tools/content_scraping_tool.md b/docs/api/atomic_agents/lib/tools/content_scraping_tool.md
index 694aa8c..54adb96 100644
--- a/docs/api/atomic_agents/lib/tools/content_scraping_tool.md
+++ b/docs/api/atomic_agents/lib/tools/content_scraping_tool.md
@@ -24,7 +24,7 @@
## ContentScrapingTool
-[Show source in content_scraping_tool.py:44](../../../../../atomic_agents/lib/tools/content_scraping_tool.py#L44)
+[Show source in content_scraping_tool.py:50](../../../../../atomic_agents/lib/tools/content_scraping_tool.py#L50)
Tool for scraping web pages or PDFs and converting content to markdown.
@@ -49,7 +49,7 @@ class ContentScrapingTool(BaseTool):
### ContentScrapingTool().run
-[Show source in content_scraping_tool.py:64](../../../../../atomic_agents/lib/tools/content_scraping_tool.py#L64)
+[Show source in content_scraping_tool.py:71](../../../../../atomic_agents/lib/tools/content_scraping_tool.py#L71)
Runs the ContentScrapingTool with the given parameters.
@@ -76,7 +76,7 @@ def run(self, params: ContentScrapingToolSchema) -> ContentScrapingToolOutputSch
## ContentScrapingToolConfig
-[Show source in content_scraping_tool.py:40](../../../../../atomic_agents/lib/tools/content_scraping_tool.py#L40)
+[Show source in content_scraping_tool.py:46](../../../../../atomic_agents/lib/tools/content_scraping_tool.py#L46)
#### Signature
@@ -92,7 +92,7 @@ class ContentScrapingToolConfig(BaseToolConfig): ...
## ContentScrapingToolOutputSchema
-[Show source in content_scraping_tool.py:32](../../../../../atomic_agents/lib/tools/content_scraping_tool.py#L32)
+[Show source in content_scraping_tool.py:38](../../../../../atomic_agents/lib/tools/content_scraping_tool.py#L38)
#### Signature
@@ -108,7 +108,7 @@ class ContentScrapingToolOutputSchema(BaseAgentIO): ...
## ContentScrapingToolSchema
-[Show source in content_scraping_tool.py:18](../../../../../atomic_agents/lib/tools/content_scraping_tool.py#L18)
+[Show source in content_scraping_tool.py:21](../../../../../atomic_agents/lib/tools/content_scraping_tool.py#L21)
#### Signature
diff --git a/docs/api/atomic_agents/lib/tools/yelp_restaurant_finder_tool.md b/docs/api/atomic_agents/lib/tools/yelp_restaurant_finder_tool.md
index e1eb2b2..c283f89 100644
--- a/docs/api/atomic_agents/lib/tools/yelp_restaurant_finder_tool.md
+++ b/docs/api/atomic_agents/lib/tools/yelp_restaurant_finder_tool.md
@@ -16,7 +16,7 @@
## PriceRange
-[Show source in yelp_restaurant_finder_tool.py:36](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L36)
+[Show source in yelp_restaurant_finder_tool.py:39](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L39)
#### Signature
@@ -28,7 +28,7 @@ class PriceRange(Enum): ...
## YelpCategory
-[Show source in yelp_restaurant_finder_tool.py:15](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L15)
+[Show source in yelp_restaurant_finder_tool.py:17](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L17)
#### Signature
@@ -40,7 +40,7 @@ class YelpCategory(Enum): ...
## YelpSearchResultSchema
-[Show source in yelp_restaurant_finder_tool.py:62](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L62)
+[Show source in yelp_restaurant_finder_tool.py:78](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L78)
#### Signature
@@ -56,7 +56,7 @@ class YelpSearchResultSchema(BaseAgentIO): ...
## YelpSearchTool
-[Show source in yelp_restaurant_finder_tool.py:89](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L89)
+[Show source in yelp_restaurant_finder_tool.py:110](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L110)
Tool for performing searches using the Yelp API based on the provided queries.
@@ -81,7 +81,7 @@ class YelpSearchTool(BaseTool):
### YelpSearchTool().run
-[Show source in yelp_restaurant_finder_tool.py:113](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L113)
+[Show source in yelp_restaurant_finder_tool.py:136](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L136)
Runs the YelpSearchTool with the given parameters.
@@ -114,7 +114,7 @@ def run(self, params: YelpSearchToolSchema) -> YelpSearchToolOutputSchema: ...
## YelpSearchToolConfig
-[Show source in yelp_restaurant_finder_tool.py:85](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L85)
+[Show source in yelp_restaurant_finder_tool.py:105](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L105)
#### Signature
@@ -130,7 +130,7 @@ class YelpSearchToolConfig(BaseToolConfig): ...
## YelpSearchToolOutputSchema
-[Show source in yelp_restaurant_finder_tool.py:71](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L71)
+[Show source in yelp_restaurant_finder_tool.py:88](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L88)
#### Signature
@@ -146,7 +146,7 @@ class YelpSearchToolOutputSchema(BaseAgentIO): ...
## YelpSearchToolSchema
-[Show source in yelp_restaurant_finder_tool.py:42](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L42)
+[Show source in yelp_restaurant_finder_tool.py:46](../../../../../atomic_agents/lib/tools/yelp_restaurant_finder_tool.py#L46)
#### Signature
diff --git a/docs/api/atomic_agents/lib/tools/yt_transcript_scraper.md b/docs/api/atomic_agents/lib/tools/yt_transcript_scraper.md
index 3e08fa1..6575ca4 100644
--- a/docs/api/atomic_agents/lib/tools/yt_transcript_scraper.md
+++ b/docs/api/atomic_agents/lib/tools/yt_transcript_scraper.md
@@ -15,7 +15,7 @@
## YouTubeTranscriptTool
-[Show source in yt_transcript_scraper.py:49](../../../../../atomic_agents/lib/tools/yt_transcript_scraper.py#L49)
+[Show source in yt_transcript_scraper.py:59](../../../../../atomic_agents/lib/tools/yt_transcript_scraper.py#L59)
Tool for fetching the transcript of a YouTube video using the YouTube Transcript API.
@@ -38,7 +38,7 @@ class YouTubeTranscriptTool(BaseTool):
### YouTubeTranscriptTool.extract_video_id
-[Show source in yt_transcript_scraper.py:104](../../../../../atomic_agents/lib/tools/yt_transcript_scraper.py#L104)
+[Show source in yt_transcript_scraper.py:115](../../../../../atomic_agents/lib/tools/yt_transcript_scraper.py#L115)
Extracts the video ID from a YouTube URL.
@@ -59,7 +59,7 @@ def extract_video_id(url: str) -> str: ...
### YouTubeTranscriptTool().fetch_video_metadata
-[Show source in yt_transcript_scraper.py:117](../../../../../atomic_agents/lib/tools/yt_transcript_scraper.py#L117)
+[Show source in yt_transcript_scraper.py:128](../../../../../atomic_agents/lib/tools/yt_transcript_scraper.py#L128)
Fetches metadata for a YouTube video.
@@ -79,7 +79,7 @@ def fetch_video_metadata(self, video_id: str) -> dict: ...
### YouTubeTranscriptTool().run
-[Show source in yt_transcript_scraper.py:70](../../../../../atomic_agents/lib/tools/yt_transcript_scraper.py#L70)
+[Show source in yt_transcript_scraper.py:81](../../../../../atomic_agents/lib/tools/yt_transcript_scraper.py#L81)
Runs the YouTubeTranscriptTool with the given parameters.
@@ -112,7 +112,7 @@ def run(
## YouTubeTranscriptToolConfig
-[Show source in yt_transcript_scraper.py:46](../../../../../atomic_agents/lib/tools/yt_transcript_scraper.py#L46)
+[Show source in yt_transcript_scraper.py:52](../../../../../atomic_agents/lib/tools/yt_transcript_scraper.py#L52)
#### Signature
@@ -128,7 +128,7 @@ class YouTubeTranscriptToolConfig(BaseToolConfig): ...
## YouTubeTranscriptToolOutputSchema
-[Show source in yt_transcript_scraper.py:28](../../../../../atomic_agents/lib/tools/yt_transcript_scraper.py#L28)
+[Show source in yt_transcript_scraper.py:35](../../../../../atomic_agents/lib/tools/yt_transcript_scraper.py#L35)
#### Signature
@@ -144,7 +144,7 @@ class YouTubeTranscriptToolOutputSchema(BaseAgentIO): ...
## YouTubeTranscriptToolSchema
-[Show source in yt_transcript_scraper.py:13](../../../../../atomic_agents/lib/tools/yt_transcript_scraper.py#L13)
+[Show source in yt_transcript_scraper.py:17](../../../../../atomic_agents/lib/tools/yt_transcript_scraper.py#L17)
#### Signature
diff --git a/docs/api/atomic_agents/lib/utils/format_tool_message.md b/docs/api/atomic_agents/lib/utils/format_tool_message.md
index 68da6ed..a34734f 100644
--- a/docs/api/atomic_agents/lib/utils/format_tool_message.md
+++ b/docs/api/atomic_agents/lib/utils/format_tool_message.md
@@ -9,7 +9,7 @@
## format_tool_message
-[Show source in format_tool_message.py:8](../../../../../atomic_agents/lib/utils/format_tool_message.py#L8)
+[Show source in format_tool_message.py:7](../../../../../atomic_agents/lib/utils/format_tool_message.py#L7)
Formats a message for a tool call.
@@ -26,5 +26,7 @@ Formats a message for a tool call.
#### Signature
```python
-def format_tool_message(tool_call: Type[BaseModel], tool_id: str = None) -> Dict: ...
+def format_tool_message(
+ tool_call: Type[BaseModel], tool_id: Optional[str] = None
+) -> Dict: ...
```
\ No newline at end of file
diff --git a/docs/api/atomic_agents/lib/utils/scraping/pdf_to_markdown.md b/docs/api/atomic_agents/lib/utils/scraping/pdf_to_markdown.md
index 40902dd..d9eb205 100644
--- a/docs/api/atomic_agents/lib/utils/scraping/pdf_to_markdown.md
+++ b/docs/api/atomic_agents/lib/utils/scraping/pdf_to_markdown.md
@@ -10,7 +10,7 @@
## PdfToMarkdownConverter
-[Show source in pdf_to_markdown.py:9](../../../../../../atomic_agents/lib/utils/scraping/pdf_to_markdown.py#L9)
+[Show source in pdf_to_markdown.py:11](../../../../../../atomic_agents/lib/utils/scraping/pdf_to_markdown.py#L11)
#### Signature
@@ -20,7 +20,7 @@ class PdfToMarkdownConverter: ...
### PdfToMarkdownConverter.convert
-[Show source in pdf_to_markdown.py:32](../../../../../../atomic_agents/lib/utils/scraping/pdf_to_markdown.py#L32)
+[Show source in pdf_to_markdown.py:34](../../../../../../atomic_agents/lib/utils/scraping/pdf_to_markdown.py#L34)
#### Signature
diff --git a/docs/api/atomic_agents/lib/utils/scraping/url_to_markdown.md b/docs/api/atomic_agents/lib/utils/scraping/url_to_markdown.md
index e304556..e1e7f00 100644
--- a/docs/api/atomic_agents/lib/utils/scraping/url_to_markdown.md
+++ b/docs/api/atomic_agents/lib/utils/scraping/url_to_markdown.md
@@ -10,7 +10,7 @@
## UrlToMarkdownConverter
-[Show source in url_to_markdown.py:9](../../../../../../atomic_agents/lib/utils/scraping/url_to_markdown.py#L9)
+[Show source in url_to_markdown.py:10](../../../../../../atomic_agents/lib/utils/scraping/url_to_markdown.py#L10)
#### Signature
@@ -20,7 +20,7 @@ class UrlToMarkdownConverter: ...
### UrlToMarkdownConverter.convert
-[Show source in url_to_markdown.py:59](../../../../../../atomic_agents/lib/utils/scraping/url_to_markdown.py#L59)
+[Show source in url_to_markdown.py:61](../../../../../../atomic_agents/lib/utils/scraping/url_to_markdown.py#L61)
#### Signature