keep
Store a new memory in Maindex (Smart). Provide the content to persist, with optional headline, tags, collections, and metadata. Each call creates a distinct memory — not idempotent. CONTENT POLICY: NEVER store passwords, API keys, secrets, credit card numbers, SSNs, government IDs, medical/health records (PHI/HIPAA), biometric data, or any legally protected PII. Sanitize content before storing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Optional tags for categorization. | |
| team | No | Team workspace slug when keeping into a team collection. | |
| content | Yes | Primary text to store; required. | |
| rewrite | No | FAILSAFE — defaults to false. When false (the default), content is stored exactly as provided with zero LLM processing. Set to true ONLY if the caller explicitly opts into LLM-assisted rewriting for improved clarity and structure. No content transformation occurs unless this flag is explicitly true. | |
| headline | No | Optional headline; Smart may generate one if omitted. | |
| metadata | No | Opaque JSON metadata stored with the memory. | |
| collection | No | Target team collection slug. Required when team is set. | |
| collections | No | Collection slugs or IDs to add the new memory to. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memory | Yes | The created memory object, or null on failure | |
| success | Yes | Whether the memory was created successfully | |
| traceId | Yes | Trace ID for debugging |