Introduction to the Microagents Framework
The Microagents Framework introduces a groundbreaking way of creating self-improving digital helpers, known as microagents. These compact, task-focused agents are intelligently crafted to address user-specific tasks and are able to learn and adapt over time. By dynamically generating these agents on the fly, the Microagents Framework ensures optimal task execution and continuous learning across multiple interactions.
Project Overview
Microagents are designed with a unique approach that emphasizes learning and adaptation. When a task is assigned to the assistant running this framework, the system creates a microagent specifically for that task. These agents are evaluated for their effectiveness. Upon successful evaluation, they are saved and ready for reuse in future tasks, paving the way for a more intelligent and self-sufficient system. This method facilitates the framework's ability to independently develop effective solutions for similar tasks over time.
Technologies Used
- Python: The core programming language utilized for creating and managing microagents.
- OpenAI's GPT-4 Turbo: A powerful tool for understanding and generating human-like text, providing the framework with necessary linguistic capabilities.
- Text-Embedding-Ada-002: Used for text representation in a form suitable for machine processing.
Getting Started
To set up the Microagents Framework on a local machine, a few basic requirements must be met:
Prerequisites
- You must have an OpenAI account with access to
gpt-4-turbo
andtext-embedding-ada-002
.
Installation
- Clone the repository by executing the following command:
git clone https://github.com/aymenfurter/microagents.git
- Install the necessary Python packages:
pip install -r requirements.txt
- Configure environment variables for OpenAI or Azure OpenAI, using your API credentials to connect the framework with these services.
How to Use
Caution: Since Microagents can directly execute Python code without a sandbox, it is advised to run them in isolated environments like GitHub Codespaces or Docker to prevent potential threats. Be mindful of the service costs from OpenAI.
For a demonstration, use:
python main.py
For an interactive session, start with:
python app.py
To clear all existing agents, remove the "agents.db" file.
Demonstration
The framework features synthesized prompts for agents, such as:
- Fetch Weather Forecast Agent: Utilizes public API data to gather weather forecasts.
- IPBasedLocationFetcher Agent: Determines location data based on IP addresses.
Recent Updates (Release v0.1.0)
Released on January 21, 2024, this update brought several notable enhancements:
- Community Engagement: With six pull requests, the project shows growing interest.
- User Interfaces: Offers both a Command Line Interface (CLI) and a web interface utilizing Gradio.
- Support for Parallel Operations: Multiple agents can now be created simultaneously, retaining only the most efficient one.
- Pre-trained Agents: 28 agents ready for testing, covering diverse areas like weather and mapping.
- Enhanced Validation: A 'Judge' phase ensures only functional agents are stored, boosting reliability.
- Persistent Storage: Uses SQLite to maintain agent data across sessions.
- Improved Memory: Agents retain knowledge of previously created agents to streamline performance.
Contributing
Open to community contributions, the project welcomes everyone to participate and share ideas. Contributions help grow and enhance the framework, creating a vibrant, collaborative environment.
License
This project is open-source and available under the MIT License, making it accessible for both personal and commercial use.
In summary, the Microagents Framework stands at the frontier of agent-based software, offering dynamic and self-improving capabilities that adapt to user needs. It's an innovative tool ready for exploration and collaboration in diverse applications.