Skip to main content

Quick Start: Build Your First Agent in 10 Minutes

This tutorial will get you from zero to a working AI agent in under 10 minutes. By the end, you’ll have:
  • ✅ OmniDaemon installed and running
  • ✅ Your first agent listening for events
  • ✅ A publisher sending events
  • ✅ Results being stored and retrieved
Let’s go!

Step 1: Install Event Bus & Storage Backend

For this Quick Start, we’ll use Redis (the current production-ready backend for both event bus and storage).
💡 OmniDaemon is pluggable! Redis Streams is our first event bus implementation. Coming soon: Kafka, RabbitMQ, NATS. For storage, we support JSON (dev) and Redis (production), with PostgreSQL, MongoDB, and S3 planned.

macOS

Ubuntu/Debian

Windows

Docker (All Platforms - Easiest!)

✅ Verify Event Bus is running (Redis Streams for this Quick Start):
Expected output: PONG If you see “command not found” or connection error, the event bus backend isn’t running. Try the Docker method above.

Step 2: Install OmniDaemon

Using pip (Traditional)

✅ Expected output:

Step 3: Create Your First Agent (Production-Ready)

We’ll use the Supervisor pattern - for process isolation and auto-recovery.

Create Agent Directory

Create callback.py:
Create __init__.py:
Directory structure:
Go back to parent:
###Create Agent Runner Create agent_runner.py:
What this provides:
  • ✅ Process isolation (like containers)
  • ✅ Auto-restart on crash
  • ✅ Production-ready for Python agents
  • ✅ Fault containment

📚 Working Examples

Want to see complete, production-ready implementations? Check these out:

Multiple Supervised Agents

examples/agents_with_supervisors/ Shows real-world patterns:
  • Multiple agents with supervisors in one runner
  • Google ADK with MCP filesystem tools
  • Proper initialization and graceful shutdown
Key files to study:
💡 These examples are your best teacher. Copy their patterns for production use.

Development Alternative (Simple)

For quick prototyping only (no isolation):
⚠️ Limitations: No isolation, no auto-restart. Use Supervisor for production.

Step 4: Run Your Agent

✅ Expected output:
Success indicators:
  • Shows “Registered agent” message
  • Shows “Agent running” message
  • Process doesn’t exit (stays running, waiting for messages)
❌ Common errors and fixes: Keep this terminal running - your agent is now alive and listening!

Step 5: Publish an Event

Open a NEW terminal (keep the agent running in the first one!) and create publisher.py:

SIMPLE VERSION (Required parameters only)

FULL VERSION (With all optional parameters)

Parameter Defaults:
  • webhook: None (no HTTP callback)
  • reply_to: None (no response topic)
  • correlation_id: Auto-generated UUID
  • causation_id: None
  • source: “unknown”
  • tenant_id: “default”
Run it:
✅ Expected output:
In the agent terminal, you should see:

Step 6: Check System Health

In a new terminal:
✅ Expected output:

🎉 Success! What Just Happened?

You now have a fully functional event-driven AI agent runtime:
  1. Event Bus - Running and handling message distribution (using Redis Streams)
  2. Storage Backend - Persisting agents, results, and metrics (using Redis)
  3. OmniDaemon - Installed and operational
  4. Agent - Registered and listening for events
  5. Event Flow - Published task → Agent processed → Result stored
  6. Health Check - All systems verified
The Event Flow:

⚙️ Configuration (Optional)

The Quick Start uses smart defaults - you don’t need to configure anything! Defaults:
  • Storage Backend: JSON files in .omnidaemon_data/ (pluggable)
  • Event Bus: Redis Streams at localhost:6379 (pluggable)
  • API: Disabled (use SDK/CLI only)
To customize, create a .env file:
When to change defaults: For Quick Start: Stick with defaults! 👍

🐛 Quick Troubleshooting

Problem: “Event Bus connection keeps failing”

Problem: “Agent runs but doesn’t process tasks”

Problem: “No output when running agent”

This is normal! Agent runs in background. Look for:
  • ✅ “Registered agent” message
  • ✅ “Listening for topics” message
  • ✅ No error messages

Problem: “Can’t import OmniDaemonSDK”

Still stuck? See Support & Community for help.

🚀 What’s Next?

Congratulations! You’ve built your first AI agent with OmniDaemon. Here’s where to go next:

Learn More

  1. Core Concepts - Understand EDA deeply
  2. Agent Lifecycle - Registration, subscription, deletion
  3. Callback Pattern - Master the callback

Build Real Agents

  1. Use OmniCore Agent - AI agent with MCP tools
  2. Use Google ADK - Google’s Agent Development Kit
  3. Common Patterns - 7 production-ready recipes

Go to Production

  1. Production Setup - Deploy for real
  2. Monitoring - Metrics, health, DLQ

Explore the API

  1. Python SDK Reference - Complete API docs
  2. CLI Reference - All CLI commands

📖 Need Help?


Happy building! 🎉