docs/templates/cookbook_template.mdx
Cookbooks are narrative tutorials. They start with a real problem, show the broken path, then layer production-ready fixes. Use this template verbatim so every contributor (human or LLM) ships the same experience.
user_123.Paste the block below into a new cookbook, then replace all placeholders. Remove any section you don't need only after the happy path works.
---
title: [Cookbook title — action oriented]
description: [1 sentence outcome]
---
# [Hero headline]
[Two sentences max: state the user's pain and what this cookbook will fix.]
<Tip>
[Only include if you truly have launch news. Delete otherwise to keep the intro crisp.]
</Tip>
<Info icon="clock">
**Time to complete:** [~X minutes] · **Languages:** Python, TypeScript
</Info>
## Setup
```python
default_language = "python" # replace with real imports
// Equivalent TypeScript setup goes here
[Set context with characters + goal.]
# Happy-path example
// Happy-path example (TypeScript)
[Explain what breaks without tuning.]
# Broken behaviour
// Broken behaviour
Output:
[Paste noisy output]
[One sentence on why the result is unacceptable.]
[Explain the fix and why it helps.]
# Improved implementation
// Improved implementation
Retest:
# Same test as before
// Same test as before
Output:
[Cleaner result]
[Highlight the improvement + remaining gap if any.]
[Add another enhancement, e.g., metadata filters, rerankers, batching.]
# Additional refinement
// Additional refinement
[When to use it]
# Example snippet
// Example snippet
[When to use it]
# Example snippet
// Example snippet
[placeholder] and remove unused sections.<Note> stating language limitation).<Info icon="check"> or inline equivalent.<CardGroup cols={2}>.Stick to the skeleton above. If you need to deviate, document the rationale in the PR so we can update the template for everyone else.
## Browse Other Templates
<CardGroup cols={3}>
<Card
title="Quickstart"
description="Install → Configure → Add → Search → Delete."
icon="rocket"
href="/templates/quickstart_template"
/>
<Card
title="Operation Guide"
description="Single task walkthrough with verification checkpoints."
icon="circle-check"
href="/templates/operation_guide_template"
/>
<Card
title="Feature Guide"
description="Explain when and why to use a capability, not just the API."
icon="sparkles"
href="/templates/feature_guide_template"
/>
<Card
title="Concept Guide"
description="Define mental models, key terms, and diagrams."
icon="brain"
href="/templates/concept_guide_template"
/>
<Card
title="Integration Guide"
description="Configure Mem0 alongside third-party tools."
icon="plug"
href="/templates/integration_guide_template"
/>
<Card
title="Cookbook"
description="Narrative, end-to-end walkthroughs."
icon="book-open"
href="/templates/cookbook_template"
/>
<Card
title="API Reference"
description="Endpoint specifics with dual-language examples."
icon="code"
href="/templates/api_reference_template"
/>
<Card
title="Parameters Reference"
description="Accepted fields, defaults, and misuse fixes."
icon="list"
href="/templates/parameters_reference_template"
/>
<Card
title="Migration Guide"
description="Plan → migrate → validate with rollback."
icon="arrow-right"
href="/templates/migration_guide_template"
/>
<Card
title="Release Notes"
description="Ship highlights and required CTAs."
icon="megaphone"
href="/templates/release_notes_template"
/>
<Card
title="Troubleshooting Playbook"
description="Symptom → diagnose → fix."
icon="life-buoy"
href="/templates/troubleshooting_playbook_template"
/>
<Card
title="Section Overview"
description="Landing pages with card grids and CTA pair."
icon="grid"
href="/templates/section_overview_template"
/>
</CardGroup>
<CardGroup cols={2}>
<Card
title="Contribution Hub"
description="Review the authoring workflow and linked templates."
icon="clipboard-list"
href="/platform/contribute"
/>
<Card
title="Docs Home"
description="Return to the platform overview once you’re done."
icon="compass"
href="/platform/overview"
/>
</CardGroup>