Skip to main content

AI Agent Framework for building intelligent agents with multiple LLM providers

Project description

Demiurg

A flexible AI agent framework for building intelligent agents with support for multiple LLM providers.

Features

  • 🚀 Simple, minimal API for quick agent creation
  • 🔌 Support for multiple LLM providers (OpenAI, Anthropic, Google, etc.)
  • 📬 Built-in messaging system with conversation history
  • 📁 File handling capabilities (images, audio, text)
  • 🔧 Extensible tool system with Composio integration
  • 🏗️ Production-ready with built-in queue management
  • 🐳 Designed for both cloud and local container deployment

Installation

pip install demiurg

Quick Start

from demiurg import Agent

# Create an agent with default configuration
agent = Agent()

# Or customize your agent
agent = Agent(
    name="My Custom Agent",
    model="gpt-4",
    temperature=0.7,
    provider="openai"
)

Basic Usage

Sending Messages

from demiurg import send_text, send_file

# Send a text message
await send_text(conversation_id, "Hello from my agent!")

# Send a file
await send_file(conversation_id, "/path/to/file.png", caption="Check this out!")

Getting Conversation History

from demiurg import get_conversation_history

# Get formatted conversation history
messages = await get_conversation_history(
    conversation_id,
    limit=50,
    provider="openai"  # Format for specific LLM provider
)

Custom Agent Implementation

from demiurg import Agent

class MyAgent(Agent):
    def __init__(self):
        super().__init__(
            name="Helpful Assistant",
            model="gpt-4",
            system_prompt="You are a helpful AI assistant."
        )
    
    async def process_message(self, message, provider="openai"):
        # Add custom logic here
        response = await super().process_message(message, provider)
        return response

agent = MyAgent()

Environment Variables

The framework uses environment variables for configuration:

  • DEMIURG_BACKEND_URL: Backend API URL (default: http://backend:3000)
  • DEMIURG_AGENT_TOKEN: Authentication token
  • DEMIURG_AGENT_ID: Unique agent identifier
  • OPENAI_API_KEY: OpenAI API key (for OpenAI provider)
  • COMPOSIO_API_KEY: Composio API key (for tool integration)

Provider Support

Currently supported:

  • ✅ OpenAI (GPT-3.5, GPT-4, etc.)

Coming soon:

  • 🚧 Anthropic (Claude)
  • 🚧 Google (Gemini)
  • 🚧 Cohere
  • 🚧 Local models

Development

For development access and contribution guidelines, please contact support@demiurg.ai.

License

Copyright © 2024 Demiurg AI. All rights reserved.

This is proprietary software. See LICENSE file for details.

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

demiurg-0.1.8.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

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

demiurg-0.1.8-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file demiurg-0.1.8.tar.gz.

File metadata

  • Download URL: demiurg-0.1.8.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for demiurg-0.1.8.tar.gz
Algorithm Hash digest
SHA256 b51f86e1a21ba4728e5ee231094df8d9aa15e8875d35ea5f9ca5909cf68e1e6e
MD5 191451147ca3e9f7ae7f07fcf0379445
BLAKE2b-256 d66ee8d2de32980ff36549447c9f658359c9dbcdc2dd2bb1541bf2808ac90274

See more details on using hashes here.

File details

Details for the file demiurg-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: demiurg-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 27.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for demiurg-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 30ce3d7a6329dde9441ba99f7b8a1b6d6b289b64806e2179d74ac026a8932436
MD5 254e67185db5daf6b1fc89d379ebec00
BLAKE2b-256 c7c01c21707c8d97d8e14164e33f5aa8e40cbecf731dcfbf8c30509d0115e814

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