Memory Intelligence Developer Documentation

API Reference

Turn raw content—text, conversations, images—into structured meaning. Searchable, explainable, provenance-tracked. No black box. No hallucinations. Nine core methods: capture, list, read, ask, search, match, explain, verify, forget.

Paste into your AI agent to write correct integration code on the first try

Overview #

Memory Intelligence transforms unstructured content into Unified Memory Objects (UMOs)—canonically structured semantic representations that power search, reasoning, and verification. Every operation returns explainability: why this result, what the system understood, how confidence was scored.

Response envelope

Most responses wrap in a standard envelope with status, data, request_id, timestamp, and error. The endpoint examples below show only the contents of the data payload; assume every successful response is wrapped like this:

Exception: DELETE /v1/memories/{id} (mi.forget) returns its payload directly, without the wrapper. Its example in the reference below is already the full response body.

{
  "status": "success",
  "data": { /* endpoint-specific payload shown in examples below */ },
  "request_id": "req_1508829a",
  "timestamp": "2026-04-17T19:05:05.256442Z",
  "error": null
}

Note on internal telemetry fields: Responses may include additional fields such as channel, source, actor_type, device_id, and pipeline lineage. These reflect internal capture and processing context, are not part of the stable public API contract, and may change without notice. Integrations should rely only on the documented core fields.

📦 Python SDK Status

The Python SDK is currently undergoing updates to support the new API envelope format. All examples below use cURL which works perfectly. You can also use any HTTP client (Postman, Python requests, JavaScript fetch, etc.).

SDK v2.1 with full envelope support releasing Q3 2026. Subscribe to updates at memoryintelligence.io/beta

Authentication #

All API requests require a Bearer token in the Authorization header. Your API key is available in the developer portal.

Bearer Token
curl -X POST https://api.memoryintelligence.io/v1/memories \
  -H "Authorization: Bearer mi_beta_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"content": "Your memory content"}'

📦 Key Format: Beta keys use prefix mi_beta_. Production keys will use mi_sk_live_ when generally available.

Portal sign-in (web)

