Skip to main content

CollabAgents is a Python framework for building AI agents with specialized roles and tools to fulfill complex user requests.

Project description

CollabAgents

CollabAgents Logo

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collabagents-0.0.2.3.tar.gz (27.3 kB view hashes)

Uploaded Source

Built Distribution

CollabAgents-0.0.2.3-py3-none-any.whl (31.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page