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

AI Development Workflow

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.1, Beta). The core runtime, UI system, AI agents, MCP, durable execution, and adaptive runtime are production-ready. PostgreSQL, S3/R2, and Redis adapters are shipped behind optional extras; the AI runtime (model-provider protocol, memory, durable agents, and durable human-in-the-loop) is the current focus.

timeline
    title Voodoo Roadmap
    section Shipped (v1.0–v1.15.1)
        Core Runtime & UI : Routing : Components : Reactive state
        AI & Agents : Providers : Tools : MCP : Human-in-the-Loop
        Unified Runtime : ExecutionEngine : Planner : Adaptive supervisor
        Durable Local Runtime : SQLite queue : Executions : Scheduler : Objects : Events
        Production Providers : PostgreSQL : S3/R2 : Redis
    section In Progress (v1.16–v1.19)
        ModelProvider protocol : Model descriptors : Routing aliases
        Memory capability : Layered memory : SQLite + FTS5
        Durable Agents & HITL : Agent registry : Resumable approvals
    section Planned (v2.0+)
        Capability Security & Secrets : v2.0
        Observability & Protocol : v2.1–v2.2
        Local Runtime DX : v2.3
Milestone Version Status
Core framework — runtime, UI, routing, reactive state v1.0–v1.1 ✅ Shipped
AI & unified runtime — agents, tools, MCP, HITL, ExecutionEngine, planner, adaptive runtime v1.2 ✅ Shipped
Durable local runtime (zero-infra) — SQLite storage, queue, executions, scheduler, objects, events v1.3–v1.9 ✅ Shipped
Adapter contracts & runtime configuration v1.10–v1.11 ✅ Shipped
Production providers (optional) — PostgreSQL, S3/R2, Redis v1.12–v1.15 ✅ Shipped
AI runtime — model-provider protocol, memory, durable agents, durable HITL v1.16–v1.19 🚧 In Progress
Capability security & secrets v2.0 📋 Planned
Protocol stability & DX — observability, schemas, local runtime v2.1–v2.3 📋 Planned

See the master roadmap and sprint plan for details.

Contributing

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

AI coding agents: Read AGENTS.md and .github/copilot-instructions.md before making any changes. These define the architectural invariants, code style, testing standards, and sprint protocol that must be followed.

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 contact@helderperez.com — 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.16.0.tar.gz (271.5 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.16.0-py3-none-any.whl (266.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: voodoo_framework-1.16.0.tar.gz
  • Upload date:
  • Size: 271.5 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.16.0.tar.gz
Algorithm Hash digest
SHA256 0cdc2fc8f455178dfb714702d0e0f18039820754ffcc9b44cc9fb26bc7e9c3a9
MD5 4b0957672aceea9f0ce364be1069ddcd
BLAKE2b-256 86051fd43f2cca5b9eb62c5be5f6ea15e879201772440183a28600cc090ec7dc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: voodoo_framework-1.16.0-py3-none-any.whl
  • Upload date:
  • Size: 266.5 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.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f01f0c70f5c8d06d8a4f308a47a596559c189cd32fb9e5b15b78d9fc3d55cba
MD5 37ce7813127103405d3374df109910ea
BLAKE2b-256 7dbddb248bc9e13f1e23215f81352076525d6eb5a3217b89b82827d1c4b42681

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