The developer portal uses email + password sessions (/portal/auth/*), separate from API key Bearer auth. Use these endpoints only for the web dashboard — not for SDK integrations.

Endpoint Purpose
POST /portal/auth/login Email + password → HttpOnly session cookies
POST /portal/auth/forgot-password Request a password reset email (always returns success to prevent enumeration)
POST /portal/auth/reset-password Set a new password using the token from the email link

Password reset links

  • Email links to https://memoryintelligence.io/portal?token=… (/reset-password?token=… also redirects to the same portal reset form).
  • Expires in 1 hour. Single-use — request a new link from the portal if it expires.
  • Password rules: 12+ characters, mixed case, and at least one number.
  • Does not rotate your API key — only your portal login password.

Base URL #

All endpoints are relative to the base URL:

https://api.memoryintelligence.io/v1
Environment Base URL Notes
Production https://api.memoryintelligence.io/v1 Stable, versioned, rate-limited
Beta https://api.memoryintelligence.io/v1 Same as production (beta keys)

⚡ Rate Limits (Beta): 50 requests/minute, 1,000 requests/day. Response headers include X-RateLimit-Remaining and X-RateLimit-Reset.

Error Handling #

The API uses standard HTTP status codes. All errors return a JSON response with error and message fields.

Status Meaning Common Causes
400 Bad Request Invalid JSON, missing required fields, malformed ULID
401 Unauthorized Missing or invalid API key
403 Forbidden Valid key, but insufficient permissions
404 Not Found UMO ID doesn't exist or belongs to another user
429 Rate Limited Exceeded requests/minute or requests/day quota
500 Server Error Internal error—contact support if persistent

Error Response Example

{
  "error": "invalid_request",
  "message": "Field 'content' is required",
  "status_code": 400
}

mi.capture() #

Turn raw content into a Unified Memory Object. Extracts entities, relationships, sentiment, generates embedding, and returns provenance hash.

POST /v1/memories

Processes text through the 7-stage pipeline: CAPTURE → NORMALIZE → EXTRACT → ENRICH → PARSE → EMBED → VALIDATE. Returns a complete UMO with quality score.

Request Body

content
string required

Raw text to capture. Can be a sentence, paragraph, conversation transcript, or document. Max 50,000 characters.

source
string optional

Source identifier (e.g., "slack", "email", "meeting-notes"). Stored in UMO metadata for filtering.

timestamp
ISO 8601 string optional

Original content timestamp. If omitted, uses current server time. Affects recency scoring in search.

Request
curl -X POST https://api.memoryintelligence.io/v1/memories \
  -H "Authorization: Bearer $MI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Had a breakthrough conversation with the product team today. Sarah proposed using provenance hashing as the core differentiator for the investor deck next Thursday.",
    "source": "meeting-notes",
    "timestamp": "2026-04-10T14:30:00Z"
  }'

Response 200 OK data payload only; see response envelope

{
  "umo_id": "019d9cd5-1be8-8d07-0f31-45018cfe4b68",
  "channel": "sdk:api",
  "source": "docs-example",
  "actor_type": "human",
  "device_id": "fp_abc123...",
  "quality_score": 0.72, // 0–1 scale: entities, coherence, completeness
  "created_at": "2026-04-17T19:05:05.256442Z"
}

Core fields: umo_id (UUID — use this to reference the memory in later calls), quality_score (pipeline's confidence in the captured representation), and created_at. The remaining fields (channel, source, actor_type, device_id) are internal telemetry and may change without notice.

mi.list() #

List all memories for the authenticated user. Supports pagination and filtering by source.

GET /v1/memories

Returns a paginated list of all UMOs belonging to the authenticated user. Use for browsing, sync, or building custom UIs.

Query Parameters

limit
integer optional

Maximum number of results. Default: 20. Max: 100.

offset
integer optional

Number of items to skip for pagination. Default: 0.

source
string optional

Filter by source (e.g., slack, email).

Request
curl https://api.memoryintelligence.io/v1/memories?limit=20 \
  -H "Authorization: Bearer $MI_API_KEY"

Response 200 OK

{
  "memories": [
    {
      "umo_id": "019d9cd5-1be8-8d07-0f31-45018cfe4b68",
      "summary": "Sarah proposed provenance hashing...",
      "source": "meeting-notes",
      "created_at": "2026-04-17T19:05:05Z",
      "quality_score": 0.72
    },
    // ... more memories
  ],
  "total_count": 42,
  "has_more": true
}

mi.read() #

Retrieve a single memory by ID. Returns the full UMO including content, entities, and metadata.

GET /v1/memories/{umo_id}

Fetch a complete UMO by its ID. Includes full content, extracted entities, embedding info, and provenance data.

Path Parameters

umo_id
string (UUID) required

The UUID of the memory to retrieve, as returned by mi.capture().

Request
curl https://api.memoryintelligence.io/v1/memories/019d9cd5-1be8-8d07-0f31-45018cfe4b68 \
  -H "Authorization: Bearer $MI_API_KEY"

Response 200 OK

{
  "umo_id": "019d9cd5-1be8-8d07-0f31-45018cfe4b68",
  "content_text": "Had a breakthrough conversation with the product team...",
  "summary": "Sarah proposed provenance hashing for investor deck",
  "entities": [
    { "text": "Sarah", "type": "PERSON" },
    { "text": "next Thursday", "type": "DATE" }
  ],
  "source": "meeting-notes",
  "created_at": "2026-04-17T19:05:05Z",
  "quality_score": 0.72,
  "provenance_hash": "sha256:a1b2c3d4..."
}

mi.ask() #

Ask questions about your memories in natural language. Uses LLM synthesis to generate grounded answers with citations. Choose local models (free, no setup) or bring your own cloud API keys.

POST /v1/ask

Retrieves relevant memories, reasons about your question, and synthesizes a natural language answer with citations linking to source UMOs. No hallucinations — answers are grounded in your actual memories.

Request Body

question
string required

Natural language question to answer using your memories. Examples: "What were the key decisions from meetings last week?", "Who mentioned the investor deck?"

model
string optional

Model for answer synthesis. Default: spaceagent (local, free).
Local models (no API key needed): spaceagent, llama3.2, mistral, qwen2.5-coder
Cloud models (BYOK): openai:gpt-4o-mini, openai:gpt-4o, anthropic:claude-3-haiku-20240307, anthropic:claude-3-5-sonnet-20241022

provider_key
string optional

API key for cloud models (BYOK - Bring Your Own Key). Required when using openai:* or anthropic:* models. Your key is never stored — used only for the request.

context_size
integer optional

Number of memories to include in context for synthesis. Default: 5. Max: 50. More context = better answers but slower.

Request (local model — free)
curl -X POST https://api.memoryintelligence.io/v1/ask \
  -H "Authorization: Bearer $MI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "What did Sarah propose for the investor deck?",
    "model": "spaceagent",
    "context_size": 5
  }'

Response 200 OK data payload only; see response envelope

{
  "answer": "Sarah proposed provenance hashing as the core differentiator for the investor deck [1]. The meeting was scheduled for next Thursday [1]. This aligns with the earlier discussion about proof-of-authenticity as a competitive advantage [2].",
  "citations": [
    {
      "index": 1,
      "umo_id": "019d9cd5-1be8-8d07-0f31-45018cfe4b68",
      "title": "Q4 Planning Meeting",
      "snippet": "Sarah proposed provenance hashing as the core differentiator...",
      "timestamp": "2026-04-17T19:05:05Z",
      "entities": ["Sarah", "next Thursday"],
      "similarity": 0.92
    },
    {
      "index": 2,
      "umo_id": "019d4a4c-5968-7aad-7b01-c5cc32754ea8",
      "title": "Strategy Notes",
      "snippet": "Proof-of-authenticity is our moat...",
      "timestamp": "2026-04-10T14:30:00Z",
      "entities": ["authenticity"],
      "similarity": 0.78
    }
  ],
  "confidence": 0.87,
  "method": "llm_ollama_mistral",
  "question_type": "factual",
  "topics": ["investor deck", "provenance", "strategy"],
  "entities": ["Sarah", "Q4"]
}

The answer field contains the LLM-generated response with bracket citations like [1]. Each citation links to a source UMO via umo_id. The confidence score (0–1) indicates how well the answer is grounded in your memories.

Available Models

Model Provider API Key? Best For
spaceagent DEFAULT Memory Intelligence No Tuned for memory synthesis — our flagship model
mistral Local (Ollama) No Balanced reasoning
llama3.2 Local (Ollama) No Complex reasoning
openai:gpt-4o-mini OpenAI (BYOK) Yes Fast, affordable
anthropic:claude-3-5-sonnet-* Anthropic (BYOK) Yes Nuanced analysis

SpaceAgent is Memory Intelligence's proprietary model, optimized for memory retrieval and synthesis. Other local models run via Ollama on MI servers. Cloud models require your own API key via provider_key. Use GET /v1/ask/models for the full list.

mi.match() #

Compare two memories and get a relevance score. Useful for recommendations, deduplication, and clustering similar memories.

POST /v1/match

Compares two UMOs using semantic similarity, entity overlap, and topic alignment. Returns a score (0-1) and match decision based on threshold.

Request Body

source_id
string (UUID) required

The first UMO to compare.

candidate_id
string (UUID) required

The second UMO to compare against.

threshold
float optional

Match threshold (0.0-1.0). Default: 0.7. Score >= threshold returns match: true.

Request
curl -X POST https://api.memoryintelligence.io/v1/match \
  -H "Authorization: Bearer $MI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{\n    "source_id": "019d9cd5-1be8-8d07-0f31-45018cfe4b68",\n    "candidate_id": "019d4a4c-5968-7aad-7b01-c5cc32754ea8",\n    "threshold": 0.7\n  }'

Response 200 OK

{
  "score": 0.85,
  "match": true,
  "source_id": "019d9cd5-1be8-8d07-0f31-45018cfe4b68",
  "candidate_id": "019d4a4c-5968-7aad-7b01-c5cc32754ea8",
  "breakdown": {
    "semantic": 0.88,
    "entity_overlap": 0.75,
    "topic_alignment": 0.92
  }
}

The breakdown shows component scores: semantic (embedding cosine similarity), entity_overlap (shared entities ratio), and topic_alignment (topic vector similarity).

Use Cases

  • Deduplication: Find near-duplicate memories before capture
  • Recommendations: "Memories similar to this one"
  • Clustering: Group related memories by topic
  • Validation: Check if two memories reference the same event

mi.explain() #

Get a plain-language explanation of what the pipeline understood from a UMO. Shows extracted entities, relationships, and semantic interpretation.

GET /v1/memories/{umo_id}/explain

Returns human-readable and machine-readable explanations of the pipeline's interpretation. Useful for debugging, transparency, and understanding why a memory was scored a certain way.

Path Parameters

umo_id
string (UUID) required

The UUID of the UMO to explain, as returned by mi.capture().

Request
curl https://api.memoryintelligence.io/v1/memories/019d9cd5-1be8-8d07-0f31-45018cfe4b68/explain \
  -H "Authorization: Bearer $MI_API_KEY"

Response 200 OK data payload only; see response envelope

{
  "human": {
    "summary": "Sarah proposed provenance hashing as the core differentiator for the investor deck next Thursday. This memory involves Sarah, references time: next Thursday. Key relationships: Sarah PROPO provenance hashing as the core differentiator for the investor deck next Thursday. Topics: provenance, hash, core, differentiator, investor.",
    "key_reasons": [
      "Extracted 2 entities (2 types)",
      "Identified 1 semantic relationships (SVO triples)",
      "Classified under 11 topics",
      "Retrieval quality: excellent (0.72)"
    ],
    "what_changed": null // Populated if the UMO was updated
  },
  "audit": { // advanced: machine-readable scoring + lineage
    "semantic_score": 0.7162,
    "temporal_score": 0.5,
    "entity_score": 0.4,
    "graph_score": 0.333,
    "topic_match": ["provenance", "hash", "core", "differentiator", "investor"],
    "model_version": "1.0.0",
    "hash_chain": "4486d2d998b996e0a7d5f71d0e45737b...",
    "reproducible": true,
    "lineage": [/* ordered pipeline steps — see verify() for shape */]
  }
}

