Skip to main content

A framework for managing and orchestrating AI agents

Project description

🌿 Agentarium

License: Apache 2.0 Python 3.10+ PyPI version

A powerful Python framework for managing and orchestrating AI agents with ease. Agentarium provides a flexible and intuitive way to create, manage, and coordinate interactions between multiple AI agents in various environments.

InstallationQuick StartFeaturesExamplesDocumentationContributing

🚀 Installation

pip install agentarium

🎯 Quick Start

from agentarium import Agent

# Create agents
agent1 = Agent(name="agent1")
agent2 = Agent(name="agent2")

# Direct communication between agents
alice.talk_to(bob, "Hello Bob! I heard you're working on some interesting ML projects.")

# Agent autonomously decides its next action based on context
bob.act()

✨ Features

  • 🤖 Advanced Agent Management: Create and orchestrate multiple AI agents with different roles and capabilities
  • 🔄 Autonomous Decision Making: Agents can make decisions and take actions based on their context
  • 💾 Checkpoint System: Save and restore agent states and interactions for reproducibility
  • 🎭 Customizable Actions: Define custom actions beyond the default talk/think capabilities
  • 🧠 Memory & Context: Agents maintain memory of past interactions for contextual responses
  • ⚡ AI Integration: Seamless integration with various AI providers through aisuite
  • ⚡ Performance Optimized: Built for efficiency and scalability
  • 🛠️ Extensible Architecture: Easy to extend and customize for your specific needs

📚 Examples

Basic Chat Example

Create a simple chat interaction between agents:

from agentarium import Agent

# Create agents with specific characteristics
alice = Agent.create_agent(name="Alice", occupation="Software Engineer")
bob = Agent.create_agent(name="Bob", occupation="Data Scientist")

# Direct communication
alice.talk_to(bob, "Hello Bob! I heard you're working on some interesting projects.")

# Let Bob autonomously decide how to respond
bob.act()

Adding Custom Actions

Add new capabilities to your agents:

from agentarium import Agent, Action

# Define a simple greeting action
def greet(name: str, **kwargs) -> str:
    return f"Hello, {name}!"

# Create an agent and add the greeting action
agent = Agent.create_agent(name="Alice")
agent.add_action(
    Action(
        name="GREET",
        description="Greet someone by name",
        parameters=["name"],
        function=greet
    )
)

# Use the custom action
agent.execute_action("GREET", "Bob")

Using Checkpoints

Save and restore agent states:

from agentarium import Agent
from agentarium.CheckpointManager import CheckpointManager

# Initialize checkpoint manager
checkpoint = CheckpointManager("demo")

# Create and interact with agents
alice = Agent.create_agent(name="Alice")
bob = Agent.create_agent(name="Bob")

alice.talk_to(bob, "What a beautiful day!")
checkpoint.update(step="interaction_1")

# Save the current state
checkpoint.save()

More examples can be found in the examples/ directory.

📖 Documentation

Agent Creation

Create agents with custom characteristics:

agent = Agent.create_agent(
    name="Alice",
    age=28,
    occupation="Software Engineer",
    location="San Francisco",
    bio="A passionate developer who loves AI"
)

LLM Configuration

Configure your LLM provider and credentials using a YAML file:

llm:
  provider: "openai"  # The LLM provider to use (any provider supported by aisuite)
  model: "gpt-4"      # The specific model to use from the provider

aisuite:              # (optional) Credentials for aisuite
  openai:            # Provider-specific configuration
    api_key: "sk-..."  # Your API key

Key Components

  • Agent: Core class for creating AI agents with personalities and autonomous behavior
  • CheckpointManager: Handles saving and loading of agent states and interactions
  • Action: Base class for defining custom agent actions
  • AgentInteractionManager: Manages and tracks all agent interactions

🤝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Commit your changes (git commit -m 'feat: add amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

📄 License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

🙏 Acknowledgments

Thanks to all contributors who have helped shape Agentarium 🫶

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

agentarium-0.3.1.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentarium-0.3.1-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file agentarium-0.3.1.tar.gz.

File metadata

  • Download URL: agentarium-0.3.1.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for agentarium-0.3.1.tar.gz
Algorithm Hash digest
SHA256 704899417a6893157efca0c643ba5c68f86b5af9aaa2ff0f0863a6c3a6d1beb4
MD5 9630ff7304a91cb354b9edf7117d5e2b
BLAKE2b-256 1b5c30348f711d2aafc55b1a05518f09e7db4d93de3b48c43ed81209208493d5

See more details on using hashes here.

File details

Details for the file agentarium-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: agentarium-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 24.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for agentarium-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a3ad907907c50e31652d74c1650590a27017843db57fa658b3b51036be4a556b
MD5 e486f4e73f91936a88c9b293e8d8f7dc
BLAKE2b-256 4b7c0bccfe3423c1729821d1b4fea40abcc59942e9ae2c140e53438ed42608d2

See more details on using hashes here.

Supported by

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