API Reference
Memorize
Store content in memory for later retrieval
Memorize
Store content in memory for later retrieval.
POST /memorizeRequest Body
{
"appId": string, // Required: Your app identifier
"userId": string, // Required: User this memory belongs to
"content": string, // Required: Content to memorize
"contentType": string, // Required: "conversation" | "event" | "document"
"threadId"?: string, // Optional: Conversation thread ID
"metadata"?: object // Optional: Additional metadata
}Example Request
curl -X POST https://api.magneteco.io/v1/memorize \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"appId": "tanda",
"userId": "user-123",
"content": "User mentioned they prefer weekly status updates and are working with Acme Corp on a NetSuite implementation.",
"contentType": "conversation",
"threadId": "thread-456"
}'import { MagnetoClient } from '@magneteco/client';
const memory = new MagnetoClient({
appId: 'tanda',
baseUrl: process.env.MAGNETECO_URL,
apiKey: process.env.MAGNETECO_API_KEY,
});
const result = await memory.memorize({
userId: 'user-123',
content: 'User mentioned they prefer weekly status updates...',
contentType: 'conversation',
threadId: 'thread-456',
});import requests
response = requests.post(
'https://api.magneteco.io/v1/memorize',
headers={
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json',
},
json={
'appId': 'tanda',
'userId': 'user-123',
'content': 'User mentioned they prefer weekly status updates...',
'contentType': 'conversation',
'threadId': 'thread-456',
}
)Response
{
"status": "queued",
"resourceId": "res-789", // Reference to stored resource
"estimatedProcessingTime": 5 // Seconds
}Status Codes
| Code | Description |
|---|---|
| 202 | Accepted, queued for processing |
| 400 | Invalid request body |
| 401 | Unauthorized |
| 429 | Rate limited |
Processing
After the request is accepted:
- Raw content is stored to S3 (immutable)
- Extraction job is queued
- LLM extracts atomic facts
- Facts are classified into categories
- Embeddings are generated
- Category summaries are evolved
- Entities and relationships are updated in Neo4j
Processing typically completes within 5-10 seconds.