The human block is the primary payload for UI and debugging: summary is a plain-language account of what the pipeline understood, key_reasons explains scoring, and what_changed is populated when a UMO has been revised. The audit block exposes component scores, the stored hash_chain, whether the run is reproducible, and the full pipeline lineage — useful for audit tooling, not part of the stable contract.

mi.verify() #

Verify cryptographic provenance of a memory. Proves the content hasn't been altered since capture by recomputing the stored content and semantic hashes and validating the hash chain.

GET /v1/memories/{umo_id}/proof

Returns a provenance receipt: the semantic hash, a boolean hash_chain_valid, a timestamp anchor, the original author, and the ordered pipeline lineage. Useful for auditing, compliance, and trust verification.

Path Parameters

umo_id
string (UUID) required

The UUID of the UMO to verify.

Request
curl https://api.memoryintelligence.io/v1/memories/019d9cd5-1be8-8d07-0f31-45018cfe4b68/proof \
  -H "Authorization: Bearer $MI_API_KEY"

Response 200 OK data payload only; see response envelope

{
  "valid": true,
  "hash_chain_valid": true,
  "semantic_hash": "5000cf7d74568d6ba1d5e842bab7c3e9...",
  "timestamp_anchor": "2026-04-17T19:05:08.104064Z",
  "first_published": "2026-04-17T19:05:05.256442Z",
  "original_author_id": "01955efc-a12b-7654-b3c4-d5e6f7890abc",
  "lineage": [ // advanced: ordered pipeline steps
    {
      "ts": "2026-04-17T19:05:05.256442Z",
      "step": "origin",
      "source": "docs-example",
      "channel": "sdk:api",
      "trigger": "explicit"
    },
    {
      "ts": "2026-04-17T19:05:05.636408Z",
      "step": "pipeline",
      "stages": ["capture", "normalize", "extract", "enrich", "parse", "embed", "validate"],
      "version": "7-stage-v1"
    }
    // ...additional steps if the UMO has been re-processed
  ]
}

