Skip to content

Building AI agents, atomically

create pip package

KennyVaneetveldedbcaa67dc686
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..57f3532
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,3 @@
+include README.md
+include LICENSE
+recursive-include atomic_agents *.py
diff --git a/README.md b/README.md
index cfa9b1c..b7818da 100644
--- a/README.md
+++ b/README.md
@@ -1,103 +1,30 @@
-# Atomic Agents Redux
+# Atomic Agents
## Description
-Atomic Agents Redux 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-3.5-turbo to provide intelligent responses and perform complex operations.
+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-3.5-turbo to provide intelligent responses and perform complex operations.
-## Installation
-
-To install the necessary dependencies, run the following command:
-
-```bash
-pip install -r requirements.txt
-```
-
-## Usage
-
-### Base Chat Agent
-
-The `BaseChatAgent` class is the core component of the framework. It handles user input, generates system prompts, and retrieves responses from the model.
-
-Example usage:
-
-```python
-from atomic_agents.agents.base_chat_agent import BaseChatAgent
-from atomic_agents.lib.components.chat_memory import ChatMemory
-from atomic_agents.lib.components.system_prompt_generator import SystemPromptGenerator
-import instructor
-import openai
-
-client = instructor.from_openai(openai.OpenAI(api_key="your_openai_api_key"))
-memory = ChatMemory()
-system_prompt_generator = SystemPromptGenerator()
-
-agent = BaseChatAgent(client=client, system_prompt_generator=system_prompt_generator, memory=memory)
-response = agent.run("Hello, how can you assist me today?")
-print(response)
-```
-
-### Web Scraping Tool
-
-The `WebScrapingTool` class allows you to scrape web pages and convert their content to markdown format.
+## Philosophy
-Example usage:
+TODO
-```python
-from atomic_agents.lib.tools.web_scraping_tool import WebScrapingTool, WebScrapingToolSchema
-
-tool = WebScrapingTool()
-params = WebScrapingToolSchema(url="https://example.com")
-result = tool.run(params)
-print(result.result.content)
-```
-
-### Calculator Tool
-
-The `CalculatorTool` class evaluates mathematical expressions.
-
-Example usage:
+## Installation
-```python
-from atomic_agents.lib.tools.calculator_tool import CalculatorTool, CalculatorToolSchema
+To install Atomic Agents, you can use pip:
-tool = CalculatorTool()
-params = CalculatorToolSchema(expression="2 + 2")
-result = tool.run(params)
-print(result.result)
+```bash
+pip install atomic-agents
```
-### SearxNG Search Tool
-
-The `SearxNGSearchTool` class performs searches using the SearxNG search engine.
-
-Example usage:
+Alternatively, to install the necessary dependencies from the repository, run the following command:
-```python
-from atomic_agents.lib.tools.searx import SearxNGSearchTool, SearxNGSearchToolSchema
-
-tool = SearxNGSearchTool(max_results=10)
-params = SearxNGSearchToolSchema(queries=["latest news", "technology trends"])
-result = tool.run(params)
-for res in result.results:
- print(f"Title: {res.title}, URL: {res.url}")
+```bash
+pip install -r requirements.txt
```
-### Article Idea Outline Generator with Search
-
-The `article_idea_outline_gen_with_search.py` script demonstrates how to use the framework to generate article ideas and outlines with integrated search capabilities.
-
-Example usage:
-
-```python
-from atomic_agents.examples.article_idea_outline_gen_with_search import MyChatAgent
-import instructor
-import openai
+## Usage
-client = instructor.from_openai(openai.OpenAI(api_key="your_openai_api_key"))
-agent = MyChatAgent(client=client)
-response = agent.run("Generate article ideas about AI in healthcare.")
-print(response)
-```
+TODO
## Contributing
diff --git a/atomic_agents/__init__.py b/atomic_agents/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/atomic_agents/agents/__init__.py b/atomic_agents/agents/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/atomic_agents/lib/__init__.py b/atomic_agents/lib/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/atomic_agents/lib/components/__init__.py b/atomic_agents/lib/components/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/atomic_agents/lib/models/__init__.py b/atomic_agents/lib/models/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/atomic_agents/lib/scraping/__init__.py b/atomic_agents/lib/scraping/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/atomic_agents/lib/tools/__init__.py b/atomic_agents/lib/tools/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/atomic_agents/lib/utils/__init__.py b/atomic_agents/lib/utils/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/atomic_agents/examples/article_idea_outline_gen_with_search.py b/examples/article_idea_outline_gen_with_search.py
similarity index 100%
rename from atomic_agents/examples/article_idea_outline_gen_with_search.py
rename to examples/article_idea_outline_gen_with_search.py
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..28882ea
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,30 @@
+[build-system]
+requires = ["setuptools", "wheel"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "atomic_agents"
+version = "0.1.4"
+description = "A versatile framework designed to facilitate the creation and management of intelligent agents."
+authors = [
+ { name = "Kenny Vaneetvelde", email = "[email protected]" }
+]
+readme = "README.md"
+license = { file = "LICENSE" }
+dependencies = [
+ "aiohttp",
+ "beautifulsoup4",
+ "huggingface-hub",
+ "openai",
+ "scikit-learn",
+ "sympy",
+ "instructor"
+]
+
+[project.urls]
+homepage = "https://github.com/KennyVaneetvelde/atomic_agents"
+repository = "https://github.com/KennyVaneetvelde/atomic_agents"
+
+[tool.setuptools.packages.find]
+where = ["."]
+include = ["atomic_agents"]
diff --git a/requirements.txt b/requirements.txt
index 341a952..3c88b1f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,183 +1,85 @@
aiohttp==3.9.5
aiosignal==1.3.1
-altair==5.3.0
annotated-types==0.6.0
-anyio==4.3.0
+anyio==4.4.0
asgiref==3.8.1
-astunparse==1.6.3
attrs==23.2.0
-Babel==2.15.0
-backoff==2.2.1
-bcrypt==4.1.3
beautifulsoup4==4.12.3
-blinker==1.8.2
-boilerpy3==1.0.7
-build==1.2.1
cachetools==5.3.3
-certifi==2024.2.2
-chardet==5.2.0
+certifi==2024.6.2
charset-normalizer==3.3.2
chroma-hnswlib==0.7.3
-chromadb==0.5.0
click==8.1.7
colorama==0.4.6
-coloredlogs==15.0.1
-colour==0.1.5
-contourpy==1.2.1
-courlan==1.1.0
-cssselect==1.2.0
-cycler==0.12.1
-dateparser==1.2.0
Deprecated==1.2.14
distro==1.9.0
-dnspython==2.6.1
docstring_parser==0.16
-dtreeviz==2.2.2
-email_validator==2.1.1
-fastapi==0.111.0
-fastapi-cli==0.0.4
-feedfinder2==0.0.4
-feedparser==6.0.11
filelock==3.14.0
-flatbuffers==24.3.25
-fonttools==4.52.4
frozenlist==1.4.1
-fsspec==2024.5.0
-gitdb==4.0.11
-GitPython==3.1.41
+fsspec==2024.6.0
google-auth==2.29.0
googleapis-common-protos==1.63.0
-goose3==3.1.19
-graphviz==0.20.3
-greenlet==3.0.3
-groq==0.8.0
-grpcio==1.64.0
+grpcio==1.64.1
h11==0.14.0
-html2text==2024.2.26
-htmldate==1.8.1
httpcore==1.0.5
-httptools==0.6.1
httpx==0.27.0
huggingface-hub==0.23.1
-humanfriendly==10.0
idna==3.7
importlib-metadata==7.0.0
importlib_resources==6.4.0
-iniconfig==2.0.0
instructor==1.2.6
-jieba3k==0.35.1
Jinja2==3.1.4
joblib==1.4.2
-jsonschema==4.22.0
-jsonschema-specifications==2023.12.1
-jusText==3.0.1
-kiwisolver==1.4.5
-kubernetes==29.0.0
-langdetect==1.0.9
-lmql==0.7.3
-lxml==5.1.1
-lxml_html_clean==0.1.1
markdown-it-py==3.0.0
markdownify==0.12.1
MarkupSafe==2.1.5
-matplotlib==3.9.0
mdurl==0.1.2
-mmh3==4.1.0
-monotonic==1.6
mpmath==1.3.0
multidict==6.0.5
-newspaper3k==0.2.8
-nltk==3.8.1
numpy==1.26.4
-oauthlib==3.2.2
-onnxruntime==1.18.0
openai==1.30.1
opentelemetry-api==1.24.0
opentelemetry-exporter-otlp-proto-common==1.24.0
opentelemetry-exporter-otlp-proto-grpc==1.24.0
opentelemetry-instrumentation==0.45b0
opentelemetry-instrumentation-asgi==0.45b0
-opentelemetry-instrumentation-fastapi==0.45b0
opentelemetry-proto==1.24.0
opentelemetry-sdk==1.24.0
opentelemetry-semantic-conventions==0.45b0
opentelemetry-util-http==0.45b0
-orjson==3.10.3
-overrides==7.7.0
packaging==24.0
-pandas==2.2.2
-pillow==10.3.0
-playwright==1.44.0
-playwright-stealth==1.0.6
-pluggy==1.5.0
-posthog==3.5.0
protobuf==4.25.3
-pyahocorasick==2.1.0
-pyarrow==16.1.0
pyasn1==0.6.0
pyasn1_modules==0.4.0
pydantic==2.7.1
pydantic-2-mermaid==0.7.3
pydantic_core==2.18.2
-pydeck==0.9.1
-pyee==11.1.0
Pygments==2.18.0
-pyparsing==3.1.2
PyPDF2==3.0.1
-PyPika==0.48.9
-pyproject_hooks==1.1.0
-pyreadline3==3.4.1
-pytest==8.2.1
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-multipart==0.0.9
-pytz==2024.1
PyYAML==6.0.1
-readability-lxml==0.8.1
-referencing==0.35.1
-regex==2024.5.15
requests==2.31.0
requests-file==2.0.0
-requests-oauthlib==2.0.0
rich==13.7.1
rpds-py==0.18.1
rsa==4.9
scikit-learn==1.5.0
scipy==1.13.1
-sgmllib3k==1.0.0
+setuptools==70.0.0
shellingham==1.5.4
six==1.16.0
-smmap==5.0.1
-snakeviz==2.2.0
sniffio==1.3.1
soupsieve==2.5
-starlette==0.37.2
-streamlit==1.35.0
sympy==1.12
tenacity==8.3.0
-termcolor==2.4.0
threadpoolctl==3.5.0
-tiktoken==0.7.0
-tinysegmenter==0.3
-tld==0.13
-tldextract==5.1.2
-tokenizers==0.19.1
-toml==0.10.2
-toolz==0.12.1
-tornado==6.4
tqdm==4.66.4
-trafilatura==1.9.0
typer==0.12.3
-typing_extensions==4.11.0
-tzdata==2024.1
-tzlocal==5.2
-ujson==5.10.0
+typing_extensions==4.12.1
urllib3==2.2.1
-uvicorn==0.29.0
-watchdog==4.0.1
-watchfiles==0.21.0
websocket-client==1.8.0
-websockets==12.0
wrapt==1.16.0
yarl==1.9.4
-zipp==3.18.2
+zipp==3.19.2