KnowledgeMemory PricingBlogDocs DiscordGitHub Dashboard

Memory Write

POST /v1/memory/write

Store a new memory. New content is processed in the background before it becomes searchable. Use the /v1/memory/status/{id} endpoint to check when it is ready.

https://api.ragionex.com/v1/memory/write

Request Body

ParameterTypeRequiredDescription
content string required The memory content to store (maximum length depends on your plan)
project string required Organizational label for the memory. Lowercase letters, digits, hyphens only. 1-50 characters. Pattern: ^[a-z0-9-]+$. New project names are created automatically on first write.

Example Request

import requests

response = requests.post(
    "https://api.ragionex.com/v1/memory/write",
    headers={"X-API-Key": "rgx_memory_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},
    json={
        "content": "User prefers TypeScript over JavaScript. Always use strict mode and explicit types.",
        "project": "acme-app"
    }
)
data = response.json()
print(f"Memory ID: {data['id']} (project: {data['project']})")

Response

Response 200 OK
{
  "success": true,
  "id": "mem_K7X2P9Q4R1",
  "status": "processing",
  "project": "acme-app"
}
Response 400 - Invalid Project Name
{
  "success": false,
  "error": "Invalid project name. Allowed: lowercase letters, digits, hyphens; 1-50 chars."
}
Response 400 - Quota Exceeded
{
  "success": false,
  "error": "Memory limit reached (X total memories). Upgrade your plan for higher limits. See https://ragionex.com/pricing for more info."
}
Async Processing

The memory is processed in the background. The status field stays "processing" until it is searchable, then changes to "ready".

Memory List

GET /v1/memory/list

List all memories for the authenticated user, ordered by creation date (newest first). Returns a preview of each memory (first 200 characters).

https://api.ragionex.com/v1/memory/list

Query Parameters

ParameterTypeRequiredDescription
project string optional Filter to one project. Omit to list memories across all projects.
start_date string optional Lower bound (inclusive) for memory creation date. ISO 8601 string: YYYY-MM-DD (= start-of-day UTC) or YYYY-MM-DDTHH:MM:SSZ. Accepted range: 1970-01-01 to 2200-01-01. Omit for no lower bound.
end_date string optional Upper bound (inclusive). ISO 8601 string: YYYY-MM-DD (= end-of-day UTC) or YYYY-MM-DDTHH:MM:SSZ. Must be on or after start_date when both are provided. Omit for no upper bound.

Example Request

import requests

response = requests.get(
    "https://api.ragionex.com/v1/memory/list",
    headers={"X-API-Key": "rgx_memory_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},
    params={"project": "acme-app"}
)
data = response.json()

Response

Response 200 OK
{
  "success": true,
  "memories": [
    {
      "id": "mem_K7X2P9Q4R1",
      "preview": "User prefers TypeScript over JavaScript. Always use strict mode...",
      "status": "ready",
      "project": "acme-app",
      "created_at": 1712880000
    },
    {
      "id": "mem_A1B2C3D4E5",
      "preview": "Project uses PostgreSQL for the main database...",
      "status": "processing",
      "project": "acme-app",
      "created_at": 1712876400
    }
  ]
}

Memory View

POST /v1/memory/view

Retrieve the full content of specific memories by their IDs. Non-owned IDs are silently ignored.

https://api.ragionex.com/v1/memory/view

Request Body

ParameterTypeRequiredDescription
ids array required Array of memory IDs to retrieve (1-50 IDs)

Example Request

import requests

response = requests.post(
    "https://api.ragionex.com/v1/memory/view",
    headers={"X-API-Key": "rgx_memory_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},
    json={
        "ids": ["mem_K7X2P9Q4R1", "mem_A1B2C3D4E5"]
    }
)
data = response.json()

Response

Response 200 OK
{
  "success": true,
  "memories": [
    {
      "id": "mem_K7X2P9Q4R1",
      "content": "User prefers TypeScript over JavaScript. Always use strict mode and explicit types.",
      "status": "ready",
      "project": "acme-app",
      "created_at": 1712880000
    }
  ]
}

Memory Export

GET /v1/memory/export

Export every memory you have stored, with full content, as a single JSON document. It takes no parameters - it always returns everything. The response streams, so even a large export never buffers fully in memory.

https://api.ragionex.com/v1/memory/export

Example Request

import requests

response = requests.get(
    "https://api.ragionex.com/v1/memory/export",
    headers={"X-API-Key": "rgx_memory_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
)
data = response.json()

Response

Response 200 OK
{
  "generated_at": 1712880000,
  "count": 2,
  "memories": [
    {
      "id": "mem_K7X2P9Q4R1",
      "content": "User prefers TypeScript over JavaScript. Always use strict mode and explicit types.",
      "status": "ready",
      "project": "acme-app",
      "created_at": 1712880000
    },
    {
      "id": "mem_A1B2C3D4E5",
      "content": "Project uses PostgreSQL for the main database with connection pooling.",
      "status": "ready",
      "project": "acme-app",
      "created_at": 1712876400
    }
  ],
  "complete": true
}

The trailing "complete": true marks a finished export. If it is absent - or the JSON does not parse - the export was truncated and should be retried. This endpoint is rate limited to 3 requests per minute.

Memory Update

PUT /v1/memory/update

Update an existing memory. Supports partial updates: you can change the content only, the project only, or both. Content changes reprocess the memory before it is searchable again; project-only changes update metadata in place, instantly.

https://api.ragionex.com/v1/memory/update

Request Body

ParameterTypeRequiredDescription
id string required The memory ID to update
content string optional New memory content (maximum length depends on your plan). The memory returns to processing until the new content is searchable.
project string optional Move the memory to a different project. Instant - only metadata is updated.
At least one required

You must provide content, project, or both. Providing only id returns a 400 error.

Example - Content Only (returns to processing)

import requests

response = requests.put(
    "https://api.ragionex.com/v1/memory/update",
    headers={"X-API-Key": "rgx_memory_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},
    json={
        "id": "mem_K7X2P9Q4R1",
        "content": "User now prefers Python over TypeScript for data science projects."
    }
)
data = response.json()

Example - Project Only (instant, stays ready)

import requests

response = requests.put(
    "https://api.ragionex.com/v1/memory/update",
    headers={"X-API-Key": "rgx_memory_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},
    json={
        "id": "mem_K7X2P9Q4R1",
        "project": "acme-mobile"
    }
)
data = response.json()

Example - Both

import requests

response = requests.put(
    "https://api.ragionex.com/v1/memory/update",
    headers={"X-API-Key": "rgx_memory_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},
    json={
        "id": "mem_K7X2P9Q4R1",
        "content": "Updated content for the mobile project context.",
        "project": "acme-mobile"
    }
)
data = response.json()

Response - Content Changed

Response 200 OK
{
  "success": true,
  "id": "mem_K7X2P9Q4R1",
  "status": "processing",
  "project": "acme-app"
}

Response - Project Only

Response 200 OK
{
  "success": true,
  "id": "mem_K7X2P9Q4R1",
  "status": "ready",
  "project": "acme-mobile"
}
Response 400 - Quota Exceeded
{
  "success": false,
  "error": "Monthly write limit reached (X writes). Resets on 2026-05-01. Upgrade your plan for higher limits. See https://ragionex.com/pricing for more info."
}
Writes Counter

A content update counts as one write (same cost as a fresh write). A project-only update does NOT count toward the writes-per-month quota.

Memory Delete

DELETE /v1/memory/delete

Delete one or more memories permanently. This action cannot be undone.

https://api.ragionex.com/v1/memory/delete

Request Body

ParameterTypeRequiredDescription
ids array required Array of memory IDs to delete (1-50 IDs)

Example Request

import requests

response = requests.delete(
    "https://api.ragionex.com/v1/memory/delete",
    headers={"X-API-Key": "rgx_memory_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},
    json={
        "ids": ["mem_K7X2P9Q4R1"]
    }
)
data = response.json()

Response

Response 200 OK
{
  "success": true,
  "deleted": 1
}

Memory Status

GET /v1/memory/status/{memory_id}

Check the processing status of a specific memory.

https://api.ragionex.com/v1/memory/status/{memory_id}

Path Parameters

ParameterTypeRequiredDescription
memory_id string required The memory ID to check

Example Request

import requests

response = requests.get(
    "https://api.ragionex.com/v1/memory/status/mem_K7X2P9Q4R1",
    headers={"X-API-Key": "rgx_memory_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
)
data = response.json()

Response

Response 200 OK
{
  "success": true,
  "id": "mem_K7X2P9Q4R1",
  "status": "ready"
}

Status Values

StatusDescription
processingMemory is processing. Not yet searchable.
readyMemory is ready and searchable.
failedProcessing failed. Contact support.

Memory Projects

GET /v1/memory/projects

List all distinct projects for the authenticated user, including the memory count for each project. Useful for AI agents to self-discover available project names before writing or searching.

https://api.ragionex.com/v1/memory/projects

Example Request

import requests

response = requests.get(
    "https://api.ragionex.com/v1/memory/projects",
    headers={"X-API-Key": "rgx_memory_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
)
data = response.json()

Response

Response 200 OK
{
  "success": true,
  "projects": [
    { "name": "acme-app", "memory_count": 45 },
    { "name": "blog-backend", "memory_count": 12 },
    { "name": "mobile-app", "memory_count": 8 }
  ]
}

Rename Project

PATCH /v1/memory/projects/{name}

Bulk-rename a project. Every memory updates atomically. Fast even at thousands of entries.

https://api.ragionex.com/v1/memory/projects/{name}

Path Parameters

ParameterTypeRequiredDescription
name string required Current project name (the one being renamed)

Request Body

ParameterTypeRequiredDescription
new_name string required New project name. Same format as project field (lowercase alphanumeric + hyphen, 1-50 chars).

Example Request

import requests

response = requests.patch(
    "https://api.ragionex.com/v1/memory/projects/acme-app",
    headers={"X-API-Key": "rgx_memory_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},
    json={
        "new_name": "acme-mobile"
    }
)
data = response.json()

Response

Response 200 OK
{
  "success": true,
  "renamed": 45,
  "from": "acme-app",
  "to": "acme-mobile"
}
Response 404 - Project Not Found
{
  "success": false,
  "error": "Project 'acme-app' does not exist for this user"
}

Delete Project

DELETE /v1/memory/projects/{name}

Delete a project and all its memories. This removes every memory with the given project name and every memory it contains. This action cannot be undone.

https://api.ragionex.com/v1/memory/projects/{name}
Destructive operation

This endpoint permanently deletes all memories in the project. Agents should confirm with the user before calling it.

Path Parameters

ParameterTypeRequiredDescription
name string required Project name to delete

Example Request

import requests

response = requests.delete(
    "https://api.ragionex.com/v1/memory/projects/acme-app",
    headers={"X-API-Key": "rgx_memory_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
)
data = response.json()

Response

Response 200 OK
{
  "success": true,
  "deleted": 45
}
Response 404 - Project Not Found
{
  "success": false,
  "error": "Project 'acme-app' does not exist for this user"
}