Core fields: valid (the memory passes all integrity checks), hash_chain_valid (the stored chain still recomputes correctly), semantic_hash (fingerprint of the semantic representation), timestamp_anchor (when the proof was generated), first_published (when the UMO was originally captured), and original_author_id (UUID of the captor, converted from internal ULID). The lineage array is an advanced field describing the ordered pipeline steps that produced this UMO.

mi.forget() #

Hard delete a memory with a deletion receipt. GDPR-compliant: removes all stored data and returns an audit trail proving deletion occurred.

DELETE /v1/memories/{umo_id}

Permanently deletes a UMO and all associated data (entities, embeddings, provenance). Returns a deletion receipt with timestamp for audit logs. Cannot be undone.

Path Parameters

umo_id
string (UUID) required

The UUID of the UMO to delete permanently.

Request
curl -X DELETE https://api.memoryintelligence.io/v1/memories/019d9cd5-1be8-8d07-0f31-45018cfe4b68 \
  -H "Authorization: Bearer $MI_API_KEY"

Response 200 OK data payload only; see response envelope

{
  "forgotten": true,
  "umo_id": "019d9cd5-1be8-8d07-0f31-45018cfe4b68",
  "deleted_at": "2026-04-17T19:05:08.421711Z",
  "receipt": "14ed1b717189547095c1823130e725c73d47edffe78148afdcd18e19d5e98514"
}

