Skip to content

Building AI agents, atomically

docs, cleanup

KennyVaneetvelde5a6c91e9856a
diff --git a/.assets/docs.png b/.assets/docs.png
new file mode 100644
index 0000000..4d95eb5
Binary files /dev/null and b/.assets/docs.png differ
diff --git a/.assets/logo.png b/.assets/logo.png
new file mode 100644
index 0000000..b516227
Binary files /dev/null and b/.assets/logo.png differ
diff --git a/README.md b/README.md
index d5f9a66..02bc3fc 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,12 @@
# Atomic Agents
+![logo](./.assets/logo.png)
-## Description
-
-Atomic Agents is a versatile framework designed to facilitate the creation and management of intelligent agents. These agents can perform a variety of tasks, including web scraping, calculations, and generating article ideas with integrated search capabilities. The project leverages powerful models like GPT-4o to provide intelligent responses and perform complex operations.
+[![PyPI version](https://badge.fury.io/py/atomic-agents.svg)](https://badge.fury.io/py/atomic-agents)
## Philosophy
-
-TODO
+The Atomic Agents framework is designed to be modular, extensible, and easy to use. It provides a set of tools and agents that can be combined to create powerful applications. The framework is built on top of [Instructor](https://github.com/jxnl/instructor) and leverages the power of [Pydantic](https://docs.pydantic.dev/latest/) for data validation and serialization.
## Installation
-
To install Atomic Agents, you can use pip:
```bash
@@ -22,12 +19,18 @@ Alternatively, to install the necessary dependencies from the repository, run th
pip install -r requirements.txt
```
-## Usage
+## Usage examples & Docs
+While I did my best to provide good documentation, I am aware that it is not perfect. If you feel any parts can be improved feel free to open an issue or a pull request.
-TODO
+### Examples
+Further examples can be found in the [examples](./examples/) directory.
-## Contributing
+### Docs
+The documentation can be found in the [docs](./docs/) directory. Here you will find both API documentation and guides.
+![open source docs bad](./.assets/docs.png)
+
+## Contributing
We welcome contributions! Please follow these steps to contribute:
1. Fork the repository
@@ -38,5 +41,4 @@ We welcome contributions! Please follow these steps to contribute:
6. Open a pull request
## License
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
\ No newline at end of file
diff --git a/atomic_agents/agents/tool_interface_agent.py b/atomic_agents/agents/tool_interface_agent.py
index 4e97c87..6f42723 100644
--- a/atomic_agents/agents/tool_interface_agent.py
+++ b/atomic_agents/agents/tool_interface_agent.py
@@ -15,7 +15,7 @@ class ToolInterfaceAgent(BaseChatAgent):
return_raw_output (bool): Whether to return the raw output from the tool.
"""
- def __init__(self, tool_instance, return_raw_output=False, *args, **kwargs):
+ def __init__(self, tool_instance, return_raw_output=False, **kwargs):
"""
Initializes the ToolInterfaceAgent.
@@ -25,7 +25,7 @@ class ToolInterfaceAgent(BaseChatAgent):
*args: Variable length argument list.
**kwargs: Arbitrary keyword arguments.
"""
- super().__init__(*args, **kwargs)
+ super().__init__(**kwargs)
self.tool_instance = tool_instance
diff --git a/atomic_agents/lib/tools/calculator_tool.py b/atomic_agents/lib/tools/calculator_tool.py
index c744ac6..b241a05 100644
--- a/atomic_agents/lib/tools/calculator_tool.py
+++ b/atomic_agents/lib/tools/calculator_tool.py
@@ -40,7 +40,7 @@ class CalculatorTool(BaseTool):
input_schema = CalculatorToolSchema
output_schema = CalculatorToolOutputSchema
- def __init__(self, *args, **kwargs):
+ def __init__(self, **kwargs):
"""
Initializes the CalculatorTool.
@@ -48,7 +48,7 @@ class CalculatorTool(BaseTool):
*args: Variable length argument list.
**kwargs: Arbitrary keyword arguments.
"""
- super().__init__(*args, **kwargs)
+ super().__init__(**kwargs)
def run(self, params: CalculatorToolSchema) -> CalculatorToolOutputSchema:
"""
diff --git a/atomic_agents/lib/tools/searx.py b/atomic_agents/lib/tools/searx.py
index 1fd0ef1..b4ec4ca 100644
--- a/atomic_agents/lib/tools/searx.py
+++ b/atomic_agents/lib/tools/searx.py
@@ -50,7 +50,7 @@ class SearxNGSearchTool(BaseTool):
input_schema = SearxNGSearchToolSchema
output_schema = SearxNGSearchToolOutputSchema
- def __init__(self, max_results: int = 10, *args, **kwargs):
+ def __init__(self, max_results: int = 10, **kwargs):
"""
Initializes the SearxNGSearchTool.
@@ -59,7 +59,7 @@ class SearxNGSearchTool(BaseTool):
*args: Variable length argument list.
**kwargs: Arbitrary keyword arguments.
"""
- super().__init__(*args, **kwargs)
+ super().__init__(**kwargs)
self.max_results = max_results
def run(self, params: SearxNGSearchToolSchema, max_results: Optional[int] = None) -> SearxNGSearchToolOutputSchema:
diff --git a/atomic_agents/lib/tools/web_scraping_tool.py b/atomic_agents/lib/tools/web_scraping_tool.py
index a4c310e..495d958 100644
--- a/atomic_agents/lib/tools/web_scraping_tool.py
+++ b/atomic_agents/lib/tools/web_scraping_tool.py
@@ -48,7 +48,7 @@ class ContentScrapingTool(BaseTool):
input_schema = ContentScrapingToolSchema
output_schema = ContentScrapingToolOutputSchema
- def __init__(self, *args, **kwargs):
+ def __init__(self, **kwargs):
"""
Initializes the ContentScrapingTool.
@@ -56,7 +56,7 @@ class ContentScrapingTool(BaseTool):
*args: Variable length argument list.
**kwargs: Arbitrary keyword arguments.
"""
- super().__init__(*args, **kwargs)
+ super().__init__(**kwargs)
def run(self, params: ContentScrapingToolSchema) -> ContentScrapingToolOutputSchema:
"""
diff --git a/docs/api/atomic_agents/agents/tool_interface_agent.md b/docs/api/atomic_agents/agents/tool_interface_agent.md
index bbe1cfa..6eb4baa 100644
--- a/docs/api/atomic_agents/agents/tool_interface_agent.md
+++ b/docs/api/atomic_agents/agents/tool_interface_agent.md
@@ -26,7 +26,7 @@ It generates system prompts, handles tool input and output, and can optionally r
```python
class ToolInterfaceAgent(BaseChatAgent):
- def __init__(self, tool_instance, return_raw_output=False, *args, **kwargs): ...
+ def __init__(self, tool_instance, return_raw_output=False, **kwargs): ...
```
#### See also
diff --git a/docs/api/atomic_agents/lib/tools/calculator_tool.md b/docs/api/atomic_agents/lib/tools/calculator_tool.md
index 4129074..23623e6 100644
--- a/docs/api/atomic_agents/lib/tools/calculator_tool.md
+++ b/docs/api/atomic_agents/lib/tools/calculator_tool.md
@@ -32,7 +32,7 @@ Tool for performing calculations based on the provided mathematical expression.
```python
class CalculatorTool(BaseTool):
- def __init__(self, *args, **kwargs): ...
+ def __init__(self, **kwargs): ...
```
#### See also
diff --git a/docs/api/atomic_agents/lib/tools/searx.md b/docs/api/atomic_agents/lib/tools/searx.md
index d9d8945..c921c43 100644
--- a/docs/api/atomic_agents/lib/tools/searx.md
+++ b/docs/api/atomic_agents/lib/tools/searx.md
@@ -48,7 +48,7 @@ Tool for performing searches on SearxNG based on the provided queries and catego
```python
class SearxNGSearchTool(BaseTool):
- def __init__(self, max_results: int = 10, *args, **kwargs): ...
+ def __init__(self, max_results: int = 10, **kwargs): ...
```
#### See also
diff --git a/docs/api/atomic_agents/lib/tools/web_scraping_tool.md b/docs/api/atomic_agents/lib/tools/web_scraping_tool.md
index b566e29..cf4f385 100644
--- a/docs/api/atomic_agents/lib/tools/web_scraping_tool.md
+++ b/docs/api/atomic_agents/lib/tools/web_scraping_tool.md
@@ -51,7 +51,7 @@ Tool for scraping web pages or PDFs and converting content to markdown.
```python
class ContentScrapingTool(BaseTool):
- def __init__(self, *args, **kwargs): ...
+ def __init__(self, **kwargs): ...
```
#### See also
diff --git a/docs/api/atomic_agents/lib/utils/logger.md b/docs/api/atomic_agents/lib/utils/logger.md
index d9f7a09..4160d43 100644
--- a/docs/api/atomic_agents/lib/utils/logger.md
+++ b/docs/api/atomic_agents/lib/utils/logger.md
@@ -19,5 +19,5 @@
#### Signature
```python
-def verbose(self, message, *args, **kwargs): ...
+def verbose(self, message, **kwargs): ...
```
\ No newline at end of file
diff --git a/examples/article_idea_outline_gen_with_search.py b/examples/article_idea_outline_gen_with_search.py
index d206aa9..2bcffa3 100644
--- a/examples/article_idea_outline_gen_with_search.py
+++ b/examples/article_idea_outline_gen_with_search.py
@@ -11,8 +11,8 @@ from atomic_agents.lib.utils.logger import logger
console = Console()
class MyChatAgent(BaseChatAgent):
- def __init__(self, *args, **kwargs):
- super().__init__(*args, **kwargs)
+ def __init__(self, **kwargs):
+ super().__init__(**kwargs)
self.search_tool = SearxNGSearchTool(max_results=25)
def _pre_run(self):