#91 · Primary category: LLM Application Frameworks

mellea

agents generative-ai generative-computing llms

Mellea is a library for writing generative programs.

Project last updated:08/28/26

GitHub Stars

1.8K

Forks

150

Contributors

67

License

Apache-2.0

Why we included this project

Nearly every serious LLM integration stumbles on the same weak spot: the model call itself. Mellea is a Python library that turns that call into a structured, testable program by using the @generative decorator on typed functions, so docstrings become prompts and Pydantic type hints become enforced output schemas, with no templates or parsers in between. On top of that it adds natural-language requirements, validation, and repair loops that retry until the output actually satisfies the constraints. It also ships with several model backends, sampling strategies like majority voting, and a compatibility mode for sliding into existing code. That makes it a solid fit for teams whose RAG pipelines, agent loops, or extraction services need real guarantees about what the model returns, instead of hand-rolled glue for JSON parsing and retries.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category