Core fields: forgotten (confirmation the delete succeeded), umo_id (the UUID that was deleted), deleted_at (deletion timestamp), and receipt (a SHA-256 audit token you can retain as proof that deletion occurred, even after the memory itself is gone).

⚠️ Warning: This operation is irreversible. The memory is permanently deleted from all systems. The deletion receipt is retained for audit logs but cannot be used to restore the memory.

mi.batch() #

Capture multiple memories in a single request. Each item is processed independently through the full 7-stage pipeline. Useful for bulk imports or batch operations.

POST /v1/batch

Processes an array of content items in parallel. Returns an array of UMO IDs and individual status for each item. Failed items do not block successful ones.

Request Body

items
array required

Array of objects, each containing content (required string) and optional source, tags, timestamp. Max 100 items per batch.

Request
curl -X POST https://api.memoryintelligence.io/v1/batch \
  -H "Authorization: Bearer $MI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {"content": "Meeting notes from Q4 planning", "source": "notion"},
      {"content": "Updated pricing model draft", "source": "gdrive"},
      {"content": "Customer feedback from March", "source": "slack"}
    ]
  }'

Response 200 OK data payload only; see response envelope

{
  "processed": 3,
  "results": [
    {
      "umo_id": "019d9cd5-1be8-8d07-0f31-45018cfe4b68",
      "status": "success",
      "quality_score": 0.68
    },
    {
      "umo_id": "019d9cd5-1bf2-4c1a-8e45-67890abcdef1",
      "status": "success",
      "quality_score": 0.71
    },
    {
      "umo_id": "019d9cd5-1c04-5d2b-9f56-78901bcdef23",
      "status": "success",
      "quality_score": 0.74
    }
  ]
}

Core fields: processed (count of successfully captured items), results (array with umo_id, status, and quality_score for each item). If an item fails, its status will be "error" with a message field explaining why.

mi.upload() #

Upload a media file (audio, video, image, or PDF) for capture. The file is automatically processed to extract text content, then sent through the full capture pipeline.

POST /v1/upload

Accepts multipart/form-data uploads. Audio and video are transcribed with Whisper. Images use OCR. PDFs are extracted directly. Returns a UMO with the extracted content.

Supported Formats

Audio
Whisper transcription

.mp3 .wav .m4a .flac .ogg .wma .aac .opus .webm

Video
Whisper transcription (audio track)

.mp4 .mov .avi .mkv .webm

Image
OCR text extraction

.png .jpg .jpeg .gif .bmp .tiff .webp .heic

Document
PDF text extraction

.pdf

Request Body

file
binary (multipart/form-data) required

The media file to upload. Max size 50MB. File type is detected automatically from extension.

Request
curl -X POST https://api.memoryintelligence.io/v1/upload \
  -H "Authorization: Bearer $MI_API_KEY" \
  -F "file=@/path/to/document.pdf"

