How to Install and Use Atomic Agents Framework

Feb 6, 2023 | Educational

The Atomic Agents framework is a modular and extensible architecture designed for ease of use in creating AI applications. Much like LEGO bricks that can be combined in various ways to create different structures, this framework allows developers to craft robust applications by piecing together different components. In this article, we will explore how to install and utilize Atomic Agents, as well as troubleshoot common issues.

Philosophy of Atomic Agents

Atomic Agents embraces the principle of keeping components small and single-purpose. This design philosophy mirrors the concept of Atomic Design, which enhances modular architecture and promotes reusability. The framework is built on top of Instructor and harnesses Pydantic for data validation and serialization. This results in an easy-to-use toolset that can be adapted to various AI applications.

Installation

Using pip

To install Atomic Agents, simply execute the pip command:

pip install atomic-agents

For Local Development

If you are looking to make modifications or contribute to the project, follow these steps:

  • Create a virtual environment:
  • python -m venv venv
  • Activate the virtual environment:
  • source venv/bin/activate # On Windows, use venv\Scripts\activate.bat
  • Install the required dependencies:
  • pip install -r requirements.txt
  • Install the package in editable mode:
  • pip install -e .

Quickstart Guide

A quickstart guide is available in the quickstart notebook. While you are there, explore other examples located in the examples directory to get a feel for the framework’s capabilities.

Usage Examples

The documentation aims to provide clarity on how to use Atomic Agents effectively. However, perfection is never the goal, so if you notice anything amiss, feel free to contribute by opening an issue or a pull request.

Instructor Model Compatibility

Atomic Agents utilize the Instructor package, making it versatile across various APIs such as Cohere, Anthropic, and Gemini. If the default settings don’t play well with your local server’s capabilities, simply switch to JSON mode for compatibility.

Formatting and Linting

To maintain code quality before committing changes, utilize the following commands:

black atomic_agents
flake8 atomic_agents

Testing Your Installation

To ensure everything is working as intended, execute:

pytest --cov atomic_agents

To view a coverage report, run:

coverage html

Contributing to Atomic Agents

Your contributions are welcome! Follow these simple steps to start:

  • Fork the repository.
  • Create a new branch: git checkout -b feature-branch
  • Make your changes.
  • Commit your changes: git commit -m "Add some feature"
  • Push to the branch: git push origin feature-branch
  • Open a pull request.

Troubleshooting

If you experience issues regarding the installation or usage of Atomic Agents, consider the following troubleshooting steps:

  • Ensure that you have activated your virtual environment before installation.
  • Double-check that all dependencies are installed and up to date.
  • If you face compatibility issues with APIs, check your configuration settings and try switching to JSON mode.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox