CollabAgents is a Python framework for building AI agents with specialized roles and tools to fulfill complex user requests.
Project description
CollabAgents
CollabAgents is a versatile Python framework designed for creating intelligent AI agents that can perform a wide range of tasks. It supports the development of agents equipped with various tools, allowing them to collaborate within and across companies to fulfill complex user requests. The framework’s unique strength lies in its ability to simulate real-world business processes, where multiple AI-driven entities interact to achieve specific goals.
Features
- Create AI Agents with Tools: Easily build AI agents with a diverse set of tools, from Python execution to file operations and terminal commands.
- Role-Based Agents: Define agents with specific roles and responsibilities to handle different tasks and collaborate effectively.
- Interacting Entities: Simulate scenarios where multiple agents or companies work together to complete user requests.
- Flexible Integration: Supports both Anthropic and OpenAI models, providing flexibility in choosing the best AI model for your needs.
Installation
You can install the CollabAgents framework using pip:
pip install CollabAgents
Example Use Case
Here’s an example of how to create a Python Developer agent using CollabAgents:
import asyncio
from CollabAgents.agent import StructuredAgent
from CollabAgents.models import AnthropicModel
from CollabAgents.tools.PythonTool import RunPythonFile
from CollabAgents.tools.FileOperationsTool import CreateFolder, SaveFile, ListFilesInDirectory
from CollabAgents.helper import print_colored
description = "Responsible for Answering User questions."
instruction = "You are a helpful Assistant."
tools = [CreateFolder, SaveFile, ListFilesInDirectory, RunPythonFile]
api_key = 'YOUR_API_KEY'
model = AnthropicModel(model_name='claude-3-haiku-20240307', api_key=api_key)
agent = StructuredAgent(model, "AI Assistant", description, instruction, tools, max_allowed_attempts=50)
if __name__ == "__main__":
async def main():
print_colored("Starting the application...........", "green")
user_input = input("User Input: ")
messages = []
while user_input != "bye":
output = await agent.run(user_input, messages)
messages = agent.messages
user_input = input("User Input: ")
asyncio.run(main())
License
This project is licensed under the MIT License. - see the LICENSE file for details.
For More Tutorials Visit My Youtube Channel:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for CollabAgents-0.0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ac60ac7155a72b90087bea8180e96d9fa12a1c86d9954d71766e81fe5901406 |
|
MD5 | 38a3d7f8d597c382abb2af07be586a99 |
|
BLAKE2b-256 | 841a983c2df817d032d77f231be8c8d0da9cdf7c19a35726912c4e9fd2f6def0 |