Response 200 OK data payload only; see response envelope

{
  "umo_id": "01KRMWFGKG8CY1PKGTJS86WWDE",
  "summary": "Traditional RAG vs Memory Intelligence: What's Actually Different?",
  "entities": [
    { "text": "RAG", "type": "CONCEPT" },
    { "text": "Memory Intelligence", "type": "PRODUCT" },
    { "text": "Vector DB", "type": "TECH" }
  ],
  "quality_score": 0.78,
  "media_type": "document"
}

Core fields: umo_id (UUID to reference this memory), summary (AI-generated summary of extracted text), entities (named entities found in the content), quality_score (confidence in extraction quality 0–1), and media_type (audio, video, image, or document).

💡 Tip: For plain text content, use mi.capture() with a JSON body instead. The upload endpoint is optimized for binary media files that require extraction.

mi.export() #

Export all memories as NDJSON for GDPR data portability. Streams 100K+ memories without timeout using keyset pagination.

GET /v1/memories/export

Download all memories as newline-delimited JSON (NDJSON). Each line is a complete UMO with metadata, entities, and relationships. Perfect for backups, migrations, and GDPR compliance.

Query Parameters

include_raw
boolean optional

Include raw_text field in export. Default: false (excluded for privacy).

since
string (ISO-8601) optional

Only export memories created on or after this timestamp. Format: YYYY-MM-DDTHH:MM:SSZ

org_ulid
string optional

Organization scope. Default: "default"

Request
curl https://api.memoryintelligence.io/v1/memories/export \
  -H "Authorization: Bearer $MI_API_KEY" \
  -H "Accept: application/x-ndjson"

# With raw content included
curl "https://api.memoryintelligence.io/v1/memories/export?include_raw=true" \
  -H "Authorization: Bearer $MI_API_KEY"

Response 200 OK — Streaming NDJSON

{"id":"01KRMQNDV74BF97HB5W4N4EVPM","schema_version":"1.0.0","user_id":"01KRM...","source_type":"text","normalized_text":"Annual leave policy is 3 weeks","summary":"Company leave policy","tags":["hr","policy"],"entities":[{"text":"3 weeks","type":"DURATION"}],"quality_score":0.82,"created_at":"2026-05-15T20:00:00Z"}
{"id":"01KRMQR8K3XZJP9M2Q5T6N7VYW","schema_version":"1.0.0",...}

Content-Type: application/x-ndjson — One JSON object per line, terminated by \n. Stream is paginated internally (100 rows per batch) but appears continuous. Excluded fields: embedding (384-dim vector), raw_text (unless include_raw=true), internal DB flags.

mi.delete_all() #

Bulk delete all memories with cryptographic audit proof. GDPR right to erasure. This operation is irreversible.

DELETE /v1/delete

Soft-delete all UMOs for the authenticated user in a single atomic transaction. Returns deletion count and SHA-256 audit proof for compliance records.

Request Body

org_ulid
string optional

Organization scope for deletion. Default: "default". Only memories in this org scope will be deleted.

Request
curl -X DELETE https://api.memoryintelligence.io/v1/delete \
  -H "Authorization: Bearer $MI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "org_ulid": "default"
  }'

Response 200 OK data payload only; see response envelope

{
  "deleted_count": 42,
  "audit_proof": {
    "proof": "a4f3b2e1d8c97f3a5b4e2d1c8a9f7e3b2d1a9c8e7f6a5d4b3e2c1f9a8e7d6c5b4",
    "deleted_count": 42,
    "timestamp": "2026-05-15T21:30:00.123456+00:00",
    "user_ulid": "01KRMQNDV74BF97HB5W4N4EVPM"
  }
}

Core fields: deleted_count (number of UMOs deleted), audit_proof.proof (SHA-256 hash of sorted deleted IDs—retain for compliance), timestamp (when deletion occurred), and user_ulid (who initiated it). If no memories exist, returns deleted_count: 0 with empty proof (idempotent).

⚠️ Warning: This operation is irreversible via API. All memories are permanently soft-deleted. Restoration is only possible via database administrator intervention. The audit proof is retained for compliance but cannot restore deleted data.