repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | --- |
| #2 | title: API Reference Template |
| #3 | description: "Standard layout for documenting Mem0 API endpoints." |
| #4 | icon: "code" |
| #5 | --- |
| #6 | |
| #7 | # Api Reference Template |
| #8 | |
| #9 | API reference pages document a single endpoint contract. Present metadata, request/response examples, and recovery guidance without narrative detours. |
| #10 | |
| #11 | --- |
| #12 | |
| #13 | ## ❌ DO NOT COPY — Guidance & Constraints |
| #14 | - Frontmatter must include `title`, `description`, `icon`, `method`, `path`. Heading should be `# METHOD /path`. |
| #15 | - Provide a quick facts table (Method, Path, Auth, Rate limit) followed by an `<Info>` block describing when to use the endpoint. Add `<Warning>` for beta headers or scope requirements. |
| #16 | - Requests require headers table, body/parameters table, and `<CodeGroup>` with cURL, Python, TypeScript. If a language is unavailable, include a `<Note>` explaining why. |
| #17 | - When migrating an existing endpoint page, keep the canonical examples and edge-case notes—drop them into these sections rather than inventing new payloads unless the API changed. |
| #18 | - Response section must show a canonical success payload, status-code table, and troubleshooting tips. Document pagination/idempotency in `<Tip>` or `<Note>` blocks. |
| #19 | - End with related endpoints, a sample workflow link, and two CTA cards (left = concept/feature, right = applied tutorial). Keep the comment reminder for reviewers. |
| #20 | |
| #21 | --- |
| #22 | |
| #23 | ## ✅ COPY THIS — Content Skeleton |
| #24 | |
| #25 | ````mdx |
| #26 | --- |
| #27 | title: [Endpoint name] |
| #28 | description: [Primary action handled by this endpoint] |
| #29 | icon: "bolt" |
| #30 | method: "POST" |
| #31 | path: "/v1/memories" |
| #32 | --- |
| #33 | |
| #34 | # [METHOD] [path] |
| #35 | |
| #36 | | Method | Path | Auth | Rate Limit | |
| #37 | | --- | --- | --- | --- | |
| #38 | | [METHOD] | `[path]` | Token (`mem0-api-key`) | [X req/min] | |
| #39 | |
| #40 | <Info> |
| #41 | Use this endpoint when [brief scenario]. Prefer [alternative endpoint] for [other scenario]. |
| #42 | </Info> |
| #43 | |
| #44 | <Warning> |
| #45 | [Optional: scopes, beta headers, or breaking changes.] Remove if not needed. |
| #46 | </Warning> |
| #47 | |
| #48 | ## Request |
| #49 | |
| #50 | ### Headers |
| #51 | |
| #52 | | Name | Required | Description | |
| #53 | | --- | --- | --- | |
| #54 | | `Authorization` | Yes | `Token YOUR_API_KEY` | |
| #55 | | `Content-Type` | Yes | `application/json` | |
| #56 | |
| #57 | ### Body |
| #58 | |
| #59 | | Field | Type | Required | Description | Example | |
| #60 | | --- | --- | --- | --- | --- | |
| #61 | | `user_id` | string | Yes | Identifier for the end user. | `"alex"` | |
| #62 | | `memory` | string | Yes | Content to store. | `"Prefers email follow-ups."` | |
| #63 | | `metadata` | object | No | Key/value pairs for filtering. | `{ "channel": "support" }` | |
| #64 | |
| #65 | <CodeGroup> |
| #66 | ```bash Shell |
| #67 | curl https://api.mem0.ai/v1/memories \ |
| #68 | -H "Authorization: Token $MEM0_API_KEY" \ |
| #69 | -H "Content-Type: application/json" \ |
| #70 | -d '{ "user_id": "alex", "memory": "Prefers email follow-ups." }' |
| #71 | ``` |
| #72 | |
| #73 | ```python Python |
| #74 | import requests |
| #75 | |
| #76 | resp = requests.post( |
| #77 | "https://api.mem0.ai/v1/memories", |
| #78 | headers={"Authorization": f"Token {API_KEY}"}, |
| #79 | json={"user_id": "alex", "memory": "Prefers email follow-ups."}, |
| #80 | ) |
| #81 | resp.raise_for_status() |
| #82 | ``` |
| #83 | |
| #84 | ```ts TypeScript |
| #85 | const response = await fetch("https://api.mem0.ai/v1/memories", { |
| #86 | method: "POST", |
| #87 | headers: { |
| #88 | Authorization: `Token ${process.env.MEM0_API_KEY}`, |
| #89 | "Content-Type": "application/json", |
| #90 | }, |
| #91 | body: JSON.stringify({ user_id: "alex", memory: "Prefers email follow-ups." }), |
| #92 | }); |
| #93 | ``` |
| #94 | </CodeGroup> |
| #95 | |
| #96 | <Tip> |
| #97 | Batch insertion? Use `/v1/memories/batch` with the same payload structure. |
| #98 | </Tip> |
| #99 | |
| #100 | ## Response |
| #101 | |
| #102 | ```json |
| #103 | { |
| #104 | "memory_id": "mem_123", |
| #105 | "created_at": "2025-02-04T12:00:00Z" |
| #106 | } |
| #107 | ``` |
| #108 | |
| #109 | | Status | Meaning | Fix | |
| #110 | | --- | --- | --- | |
| #111 | | `201` | Memory stored successfully. | — | |
| #112 | | `400` | Missing required field. | Provide `user_id` and `memory`. | |
| #113 | | `401` | Invalid or missing API key. | Refresh key in dashboard. | |
| #114 | |
| #115 | <Note> |
| #116 | Responses include pagination tokens when you request multiple resources. Reuse them to fetch the next page. |
| #117 | </Note> |
| #118 | |
| #119 | ## Related endpoints |
| #120 | |
| #121 | - [GET /v1/memories/{memory_id}](./get-memory) |
| #122 | - [DELETE /v1/memories/{memory_id}](./delete-memory) |
| #123 | |
| #124 | ## Sample workflow |
| #125 | |
| #126 | - [Build a Customer Support Agent](/cookbooks/customer-support-agent) |
| #127 | |
| #128 | {/* DEBUG: verify CTA targets */} |
| #129 | |
| #130 | <CardGroup cols={2}> |
| #131 | <Card |
| #132 | title="[Related concept or feature]" |
| #133 | description="[How this endpoint fits the model]" |
| #134 | icon="layers" |
| #135 | href="/[concept-link]" |
| #136 | /> |
| #137 | <Card |
| #138 | title="[Applied cookbook/integration]" |
| #139 | description="[What readers can build next]" |
| #140 | icon="rocket" |
| #141 | href="/[cookbook-link]" |
| #142 | /> |
| #143 | </CardGroup> |
| #144 | ```` |
| #145 | |
| #146 | --- |
| #147 | |
| #148 | ## ✅ Publish Checklist |
| #149 | - [ ] Quick facts table matches frontmatter method/path and shows auth/rate limit. |
| #150 | - [ ] Request section includes headers, body table, and code samples for cURL, Python, TypeScript (or `<Note>` explaining missing SDK). |
| #151 | - [ ] Response section documents success payload plus error table with fixes. |
| #152 | - [ ] Related endpoints and sample workflow link to existing docs. |
| #153 | - [ ] CTA pair uses concept/feature on the left and an applied example on the right. |
| #154 | |
| #155 | ## Browse Other Templates |
| #156 | |
| #157 | <CardGroup cols={3}> |
| #158 | <Card |
| #159 | title="Quickstart" |
| #160 | description="Install → Configure → Add → Search → Delete." |
| #161 | icon="rocket" |
| #162 | href="/templates/quickstart_template" |
| #163 | /> |
| #164 | <Card |
| #165 | title="Operation Guide" |
| #166 | description="Single task walkthrough with verification checkpoints." |
| #167 | icon="circle-check" |
| #168 | href="/templates/operation_guide_template" |
| #169 | /> |
| #170 | <Card |
| #171 | title="Feature Guide" |
| #172 | description="Explain when and why to use a capability, not just the API." |
| #173 | icon="sparkles" |
| #174 | href="/templates/feature_guide_template" |
| #175 | /> |
| #176 | <Card |
| #177 | title="Concept Guide" |
| #178 | description="Define mental models, key terms, and diagrams." |
| #179 | icon="brain" |
| #180 | href="/templates/concept_guide_template" |
| #181 | /> |
| #182 | <Card |
| #183 | title="Integration Guide" |
| #184 | description="Configure Mem0 alongside third-party tools." |
| #185 | icon="plug" |
| #186 | href="/templates/integration_guide_template" |
| #187 | /> |
| #188 | <Card |
| #189 | title="Cookbook" |
| #190 | description="Narrative, end-to-end walkthroughs." |
| #191 | icon="book-open" |
| #192 | href="/templates/cookbook_template" |
| #193 | /> |
| #194 | <Card |
| #195 | title="API Reference" |
| #196 | description="Endpoint specifics with dual-language examples." |
| #197 | icon="code" |
| #198 | href="/templates/api_reference_template" |
| #199 | /> |
| #200 | <Card |
| #201 | title="Parameters Reference" |
| #202 | description="Accepted fields, defaults, and misuse fixes." |
| #203 | icon="list" |
| #204 | href="/templates/parameters_reference_template" |
| #205 | /> |
| #206 | <Card |
| #207 | title="Migration Guide" |
| #208 | description="Plan → migrate → validate with rollback." |
| #209 | icon="arrow-right" |
| #210 | href="/templates/migration_guide_template" |
| #211 | /> |
| #212 | <Card |
| #213 | title="Release Notes" |
| #214 | description="Ship highlights and required CTAs." |
| #215 | icon="megaphone" |
| #216 | href="/templates/release_notes_template" |
| #217 | /> |
| #218 | <Card |
| #219 | title="Troubleshooting Playbook" |
| #220 | description="Symptom → diagnose → fix." |
| #221 | icon="life-buoy" |
| #222 | href="/templates/troubleshooting_playbook_template" |
| #223 | /> |
| #224 | <Card |
| #225 | title="Section Overview" |
| #226 | description="Landing pages with card grids and CTA pair." |
| #227 | icon="grid" |
| #228 | href="/templates/section_overview_template" |
| #229 | /> |
| #230 | </CardGroup> |
| #231 | |
| #232 | <CardGroup cols={2}> |
| #233 | <Card |
| #234 | title="Contribution Hub" |
| #235 | description="Review the authoring workflow and linked templates." |
| #236 | icon="clipboard-list" |
| #237 | href="/platform/contribute" |
| #238 | /> |
| #239 | <Card |
| #240 | title="Docs Home" |
| #241 | description="Return to the platform overview once you’re done." |
| #242 | icon="compass" |
| #243 | href="/platform/overview" |
| #244 | /> |
| #245 | </CardGroup> |
| #246 |