Mellea — build predictable AI without guesswork

Mellea helps you manage the unreliable part of every AI-powered pipeline: the LLM call itself. It replaces ad-hoc prompt chains and brittle agents with structured generative programs — Python code where LLM calls are first-class operations governed by type annotations, requirement verifiers, and principled repair loops.
uv pip install mellea
Get started
Install Mellea and run your first generative program in minutes.
Tutorial
Build a complete program with generation, validation, and repair.
Code examples
Runnable examples: RAG, agents, sampling, MObjects, and more.
API reference
Full public API — backends, session, components, requirements, sampling.
GitHub · PyPI · Discussions