# generative-computing/mellea

Mellea is a library for writing generative programs.

Repository: https://github.com/generative-computing/mellea
Canonical: https://ross.abutalabs.com/products/mellea
Homepage: https://mellea.ai
Language: Python
License: Apache-2.0
License Family: permissive
Topics: agents, generative-ai, llms, generative-computing
Last push: 2026-08-26T18:13:06+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 93, longevity 28
- inputs: {"age_days": 398, "days_push": 7, "days_rel": 51, "gap_med": 14.0, "n_releases_24m": 23}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1799, forks 149 (observed 2026-08-28T04:05:37.856489+00:00)

## What it is
Mellea is a Python library for writing generative programs, where LLM calls are first-class operations with type-annotated outputs, verifiable requirements, and automatic retry/repair loops. It supports multiple backends (OpenAI, Ollama, vLLM, HuggingFace, Watsonx, LiteLLM, Bedrock) and integrates with MCP for exposing tools.

## Use cases
- extract structured data from text with guaranteed schemas
- validate LLM outputs against requirements with automatic retries
- build reliable AI pipelines without brittle prompt chains
- wrap Python functions as MCP tools for Claude Desktop or Cursor
- enforce grammar-constrained decoding for valid structured output
- build RAG and agent workflows with testable LLM calls

## When to choose
- you need type-safe, schema-enforced LLM outputs in Python
- you want verifiable requirements and automatic repair instead of prompt guesswork
- you need token-level constrained decoding rather than retry-based validation
- you want to expose validated LLM functions as MCP tools

## When to avoid
- you need a full agent framework with complex multi-agent orchestration
- you work outside Python
- you only need simple one-off prompt calls without validation

## Facets
- artifact type: library
- maturity: active
- function: llm-inference, agent-framework, rag, mcp, prompt-engineering, sdk
- domain: large-language-models, artificial-intelligence, developer-tools
- platform: python, cross-platform
- tags: generative-programming, structured-output, constrained-decoding, requirement-validation, pydantic, llm-workflows, rejection-sampling, ai-agents, retrieval-augmented-generation

## Member repositories
- generative-computing/mellea (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:37.856489+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:22:17.089125+00:00, confidence not recorded.
  - readme: https://github.com/generative-computing/mellea (fetched 2026-08-28T04:05:37.856489+00:00, sha 9d3050b75b29)
  - homepage: https://mellea.ai (fetched 2026-08-29T11:01:13.261695+00:00, sha 8e893d80fecd)
  - site_page: https://docs.mellea.ai (fetched 2026-08-29T11:01:13.271253+00:00, sha 22b428f5331c)
  - site_page: https://docs.mellea.ai/integrations/mcp (fetched 2026-08-29T11:01:13.273207+00:00, sha c8d0960a2c6f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
