-

-
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.
-
+
+
+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.
```bash
uv pip install mellea
diff --git a/docs/docs/integrations/_category_.json b/docs/docs/integrations/_category_.json
new file mode 100644
index 000000000..9c5bbe5e6
--- /dev/null
+++ b/docs/docs/integrations/_category_.json
@@ -0,0 +1 @@
+{"label": "Integrations", "position": 6}
diff --git a/docs/docs/integrations/bedrock.md b/docs/docs/integrations/bedrock.md
index c3ee206f4..65b62bcbf 100644
--- a/docs/docs/integrations/bedrock.md
+++ b/docs/docs/integrations/bedrock.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/integrations/bedrock"
title: "AWS Bedrock"
description: "Run Mellea with AWS Bedrock models using the Bedrock Mantle backend or LiteLLM."
# diataxis: how-to
diff --git a/docs/docs/integrations/huggingface.md b/docs/docs/integrations/huggingface.md
index bfb4b3de3..a46bfeed9 100644
--- a/docs/docs/integrations/huggingface.md
+++ b/docs/docs/integrations/huggingface.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/integrations/huggingface"
title: "HuggingFace Transformers"
description: "Run Mellea on local hardware with LocalHFBackend and HuggingFace Transformers."
# diataxis: how-to
diff --git a/docs/docs/integrations/langchain.md b/docs/docs/integrations/langchain.md
index c4d893b18..d1617499c 100644
--- a/docs/docs/integrations/langchain.md
+++ b/docs/docs/integrations/langchain.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/integrations/langchain"
title: "LangChain"
description: "Use LangChain tools inside Mellea and seed a Mellea session with LangChain message history."
# diataxis: how-to
diff --git a/docs/docs/integrations/m-serve.md b/docs/docs/integrations/m-serve.md
index 0096ff3e8..99643ffef 100644
--- a/docs/docs/integrations/m-serve.md
+++ b/docs/docs/integrations/m-serve.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/integrations/m-serve"
title: "m serve"
description: "Run a Mellea program as an OpenAI-compatible chat endpoint with m serve."
# diataxis: how-to
diff --git a/docs/docs/integrations/mcp.md b/docs/docs/integrations/mcp.md
index 58f33a68e..8523fb850 100644
--- a/docs/docs/integrations/mcp.md
+++ b/docs/docs/integrations/mcp.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/integrations/mcp"
title: "MCP Integration"
description: "Expose Mellea functions as Model Context Protocol tools, callable from Claude Desktop, Cursor, and any MCP-compatible client."
# diataxis: how-to
diff --git a/docs/docs/integrations/ollama.md b/docs/docs/integrations/ollama.md
index 4a8b70a09..af34af099 100644
--- a/docs/docs/integrations/ollama.md
+++ b/docs/docs/integrations/ollama.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/integrations/ollama"
title: "Ollama"
description: "Run Mellea with local models via Ollama — the default backend."
# diataxis: how-to
diff --git a/docs/docs/integrations/openai.md b/docs/docs/integrations/openai.md
index 317c32974..fba32f261 100644
--- a/docs/docs/integrations/openai.md
+++ b/docs/docs/integrations/openai.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/integrations/openai"
title: "OpenAI and OpenAI-Compatible APIs"
description: "Use Mellea with OpenAI's API and any OpenAI-compatible endpoint — LM Studio, vLLM, Anthropic, and more."
# diataxis: how-to
diff --git a/docs/docs/integrations/smolagents.md b/docs/docs/integrations/smolagents.md
index 5cf4daeb8..54e5f75a7 100644
--- a/docs/docs/integrations/smolagents.md
+++ b/docs/docs/integrations/smolagents.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/integrations/smolagents"
title: "smolagents"
description: "Use HuggingFace smolagents tools inside a Mellea session."
# diataxis: how-to
diff --git a/docs/docs/integrations/vertex-ai.md b/docs/docs/integrations/vertex-ai.md
index a620e41e4..c52b7f447 100644
--- a/docs/docs/integrations/vertex-ai.md
+++ b/docs/docs/integrations/vertex-ai.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/integrations/vertex-ai"
title: "Vertex AI"
description: "Connect Mellea to Google Vertex AI models via LiteLLM."
# diataxis: how-to
diff --git a/docs/docs/integrations/watsonx.md b/docs/docs/integrations/watsonx.md
index b65a79bcb..4bdb91569 100644
--- a/docs/docs/integrations/watsonx.md
+++ b/docs/docs/integrations/watsonx.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/integrations/watsonx"
title: "IBM WatsonX"
description: "Run Mellea with IBM WatsonX AI using the WatsonxAIBackend."
# diataxis: how-to
diff --git a/docs/docs/observability/_category_.json b/docs/docs/observability/_category_.json
new file mode 100644
index 000000000..cca9d522b
--- /dev/null
+++ b/docs/docs/observability/_category_.json
@@ -0,0 +1 @@
+{"label": "Observability", "position": 7}
diff --git a/docs/docs/observability/logging.md b/docs/docs/observability/logging.md
index 9910b3108..0a69720c6 100644
--- a/docs/docs/observability/logging.md
+++ b/docs/docs/observability/logging.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/observability/logging"
title: "Logging"
description: "Configure Mellea's console logging and export logs to OTLP collectors."
# diataxis: how-to
diff --git a/docs/docs/observability/metrics.md b/docs/docs/observability/metrics.md
index 70e751618..1f3363ca9 100644
--- a/docs/docs/observability/metrics.md
+++ b/docs/docs/observability/metrics.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/observability/metrics"
title: "Metrics"
description: "Automatically collect LLM metrics and instrument your own code with OpenTelemetry counters, histograms, and up-down counters."
# diataxis: how-to
diff --git a/docs/docs/observability/telemetry.md b/docs/docs/observability/telemetry.md
index ce9e46e98..bd461e556 100644
--- a/docs/docs/observability/telemetry.md
+++ b/docs/docs/observability/telemetry.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/observability/telemetry"
title: "Telemetry"
description: "Add OpenTelemetry tracing, metrics, and logging to Mellea programs."
# diataxis: how-to
diff --git a/docs/docs/observability/tracing.md b/docs/docs/observability/tracing.md
index eadaf7d0a..96fba56c8 100644
--- a/docs/docs/observability/tracing.md
+++ b/docs/docs/observability/tracing.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/observability/tracing"
title: "Tracing"
description: "Export distributed traces from Mellea using OpenTelemetry semantic conventions."
# diataxis: how-to
diff --git a/docs/docs/reference/_category_.json b/docs/docs/reference/_category_.json
new file mode 100644
index 000000000..1d47a2e6e
--- /dev/null
+++ b/docs/docs/reference/_category_.json
@@ -0,0 +1 @@
+{"label": "Reference", "position": 10}
diff --git a/docs/docs/reference/glossary.md b/docs/docs/reference/glossary.md
index 3ee9604b6..fb9903086 100644
--- a/docs/docs/reference/glossary.md
+++ b/docs/docs/reference/glossary.md
@@ -1,5 +1,4 @@
---
-canonical: "https://docs.mellea.ai/reference/glossary"
title: "Glossary"
description: "Definitions of Mellea-specific terms and concepts."
# diataxis: reference
@@ -19,7 +18,7 @@ when working with custom components or building your own inference loops.
`aact()` is the async counterpart — same signature, same return types.
-See: [act() and aact()](./act-and-aact)
+See: [act() and aact()](/how-to/act-and-aact)
---
@@ -53,7 +52,7 @@ m = start_session()
lang = classify_language(m, code="print('hello')")
```
-See: [Generative Functions](./generative-functions)
+See: [Generative Functions](/how-to/generative-functions)
---
@@ -63,7 +62,7 @@ A backend is an inference engine that Mellea uses to run LLM calls. Examples:
`OllamaModelBackend`, `OpenAIBackend`, `LocalHFBackend`, `WatsonxAIBackend`. Backends are configured via `MelleaSession` or
`start_session()`.
-See: [Backends and Configuration](./backends-and-configuration)
+See: [Backends and Configuration](/how-to/backends-and-configuration)
---
@@ -171,7 +170,7 @@ annotation as the output schema and its docstring as the prompt. Generative
functions are called with a `MelleaSession` as the first argument and return the
annotated type.
-See: [Generative Functions](./generative-functions)
+See: [Generative Functions](/how-to/generative-functions)
---
@@ -437,7 +436,7 @@ m = mellea.start_session(
)
```
-See: [Backends and Configuration](./backends-and-configuration)
+See: [Backends and Configuration](/how-to/backends-and-configuration)
---
@@ -668,7 +667,7 @@ from mellea.stdlib.frameworks.react import react
result, _ = await react(goal="...", context=ChatContext(), backend=m.backend, tools=[...])
```
-See: [Tools and Agents](./tools-and-agents)
+See: [Tools and Agents](/how-to/tools-and-agents)
---
@@ -705,7 +704,7 @@ to make PDFs, tables, and structured files queryable by the LLM. Extract tables
pip install 'mellea[docling]'
```
-See: [Working with Data](./working-with-data)
+See: [Working with Data](/how-to/working-with-data)
---
@@ -787,7 +786,7 @@ tables = rich_doc.get_tables()
summary = m.query(tables[0], "What is the total in the last row?")
```
-See: [Working with Data](./working-with-data)
+See: [Working with Data](/how-to/working-with-data)
---
@@ -847,7 +846,7 @@ A Python function decorated with `@tool` (or registered via `MelleaSession`) tha
Mellea exposes to an LLM for function calling. Tools have typed inputs and outputs
so the LLM can call them reliably without free-form parsing.
-See: [Tools and Agents](./tools-and-agents)
+See: [Tools and Agents](/how-to/tools-and-agents)
---
@@ -893,4 +892,4 @@ Total wall-clock time is roughly the latency of the slowest single call rather
than the sum of all calls. Use `SimpleContext` (the default) when calling
`wait_for_all_mots`; concurrent writes to `ChatContext` can corrupt state.
-See: [Tutorial 02: Streaming and Async](../tutorials/02-streaming-and-async)
+See: [Tutorial 02: Streaming and Async](/tutorials/streaming-and-async)
diff --git a/docs/docs/snippets/Divider.mdx b/docs/docs/snippets/Divider.mdx
deleted file mode 100644
index f2e6a5a08..000000000
--- a/docs/docs/snippets/Divider.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
-export const Divider = () => (
-