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! ๐ŸŽ‰