Skip to main content
Voodoo

Voodoo

The AI-native application framework for Python.

PyPI version Python 3.12+ License: MIT CI PyPI downloads

Build reactive UIs, APIs, agents, background workers, realtime systems, MCP tools, and data-driven applications in one Python runtime. Built for the future of adaptive applications.

Voodoo favors composition over configuration, Python over DSLs, adapters over lock-in, events over tightly coupled systems, and explicit capabilities over unrestricted AI autonomy.


Table of Contents


Why Voodoo?

Modern application development is fragmented. You assemble a frontend framework, a backend framework, a database, a queue, an event bus, an AI SDK, an auth system, a deployment pipeline — and spend more time gluing them together than building your product.

Voodoo asks: what if all of that was one thing?

Voodoo is not a wrapper around other frameworks. It's a unified runtime where UI, API, agents, workers, events, and data are first-class primitives that share a single execution model.

Quick start

pip install voodoo-framework
voodoo new my_app
cd my_app
voodoo dev

Open http://localhost:8000 — that's it. No npm, no bundler, no config files.

The scaffold produces only app/page.py, voodoo.toml, and pyproject.toml — nothing else. No main.py, no .env, no placeholder directories.

Want AI features? Install with pip install "voodoo-framework[ai]" to add OpenAI, Anthropic, Gemini, and Ollama SDKs.

The AI SaaS app

Here's a complete example exercising the full chain — UI → agent → tool → MCP → mesh → worker → database:

from voodoo import (
    App,
    page,
    state,
    event,
    Agent,
    tool,
    Container,
    Heading,
    Text,
    Button,
    Card,
    Div,
    Table,
)

app = App()

# --- Data model ---
from voodoo import Model


class Lead(Model):
    name: str
    email: str
    status: str = "new"


# --- Tool (one definition, four consumers) ---
@tool
async def create_lead(name: str, email: str) -> str:
    """Create a new lead in the database."""
    lead = await Lead.create(name=name, email=email)
    return f"Created lead #{lead.id}: {name}"


# --- Agent with tool calling ---
agent = Agent(
    model="openai:gpt-4o",
    tools=["create_lead"],
    system_prompt="You are a sales assistant. Use tools to create leads.",
)

# --- Realtime mesh event ---
from voodoo.mesh import mesh


@mesh.on("lead.created")
async def notify_slack(payload):
    # Triggered when a lead is created
    print(f"New lead notification: {payload}")


# --- Reactive UI ---
leads = state([])


@page("/")
def dashboard():
    return Container(
        Heading("AI SaaS Dashboard", level=1),
        Card(
            Text("Ask the AI to create leads"),
            Button("Create Lead", onclick="vd.event('create_lead', 'btn')"),
        ),
        Div(
            Table(*leads.get()),
            id="leads-table",
        ),
    )


@event
async def create_lead(element_id, value):
    run = await agent.run("Create a lead for Ada Lovelace, ada@x.io")
    # Agent calls create_lead tool → DB insert → mesh event fires
    all_leads = await Lead.all()
    leads.set(all_leads)


if __name__ == "__main__":
    app.run()

What makes Voodoo different

Differentiator What it means
AI-native by design Agents, tools, and MCP are first-class primitives — not add-ons bolted on later
Agents as application primitives Agent() sits next to Button() and Card() in your code
Voodoo Mesh Unified event layer connecting UI, workers, agents, and applications
One tool, many consumers A single @tool definition serves Python calls, agents, MCP, and mesh
Observability everywhere Correlation IDs and telemetry built into every subsystem
Unified runtime engine Every operation (HTTP, Agent, Tool, MCP, Worker, Human, Event) produces an Execution record with full traceability
Human-in-the-Loop ask_human() + approve()/deny() — humans as compute participants, not afterthoughts
Adaptive execution Planner resolves capabilities to compute participants; supervisor steers with retry, fallback, budget control
Durable by default Tasks, executions, schedules, and events survive process restarts — backed by SQLite out of the box
Zero-config runtime voodoo newvoodoo dev → working app. No build step. Add voodoo.toml when you need configuration
Local-first, cloud-capable SQLite by default; PostgreSQL, Redis, and S3/R2 are optional adapters behind the same contracts

Architectural Primitives

Voodoo is built on eight fundamental computational primitives from which all higher-level capabilities emerge:

flowchart LR
    subgraph Primitives
        State
        Capability
        Intent
        Effect
        Time
        Compute
        Resource
        Constraint
    end

    Intent -->|requires| Capability
    Capability -->|resolved by| Compute
    Compute -->|produces| Effect
    Effect -->|updates| State
    State -->|observed| Intent
    Time --> Constraint
    Constraint --> Compute
    Resource --> Compute
from voodoo.primitives import State, Capability, Intent, Effect

See docs/primitives.md for the full model.

Features

UI & Frontend

  • Reactive UI — Component system in pure Python with WebSocket-driven DOM patches
  • Design System — Built-in theme engine with Tailwind adapter support
  • SEO & GEO — Server-side rendering, sitemaps, OpenGraph, and Generative Engine Optimization

AI & Agents

  • Agents — Provider-driven execution loop with tool calling (OpenAI, Anthropic, Gemini, Ollama)
  • Tools@tool decorator with auto-generated JSON schemas from type hints
  • MCP — Built-in Model Context Protocol server; every tool is automatically exposed
  • Human-in-the-Loopask_human(), approve()/deny(), Task(human=True) — humans as compute participants

Backend & Data

  • Data — Async SQLite ORM with RLS policies and lifecycle hooks
  • Auth — JWT tokens, API keys, session cookies, RBAC route guards
  • Workers@task decorator with retries, timeout, and telemetry spans
  • Voodoo Mesh — Realtime event bus with local + remote boundaries

Runtime & Infrastructure

  • Runtime Engine — Unified ExecutionEngine producing Execution records for every operation
  • Durable Execution — SQLite-backed execution store with checkpointing and voodoo recover CLI
  • Planner — Deterministic capability → compute participant resolution with fallbacks
  • Adaptive Runtime — Supervisor loop with retry, fallback, delegation, budget steering
  • Telemetry — Correlation IDs, request tracking, agent token/cost accounting
  • Security — CORS, CSRF, rate limiting, security headers — all on by default

Adapters (optional extras)

  • PostgreSQL — Database, queue, and event store ([postgres])
  • Redis — Queue and cache ([redis])
  • S3/R2 — Object store with presigned URLs and multipart uploads ([s3])

Installation

Homebrew (macOS/Linux)

brew tap helderperez-dev/voodoo
brew install voodoo

uv

uv tool install voodoo-framework

Magic install script

curl -fsSL https://raw.githubusercontent.com/helderperez-dev/voodoo/main/install.sh | bash

pip / pipx

# Core (lean — no AI SDKs)
pip install voodoo-framework

# With AI providers
pip install "voodoo-framework[ai]"

# With all optional extras
pip install "voodoo-framework[ai,postgres,redis,s3]"

# With dev tools
pip install "voodoo-framework[dev]"

# Isolated environment
pipx install voodoo-framework

Verify

voodoo version

Uninstall

# Homebrew
brew uninstall voodoo && brew untap helderperez-dev/voodoo

# uv
uv tool uninstall voodoo-framework

# pip / pipx
pip uninstall voodoo-framework   # or: pipx uninstall voodoo-framework

# Magic install script
rm -rf ~/.voodoo/venv && rm -f ~/.local/bin/voodoo

Configuration

Voodoo runs zero-config out of the box. When you need to customize, create a voodoo.yaml file:

database:
  provider: sqlite          # sqlite (default) | postgres
queue:
  provider: sqlite          # sqlite (default) | postgres | redis
events:
  provider: sqlite          # sqlite (default) | postgres | memory
objects:
  provider: local           # local (default) | s3
cache:
  provider: memory          # memory (default) | redis
models:
  default: openai:gpt-4o

Environment variables follow the VOODOO_* convention and override defaults. See .env.example for the complete reference.

Key variables:

Variable Default Description
VOODOO_ENV development production disables debug mode
VOODOO_SECRET_KEY dev default JWT signing key — must set in production
VOODOO_DB_PATH .voodoo/state/data.db SQLite database path
VOODOO_DATABASE_PROVIDER sqlite Database backend
VOODOO_QUEUE_PROVIDER sqlite Task queue backend
VOODOO_REDIS_URL Redis URL (queue/cache/events fallback)
OPENAI_API_KEY OpenAI API key for agents

Generate a secure secret key:

