Skip to main content

Universal Event-Driven Runtime Engine for AI Agents

Project description

๐ŸŒ OmniDaemon

Universal Event-Driven Runtime Engine for AI Agents

License Python Redis Coverage

Run any AI agent. Any framework. One event-driven control plane.

Created by Abiola Adeshina โ€ข From the team behind OmniCore Agent

๐Ÿ“š Docs โ€ข ๐Ÿ’ก Examples โ€ข ๐Ÿ—๏ธ Architecture โ€ข ๐Ÿš€ Quick Start


๐ŸŽฏ What is OmniDaemon?

"Kubernetes for AI Agents" - A production-ready runtime that makes AI agents autonomous, observable, and fault-tolerant.

OmniDaemon runs each agent in its own isolated process (like containers), managed by an Agent Supervisor. This means your agents get production-grade reliability out of the box: process isolation, auto-restart, crash protection, and event-driven communication.

In 5 seconds:

  • ๐Ÿค– Run any AI agent (OmniCoreAgent, Google ADK, LangChain, CrewAI, AutoGen, custom)
  • ๐Ÿ“จ Event-driven (agents react to events, not HTTP requests)
  • ๐Ÿ”’ Process isolation (one agent crash won't kill others)
  • ๐Ÿ”„ Auto-recovery (supervisors restart crashed agents)
  • ๐Ÿš€ Production-ready (retries, DLQ, metrics, scaling built-in)

๐Ÿ’ก Why OmniDaemon exists: Most AI frameworks run everything in a single Python process. One crash kills your entire system. OmniDaemon solves this with process isolation and event-driven architecture. Read the full story โ†’


๐Ÿญ Agent Supervisor: Production-Grade Process Isolation

The Agent Supervisor is OmniDaemon's core innovation. It manages each agent in an isolated process with automatic lifecycle management, error recovery, and health monitoring.

Benefits

Feature What You Get
๐Ÿ”’ Fault Isolation Agent A crashes? Agent B keeps running.
๐Ÿ”„ Auto-Recovery Crashed agents restart automatically.
๐Ÿ’พ Resource Safety Clean memory/CPU boundaries per agent.
๐ŸŽฏ Process Per Agent Like Kubernetes pods for AI agents.
โค๏ธ Health Monitoring Heartbeat checks, timeout handling.
๐Ÿ“Š Observability Metrics, logs, state tracking built-in.

Lifecycle State Machine

stateDiagram-v2
    [*] --> IDLE: Created
    IDLE --> STARTING: start()
    STARTING --> RUNNING: Process ready
    STARTING --> CRASHED: Start failed
    RUNNING --> STOPPING: stop()
    RUNNING --> CRASHED: Process died
    STOPPING --> STOPPED: Graceful shutdown
    CRASHED --> STARTING: Auto-restart
    CRASHED --> STOPPED: Max retries exceeded
    STOPPED --> [*]

๐Ÿ“š Deep dive: Agent Supervisor Architecture โ†’


๐Ÿš€ Quick Start

Get OmniDaemon running in 5 minutes with production-ready process isolation:

1. Install Redis (Event Bus)

# Using Docker (easiest)
docker run -d -p 6379:6379 --name redis redis:latest

# Verify
redis-cli ping  # Should return: PONG

2. Install OmniDaemon

# Using uv (recommended - 10-100x faster)
uv add omnidaemon

# Or using pip
pip install omnidaemon

3. Create Your Agent

# Create agent directory
mkdir my_first_agent
touch my_first_agent/__init__.py

Create agent (my_first_agent/agent.py):

def greeter_callback(message: dict):
    """Your agent runs here - in an isolated process!"""
    name = message.get("content", {}).get("name", "stranger")
    return {"reply": f"Hello, {name}! ๐Ÿ‘‹"}

Create runner (agent_runner.py):

import asyncio
from omnidaemon import OmniDaemonSDK, AgentConfig
from omnidaemon.supervisor import create_supervisor_from_directory

sdk = OmniDaemonSDK()

async def main():
    # Create supervisor (runs agent in separate process)
    supervisor = await create_supervisor_from_directory(
        agent_name="greeter",
        agent_dir="./my_first_agent",
        callback_function="agent.greeter_callback"
    )
    
    await sdk.register_agent(
        agent_config=AgentConfig(topic="greet.user"),
        callback=supervisor.handle_event
    )
    
    await sdk.start()
    print("๐ŸŽง Agent running. Press Ctrl+C to stop.")
    
    try:
        while True:
            await asyncio.sleep(1)
    except KeyboardInterrupt:
        await sdk.shutdown()

if __name__ == "__main__":
    asyncio.run(main())

4. Run It!

python agent_runner.py

๐ŸŽ‰ Your AI agent is now running in an isolated process with auto-restart!

๐Ÿ“š Next steps: Full Tutorial โ†’ | Complete Examples โ†’


๐Ÿ’ก Examples

See production-ready implementations in the examples/ directory:

Featured Examples

  1. Multiple Agents with Supervisors - Run multiple supervised agents
  2. Google ADK Integration - Full ADK agent with MCP tools
  3. Content Moderation - Multi-agent pipeline
  4. FastAPI Integration - HTTP + event-driven hybrid

Each example shows real-world patterns you'll use in production.


๐Ÿ“š Documentation

Core Concepts

Architecture

How-To Guides

API Reference


๐ŸŽฏ When to Use OmniDaemon

โœ… Perfect For

  • Background AI Agents - Autonomous agents reacting to events
  • Event-Driven Workflows - Multi-step pipelines coordinated through events
  • Distributed Multi-Agent Systems - Agents across different servers/runtimes
  • Long-Running AI Tasks - Workloads that shouldn't block client requests
  • Enterprise AI Ops - Production systems with retries, logs, monitoring

โŒ Overkill For

  • Simple HTTP APIs - Use FastAPI/Flask instead
  • Pure Real-Time Chat Only - WebSockets/SSE alone are simpler
  • Single-Shot Scripts - A basic Python script is sufficient

๐Ÿ†š vs Alternatives

Tool Use Case vs OmniDaemon
Celery Task queues โŒ Not AI-first, complex setup, no agent abstraction
AWS Lambda Serverless functions โŒ Cold starts, time limits, vendor lock-in
Temporal Workflow engine โŒ Heavy, complex, not AI-optimized
Airflow DAG orchestration โŒ Batch-oriented, not real-time events
OmniDaemon AI Agent Runtime โœ… AI-first, event-driven, any framework, production-ready

๐Ÿ”Œ Pluggable Architecture

Switch backends by changing environment variables - zero code changes!

# Event Bus
EVENT_BUS_TYPE=redis_stream + REDIS_URL=redis://localhost:6379     # Current โœ…
EVENT_BUS_TYPE=kafka + KAFKA_SERVERS=localhost:9092                 # Coming soon ๐Ÿšง
EVENT_BUS_TYPE=rabbitmq + RABBITMQ_URL=amqp://localhost             # Coming soon ๐Ÿšง

# Storage
STORAGE_BACKEND=redis + REDIS_URL=redis://localhost:6379            # Production โœ…
STORAGE_BACKEND=json + JSON_STORAGE_DIR=./data                      # Development โœ…
STORAGE_BACKEND=postgresql + POSTGRES_URL=postgresql://...          # Coming soon ๐Ÿšง
STORAGE_BACKEND=mongodb + MONGODB_URI=mongodb://...                 # Coming soon ๐Ÿšง

๐ŸŒŸ Resources

  • ๐Ÿ“– Full Documentation - Complete guides and API reference
  • ๐Ÿ’ก Examples - Production-ready code samples
  • ๐Ÿ—๏ธ Architecture - Deep dive into system design
  • ๐Ÿค Community - Get help and contribute
  • ๐Ÿ› Issues - Report bugs or request features

๐Ÿ“Š Features

Feature Status
๐Ÿ”’ Process Isolation (Agent Supervisor) โœ… Production
๐Ÿ“จ Event-Driven Architecture โœ… Production
๐Ÿ”„ Auto-Retry & DLQ โœ… Production
๐Ÿ“Š Metrics & Monitoring โœ… Production
๐ŸŽ›๏ธ CLI & HTTP API โœ… Production
๐Ÿ”Œ Redis Event Bus โœ… Production
๐Ÿ’พ Redis Storage โœ… Production
๐Ÿ“ JSON Storage โœ… Production
โšก Kafka Event Bus ๐Ÿšง Coming Soon
๐Ÿฐ RabbitMQ Event Bus ๐Ÿšง Coming Soon
๐Ÿ—„๏ธ PostgreSQL Storage ๐Ÿšง Coming Soon
๐Ÿƒ MongoDB Storage ๐Ÿšง Coming Soon

๐Ÿ‘จโ€๐Ÿ’ป About

Created by Abiola Adeshina and the OmniDaemon Team

From the creators of OmniCore Agent โ€” building the future of event-driven AI systems


๐Ÿ“„ License

MIT License - see LICENSE file for details


โญ Star on GitHub โ€ข ๐Ÿ› Report Bug โ€ข ๐Ÿ’ก Request Feature

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

omnidaemon-0.1.1.tar.gz (73.3 kB view details)

Uploaded Source

Built Distribution

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

omnidaemon-0.1.1-py3-none-any.whl (86.0 kB view details)

Uploaded Python 3

File details

Details for the file omnidaemon-0.1.1.tar.gz.

File metadata

  • Download URL: omnidaemon-0.1.1.tar.gz
  • Upload date:
  • Size: 73.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for omnidaemon-0.1.1.tar.gz
Algorithm Hash digest
SHA256 afed98e4c49143a1d92bcb4702ff99e3b842d54c8ed2c8ab0c3c0ba7c2a37ef5
MD5 8f4686fb2fd53f498f793b61b2ae8af8
BLAKE2b-256 6c0fa7d0b4aca1b6031a2f960e79235280763d9396a3953aa687aab5ac7bf09b

See more details on using hashes here.

File details

Details for the file omnidaemon-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: omnidaemon-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 86.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for omnidaemon-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 13b9293bc6adef96654dd6739b8f9e672721643dc447073c69e8474f92ec8dc1
MD5 031442df3371fc4bce7f984985f3bc67
BLAKE2b-256 432759f0c0003c7940d72d83e52475cff1a521438210b86d68428c01caef5e88

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