docs/templates/integration_guide_template.mdx
Integration guides prove a joint journey: configure Mem0 and the partner with minimal steps, run one end-to-end sanity command, then hand the reader to deeper workflows.
title, description, icon, and optional partnerBadge/tags. State the joint value in one sentence right after the H1.<Info> block. Surface limited-access or beta flags in a <Warning> before any setup.<Note> explaining the missing variant.graph LR) to avoid vertical overflow; use only if architecture clarity is needed.<Info icon="check">. End the page with exactly two CTA cards (left = related reference, right = next integration/cookbook).Paste the block below, replace placeholders, and delete optional sections only when unnecessary for this integration.
---
title: [Integration title]
description: [One-sentence joint value]
icon: "puzzle-piece"
partnerBadge: "[Partner name]" # Optional
---
# [Integration headline — Mem0 + Partner promise]
Combine Mem0’s memory layer with [Partner] to [describe the joint outcome].
<Info>
**Prerequisites**
- [Mem0 requirement: API key, SDK version, project access]
- [Partner requirement: account, SDK version, tooling]
- [Optional extras: Docker, ngrok, etc.]
</Info>
<Warning>
[Use only if access is gated or breaking changes exist. Delete when not needed.]
</Warning>
```mermaid
graph LR
A[Mem0] */} B[Connector]
B */} C[Partner workflow]
```
## Configure credentials
<Tabs>
<Tab title="Mem0">
<Steps>
<Step title="Create or locate your API key">
```bash
export MEM0_API_KEY="sk-..."
```
</Step>
<Step title="Store it where the integration expects it">
```bash
partner secrets set MEM0_API_KEY=$MEM0_API_KEY
```
</Step>
</Steps>
</Tab>
<Tab title="[Partner]">
<Steps>
<Step title="Generate partner credentials">
```bash
partner auth login
```
</Step>
<Step title="Expose them to your runtime">
```bash
export PARTNER_API_KEY="..."
```
</Step>
</Steps>
</Tab>
</Tabs>
<Tip>
Self-hosting Mem0? Swap `https://api.mem0.ai` with `https://<your-domain>` and keep the rest of this guide identical.
</Tip>
## Wire Mem0 into [Partner]
<Tabs>
<Tab title="Python">
<Steps>
<Step title="Install SDKs">
```bash
pip install mem0ai [partner-package]
```
</Step>
<Step title="Initialize clients">
```python
from mem0 import Memory
from partner import Client
memory = Memory(api_key=os.environ["MEM0_API_KEY"])
partner_client = Client(api_key=os.environ["PARTNER_API_KEY"])
```
</Step>
<Step title="Register Mem0 inside the partner workflow">
```python
@graph.tool
def recall_preferences(user_id: str):
return memory.search("recent preferences", filters={"user_id": user_id})
```
</Step>
</Steps>
</Tab>
<Tab title="TypeScript">
<Steps>
<Step title="Install SDKs">
```bash
npm install mem0ai [partner-package]
```
</Step>
<Step title="Initialize clients">
```typescript
import { Memory } from "mem0ai/oss";
import { Partner } from "[partner-package]";
const memory = new Memory({ apiKey: process.env.MEM0_API_KEY! });
const partner = new Partner({ apiKey: process.env.PARTNER_API_KEY! });
```
</Step>
<Step title="Register Mem0 inside the partner workflow">
```typescript
partner.registerTool("recallPreferences", async (userId: string) => {
const result = await memory.search("recent preferences", { userId });
return result.results;
});
```
</Step>
</Steps>
</Tab>
</Tabs>
<Info icon="check">
Run `[verification command]` and expect `[describe log/result]`. If you see `[common error]`, jump to Troubleshooting below.
</Info>
## Run the integration sanity check
```bash
[command or script that exercises the flow]
```
<Info icon="check">
Output should mention `[success signal]` and `[partner console confirmation]`.
</Info>
## Verify the integration
- `[Signal 1: dashboard entry, log line, or console message]`
- `[Signal 2: partner UI reflects the memory data]`
- `[Optional signal 3]`
## Troubleshooting
- **[Issue]** — `[Fix or link to partner docs]`
- **[Issue]** — `[Fix or link to Mem0 troubleshooting guide]`
<CardGroup cols={2}>
<Card
title="[Related Mem0 feature]"
description="[Why this feature enhances the integration]"
icon="sparkles"
href="/[reference-link]"
/>
<Card
title="[Next integration or cookbook]"
description="[What they can build next]"
icon="rocket"
href="/[next-link]"
/>
</CardGroup>
<Note> explains missing parity).<Info icon="check"> describing success criteria.<CardGroup> has exactly two cards with validated links.