voodoo auth secret-key

Documentation

Getting Started

Building Apps

AI & Agents

Realtime & Workers

Runtime & Operations

Engineering

Examples

Example Description Run
hello_world Minimal single-page app voodoo dev examples/hello_world/main.py
dashboard Reactive UI with state and events voodoo dev examples/dashboard/main.py
realtime WebSocket-driven realtime app voodoo dev examples/realtime/main.py
ai_agent Agent with tools and MCP voodoo dev examples/ai_agent/main.py
ai_saas Full SaaS: auth, data, agents, workers voodoo dev examples/ai_saas/main.py

Project Status & Roadmap

Voodoo is in active development (v1.15.0, Beta). The core runtime, UI system, AI agents, MCP, durable execution, and adaptive runtime are production-ready. PostgreSQL, Redis, and S3 adapters are functional and hardening.

timeline
    title Voodoo Roadmap
    section Shipped (v1.3–v1.15)
        Core Runtime & UI : ExecutionEngine : Components : Routing
        AI & Agents : Providers : Tools : MCP Server
        Durable Execution : SQLite Store : Checkpoints : Recovery CLI
        Adaptive Runtime : Planner : Supervisor : Constraints
    section In Progress (v1.16–v2.0)
        HITL Resumability : Cross-worker checkpointing
        Mesh Federation : Remote event bus : Multi-node
        Production Hardening : PostgreSQL GA : Redis GA
    section Future (v2.1+)
        Multi-region : Edge runtime : Visual builder
Milestone Version Status
Core Runtime + UI + Routing v1.3–v1.8 ✅ Shipped
AI Agents + Tools + MCP v1.9–v1.11 ✅ Shipped
Durable Execution + Recovery v1.12–v1.13 ✅ Shipped
Adaptive Runtime + Planner v1.14–v1.15 ✅ Shipped
HITL Resumability + Mesh Federation v1.16–v1.18 🚧 In Progress
Production GA (PostgreSQL, Redis, S3) v2.0 🚧 In Progress
Edge Runtime + Multi-region v2.1+ 📋 Planned

See the master roadmap and sprint plan for details.

Contributing

Contributions are welcome! Please read the Contributing Guide before opening a pull request.

Quick start for contributors:

git clone https://github.com/helderperez-dev/voodoo.git
cd voodoo
just install          # set up dev environment
just format && just lint && just test

By participating, you agree to abide by the Code of Conduct.

Security

Voodoo includes security features on by default: CORS, CSRF protection, rate limiting, and security headers. For production deployments, review the hardening checklist in SECURITY.md.

To report a vulnerability, email helder@voodoo.dev — do not open a public issue. See the full Security Policy for response timelines.

Testing

pytest

License

MIT — Copyright (c) 2026 Helder Perez and the Voodoo contributors.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voodoo_framework-1.15.1.tar.gz (267.6 kB view details)

Uploaded Source

Built Distribution

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

voodoo_framework-1.15.1-py3-none-any.whl (262.8 kB view details)

Uploaded Python 3

File details

Details for the file voodoo_framework-1.15.1.tar.gz.

File metadata

  • Download URL: voodoo_framework-1.15.1.tar.gz
  • Upload date:
  • Size: 267.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for voodoo_framework-1.15.1.tar.gz
Algorithm Hash digest
SHA256 3d3d64c03efa2b15f1ee3a5c0b086a6d4f62830729bd4a31f7e07fd9267b25c9
MD5 904651248c88f5b4072c06aea27b8437
BLAKE2b-256 7345684f4bf2d353ec7c352de2dbcebd44225626255f81960056d6390afac08e

See more details on using hashes here.

File details

Details for the file voodoo_framework-1.15.1-py3-none-any.whl.

File metadata

  • Download URL: voodoo_framework-1.15.1-py3-none-any.whl
  • Upload date:
  • Size: 262.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for voodoo_framework-1.15.1-py3-none-any.whl
Algorithm Hash digest
SHA256 190a9bf9f31d36fff17640270687e66d0b517c670519118da7833238a9e129ac
MD5 d60592b69cdaa5543907a79f33e9281b
BLAKE2b-256 db61496fe2acc8eda8cbdf6b5397ce4935cb354ca5cb37846001068b1cd8ad29

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 Sentry Error logging StatusPage Status page