A laboratory for experimenting with AI agents and automation tools. Built with Python and modern AI frameworks.
- 🤖 AI Agents: Modern LLM-powered agents to automate nearly any job
- 🤝 Agent Teams: Teams of agents that collaborate to solve complex problems
- 🧩 Modular Architecture: Plug-and-play components for custom AI solutions
- ✨ Simplicity: Minimal dependencies and easy to understand code
- 📊 Extensive Logging: Built-in monitoring and debugging tools
- 📁 Simple File Management: Agent outputs stored in data/ directories
This repository contains two main projects:
The agents/
directory contains a collection of AI agents built with the smolagent framework. These agents can perform tasks like research, writing, and coordination.
# Example: Run the researcher agent
cd agents
poetry run python -m researcher.example --query "What are the latest advancements in AI?"
View the full Agents documentation →
Key components:
- ResearcherAgent: Web search and information gathering
- WriterAgent & CriticAgent: Creative writing with feedback
- EditorAgent & FactCheckerAgent: Content editing with fact checking
- ManagerAgent: Coordinates multiple specialized agents
- QAQCAgent: Compares outputs and selects the best one
- AgentLoop: Orchestrates iterative workflows between multiple agents
The swarms/
directory contains implementations based on OpenAI's swarm framework, allowing for the creation of collaborative agent systems.
# Example: Run the writer-critic swarm
cd swarms
python -m writer-critic.writer-critic
View the full Swarms documentation →
Key features:
- Writer-Critic System: Collaborative writing with feedback loops
- Multi-agent collaboration: Agents working together on complex tasks
- Emergent behavior: Solutions that arise from agent interactions
- Scalable architecture: Add more agents to tackle larger problems
Each project maintains it's own virtual environment and dependencies.
cd agents
poetry install
# Set GEMINI_API_KEY in .env
cd swarms
poetry install
# Set OPENAI_API_KEY in .env
For detailed instructions, please refer to the respective README files in each directory.
You can easily use botlab agents in your own projects by adding it as a Git submodule:
# Add botlab as a submodule to your project
cd your-project
git submodule add https://github.com/yourusername/botlab.git
git commit -m "Add botlab as submodule"
# Install dependencies
cd botlab/agents
poetry install
Then in your Python code:
import os
import sys
from dotenv import load_dotenv
# Add botlab to Python path
sys.path.append("./botlab")
# Import the agent you need
from botlab.agents.researcher.agents import ResearcherAgent
# Setup and use the agent
load_dotenv()
researcher = ResearcherAgent()
result = researcher.run_query("Your query here")
To update the submodule when botlab changes:
git submodule update --remote botlab
git commit -m "Update botlab submodule"
- Fork and clone the repository
git clone https://github.com/yourusername/botlab.git
- Create a new branch
- Submit a pull request
GNU General Public License v3.0 - See LICENSE
❤️ Thank you for using botlab! We hope this project helps you harness the awesome power of AI.