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: Parameters Reference Template |
| #3 | description: "Use this to document accepted fields, defaults, and example payloads." |
| #4 | icon: "list" |
| #5 | --- |
| #6 | |
| #7 | # Parameters Reference Template |
| #8 | |
| #9 | Parameter references document every input/output detail for one operation after the quickstart/onboarding journey. Keep them scannable: signature, tables, examples, exits. |
| #10 | |
| #11 | --- |
| #12 | |
| #13 | ## ❌ DO NOT COPY — Guidance & Constraints |
| #14 | - Frontmatter requires `title`, `description`, `icon`. Titles should mirror the operation (“Add Memories Parameters”). |
| #15 | - Place canonical Python and TypeScript signatures right under the heading using `<CodeGroup>`. Mention defaults or breaking changes in an `<Info>` or `<Warning>` immediately after. |
| #16 | - Parameter table must include columns: Name, Type, Required, Description, Notes. Add a Managed/OSS distinction either as a column or in Notes. |
| #17 | - When updating legacy parameter sheets, keep the authoritative field lists and notes—reformat them into this structure rather than trimming details unless the schema changed. |
| #18 | - Response table must include Field, Type, Description, Example. For nested objects, add subtables or `<CodeGroup>` JSON snippets beneath the row. |
| #19 | - Examples section should show minimal Python and TypeScript calls with one-sentence explanations. If a language is missing, include a `<Note>` explaining why. |
| #20 | - Finish with related operations, troubleshooting tied to parameter misuse, and a two-card CTA (operation guide on the left, cookbook/integration on the right). |
| #21 | |
| #22 | --- |
| #23 | |
| #24 | ## ✅ COPY THIS — Content Skeleton |
| #25 | |
| #26 | ````mdx |
| #27 | --- |
| #28 | title: [Operation title] Parameters |
| #29 | description: Full reference for `[client.method]` inputs and responses. |
| #30 | icon: "table" |
| #31 | --- |
| #32 | |
| #33 | # [Operation title] Parameters |
| #34 | |
| #35 | <CodeGroup> |
| #36 | ```python Python |
| #37 | client.memories.add( |
| #38 | user_id: str, |
| #39 | memory: str, |
| #40 | metadata: Optional[dict] = None, |
| #41 | memory_type: Literal["session", "long_term"] = "session", |
| #42 | ) |
| #43 | ``` |
| #44 | |
| #45 | ```ts TypeScript |
| #46 | await mem0.memories.add({ |
| #47 | userId: string; |
| #48 | memory: string; |
| #49 | metadata?: Record<string, string>; |
| #50 | memoryType?: "session" | "long_term"; |
| #51 | }); |
| #52 | ``` |
| #53 | </CodeGroup> |
| #54 | |
| #55 | <Info> |
| #56 | Defaults to session memories. Override `memory_type` for long-term storage. |
| #57 | </Info> |
| #58 | |
| #59 | <Warning> |
| #60 | [Optional: call out deprecated fields or upcoming removals.] |
| #61 | </Warning> |
| #62 | |
| #63 | ## Parameters |
| #64 | |
| #65 | | Name | Type | Required | Description | Notes | |
| #66 | | --- | --- | --- | --- | --- | |
| #67 | | `user_id` | string | Yes | Unique identifier for the end user. | Must match follow-up operations. | |
| #68 | | `memory` | string | Yes | Content to persist. | Managed & OSS. Markdown allowed. | |
| #69 | | `metadata` | object | No | Key-value pairs for filters. | OSS stores as JSONB; limit to 2KB. | |
| #70 | | `memory_type` | string | No | Retention bucket | Platform supports `shared`. | |
| #71 | |
| #72 | <Tip> |
| #73 | Set `ttl_seconds` when you need memories to expire automatically (OSS only). |
| #74 | </Tip> |
| #75 | |
| #76 | ## Response fields |
| #77 | |
| #78 | | Field | Type | Description | Example | |
| #79 | | --- | --- | --- | --- | |
| #80 | | `memory_id` | string | Identifier used for updates/deletes. | `mem_123` | |
| #81 | | `created_at` | string (ISO 8601) | Timestamp when the memory was stored. | `2025-02-04T12:00:00Z` | |
| #82 | | `metadata` | object | Echoed metadata (if provided). | `{ "team": "support" }` | |
| #83 | |
| #84 | ```json |
| #85 | { |
| #86 | "memory_id": "mem_123", |
| #87 | "memory": "I am training for a marathon.", |
| #88 | "metadata": { |
| #89 | "team": "support" |
| #90 | } |
| #91 | } |
| #92 | ``` |
| #93 | |
| #94 | ## Examples |
| #95 | |
| #96 | <Tabs> |
| #97 | <Tab title="Python"> |
| #98 | <CodeGroup> |
| #99 | ```python Python |
| #100 | response = client.memories.add( |
| #101 | user_id="alex", |
| #102 | memory="I am training for a marathon.", |
| #103 | ) |
| #104 | print(response["memory_id"]) |
| #105 | ``` |
| #106 | </CodeGroup> |
| #107 | </Tab> |
| #108 | <Tab title="TypeScript"> |
| #109 | <CodeGroup> |
| #110 | ```typescript TypeScript |
| #111 | const { memoryId } = await mem0.memories.add({ |
| #112 | userId: "alex", |
| #113 | memory: "I am training for a marathon.", |
| #114 | }); |
| #115 | console.log(memoryId); |
| #116 | ``` |
| #117 | </CodeGroup> |
| #118 | </Tab> |
| #119 | </Tabs> |
| #120 | |
| #121 | These snippets confirm the method returns the new `memory_id` for follow-up operations. |
| #122 | |
| #123 | ## Related operations |
| #124 | |
| #125 | - [Operation guide](./[operation-guide-slug]) |
| #126 | - [Complementary operation](./[secondary-operation-slug]) |
| #127 | |
| #128 | ## Troubleshooting |
| #129 | |
| #130 | - **`400 Missing user_id`** — Provide either `user_id` or `agent_id` in the payload. |
| #131 | - **`422 Metadata too large`** — Reduce metadata size below 2KB (OSS hard limit). |
| #132 | |
| #133 | {/* DEBUG: verify CTA targets */} |
| #134 | |
| #135 | <CardGroup cols={2}> |
| #136 | <Card |
| #137 | title="[Operation guide title]" |
| #138 | description="[Why to read the operation walkthrough next]" |
| #139 | icon="book" |
| #140 | href="/[operation-guide-link]" |
| #141 | /> |
| #142 | <Card |
| #143 | title="[Cookbook or integration]" |
| #144 | description="[How these parameters power a real workflow]" |
| #145 | icon="rocket" |
| #146 | href="/[cookbook-link]" |
| #147 | /> |
| #148 | </CardGroup> |
| #149 | ```` |
| #150 | |
| #151 | --- |
| #152 | |
| #153 | ## ✅ Publish Checklist |
| #154 | - [ ] Python and TypeScript signatures match the current SDKs (or a `<Note>` explains missing parity). |
| #155 | - [ ] Parameter and response tables cover every field with clear Managed vs OSS notes. |
| #156 | - [ ] Examples execute the minimal happy path and include one-line explanations. |
| #157 | - [ ] Troubleshooting entries correspond to parameter misuse or validation errors. |
| #158 | - [ ] CTA pair links to the operation guide (left) and an applied example (right). |
| #159 | |
| #160 | ## Browse Other Templates |
| #161 | |
| #162 | <CardGroup cols={3}> |
| #163 | <Card |
| #164 | title="Quickstart" |
| #165 | description="Install → Configure → Add → Search → Delete." |
| #166 | icon="rocket" |
| #167 | href="/templates/quickstart_template" |
| #168 | /> |
| #169 | <Card |
| #170 | title="Operation Guide" |
| #171 | description="Single task walkthrough with verification checkpoints." |
| #172 | icon="circle-check" |
| #173 | href="/templates/operation_guide_template" |
| #174 | /> |
| #175 | <Card |
| #176 | title="Feature Guide" |
| #177 | description="Explain when and why to use a capability, not just the API." |
| #178 | icon="sparkles" |
| #179 | href="/templates/feature_guide_template" |
| #180 | /> |
| #181 | <Card |
| #182 | title="Concept Guide" |
| #183 | description="Define mental models, key terms, and diagrams." |
| #184 | icon="brain" |
| #185 | href="/templates/concept_guide_template" |
| #186 | /> |
| #187 | <Card |
| #188 | title="Integration Guide" |
| #189 | description="Configure Mem0 alongside third-party tools." |
| #190 | icon="plug" |
| #191 | href="/templates/integration_guide_template" |
| #192 | /> |
| #193 | <Card |
| #194 | title="Cookbook" |
| #195 | description="Narrative, end-to-end walkthroughs." |
| #196 | icon="book-open" |
| #197 | href="/templates/cookbook_template" |
| #198 | /> |
| #199 | <Card |
| #200 | title="API Reference" |
| #201 | description="Endpoint specifics with dual-language examples." |
| #202 | icon="code" |
| #203 | href="/templates/api_reference_template" |
| #204 | /> |
| #205 | <Card |
| #206 | title="Parameters Reference" |
| #207 | description="Accepted fields, defaults, and misuse fixes." |
| #208 | icon="list" |
| #209 | href="/templates/parameters_reference_template" |
| #210 | /> |
| #211 | <Card |
| #212 | title="Migration Guide" |
| #213 | description="Plan → migrate → validate with rollback." |
| #214 | icon="arrow-right" |
| #215 | href="/templates/migration_guide_template" |
| #216 | /> |
| #217 | <Card |
| #218 | title="Release Notes" |
| #219 | description="Ship highlights and required CTAs." |
| #220 | icon="megaphone" |
| #221 | href="/templates/release_notes_template" |
| #222 | /> |
| #223 | <Card |
| #224 | title="Troubleshooting Playbook" |
| #225 | description="Symptom → diagnose → fix." |
| #226 | icon="life-buoy" |
| #227 | href="/templates/troubleshooting_playbook_template" |
| #228 | /> |
| #229 | <Card |
| #230 | title="Section Overview" |
| #231 | description="Landing pages with card grids and CTA pair." |
| #232 | icon="grid" |
| #233 | href="/templates/section_overview_template" |
| #234 | /> |
| #235 | </CardGroup> |
| #236 | |
| #237 | <CardGroup cols={2}> |
| #238 | <Card |
| #239 | title="Contribution Hub" |
| #240 | description="Review the authoring workflow and linked templates." |
| #241 | icon="clipboard-list" |
| #242 | href="/platform/contribute" |
| #243 | /> |
| #244 | <Card |
| #245 | title="Docs Home" |
| #246 | description="Return to the platform overview once you’re done." |
| #247 | icon="compass" |
| #248 | href="/platform/overview" |
| #249 | /> |
| #250 | </CardGroup> |
| #251 |