Building AI agents, atomically
create pip package
KennyVaneetveldedbcaa67dc686
diff --git a/MANIFEST.in b/MANIFEST.innew file mode 100644index 0000000..57f3532--- /dev/null+++ b/MANIFEST.in@@ -0,0 +1,3 @@+include README.md+include LICENSE+recursive-include atomic_agents *.pydiff --git a/README.md b/README.mdindex 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## Contributingdiff --git a/atomic_agents/__init__.py b/atomic_agents/__init__.pynew file mode 100644index 0000000..e69de29diff --git a/atomic_agents/agents/__init__.py b/atomic_agents/agents/__init__.pynew file mode 100644index 0000000..e69de29diff --git a/atomic_agents/lib/__init__.py b/atomic_agents/lib/__init__.pynew file mode 100644index 0000000..e69de29diff --git a/atomic_agents/lib/components/__init__.py b/atomic_agents/lib/components/__init__.pynew file mode 100644index 0000000..e69de29diff --git a/atomic_agents/lib/models/__init__.py b/atomic_agents/lib/models/__init__.pynew file mode 100644index 0000000..e69de29diff --git a/atomic_agents/lib/scraping/__init__.py b/atomic_agents/lib/scraping/__init__.pynew file mode 100644index 0000000..e69de29diff --git a/atomic_agents/lib/tools/__init__.py b/atomic_agents/lib/tools/__init__.pynew file mode 100644index 0000000..e69de29diff --git a/atomic_agents/lib/utils/__init__.py b/atomic_agents/lib/utils/__init__.pynew file mode 100644index 0000000..e69de29diff --git a/atomic_agents/examples/article_idea_outline_gen_with_search.py b/examples/article_idea_outline_gen_with_search.pysimilarity index 100%rename from atomic_agents/examples/article_idea_outline_gen_with_search.pyrename to examples/article_idea_outline_gen_with_search.pydiff --git a/pyproject.toml b/pyproject.tomlnew file mode 100644index 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.txtindex 341a952..3c88b1f 100644--- a/requirements.txt+++ b/requirements.txt@@ -1,183 +1,85 @@aiohttp==3.9.5aiosignal==1.3.1-altair==5.3.0annotated-types==0.6.0-anyio==4.3.0+anyio==4.4.0asgiref==3.8.1-astunparse==1.6.3attrs==23.2.0-Babel==2.15.0-backoff==2.2.1-bcrypt==4.1.3beautifulsoup4==4.12.3-blinker==1.8.2-boilerpy3==1.0.7-build==1.2.1cachetools==5.3.3-certifi==2024.2.2-chardet==5.2.0+certifi==2024.6.2charset-normalizer==3.3.2chroma-hnswlib==0.7.3-chromadb==0.5.0click==8.1.7colorama==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.0Deprecated==1.2.14distro==1.9.0-dnspython==2.6.1docstring_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.11filelock==3.14.0-flatbuffers==24.3.25-fonttools==4.52.4frozenlist==1.4.1-fsspec==2024.5.0-gitdb==4.0.11-GitPython==3.1.41+fsspec==2024.6.0google-auth==2.29.0googleapis-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.1h11==0.14.0-html2text==2024.2.26-htmldate==1.8.1httpcore==1.0.5-httptools==0.6.1httpx==0.27.0huggingface-hub==0.23.1-humanfriendly==10.0idna==3.7importlib-metadata==7.0.0importlib_resources==6.4.0-iniconfig==2.0.0instructor==1.2.6-jieba3k==0.35.1Jinja2==3.1.4joblib==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.1markdown-it-py==3.0.0markdownify==0.12.1MarkupSafe==2.1.5-matplotlib==3.9.0mdurl==0.1.2-mmh3==4.1.0-monotonic==1.6mpmath==1.3.0multidict==6.0.5-newspaper3k==0.2.8-nltk==3.8.1numpy==1.26.4-oauthlib==3.2.2-onnxruntime==1.18.0openai==1.30.1opentelemetry-api==1.24.0opentelemetry-exporter-otlp-proto-common==1.24.0opentelemetry-exporter-otlp-proto-grpc==1.24.0opentelemetry-instrumentation==0.45b0opentelemetry-instrumentation-asgi==0.45b0-opentelemetry-instrumentation-fastapi==0.45b0opentelemetry-proto==1.24.0opentelemetry-sdk==1.24.0opentelemetry-semantic-conventions==0.45b0opentelemetry-util-http==0.45b0-orjson==3.10.3-overrides==7.7.0packaging==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.0protobuf==4.25.3-pyahocorasick==2.1.0-pyarrow==16.1.0pyasn1==0.6.0pyasn1_modules==0.4.0pydantic==2.7.1pydantic-2-mermaid==0.7.3pydantic_core==2.18.2-pydeck==0.9.1-pyee==11.1.0Pygments==2.18.0-pyparsing==3.1.2PyPDF2==3.0.1-PyPika==0.48.9-pyproject_hooks==1.1.0-pyreadline3==3.4.1-pytest==8.2.1python-dateutil==2.9.0.post0python-dotenv==1.0.1python-multipart==0.0.9-pytz==2024.1PyYAML==6.0.1-readability-lxml==0.8.1-referencing==0.35.1-regex==2024.5.15requests==2.31.0requests-file==2.0.0-requests-oauthlib==2.0.0rich==13.7.1rpds-py==0.18.1rsa==4.9scikit-learn==1.5.0scipy==1.13.1-sgmllib3k==1.0.0+setuptools==70.0.0shellingham==1.5.4six==1.16.0-smmap==5.0.1-snakeviz==2.2.0sniffio==1.3.1soupsieve==2.5-starlette==0.37.2-streamlit==1.35.0sympy==1.12tenacity==8.3.0-termcolor==2.4.0threadpoolctl==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.4tqdm==4.66.4-trafilatura==1.9.0typer==0.12.3-typing_extensions==4.11.0-tzdata==2024.1-tzlocal==5.2-ujson==5.10.0+typing_extensions==4.12.1urllib3==2.2.1-uvicorn==0.29.0-watchdog==4.0.1-watchfiles==0.21.0websocket-client==1.8.0-websockets==12.0wrapt==1.16.0yarl==1.9.4-zipp==3.18.2+zipp==3.19.2