Magneteco
API Reference

Memorize

Store content in memory for later retrieval

Memorize

Store content in memory for later retrieval.

POST /memorize

Request 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

CodeDescription
202Accepted, queued for processing
400Invalid request body
401Unauthorized
429Rate limited

Processing

After the request is accepted:

  1. Raw content is stored to S3 (immutable)
  2. Extraction job is queued
  3. LLM extracts atomic facts
  4. Facts are classified into categories
  5. Embeddings are generated
  6. Category summaries are evolved
  7. Entities and relationships are updated in Neo4j

Processing typically completes within 5-10 seconds.

On this page