Skip to main content
POST
/
api
/
v1
/
memory
/
get
Get Memory
curl --request POST \
  --url https://api.example.com/api/v1/memory/get \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_id": "<string>",
  "agent_id": "<string>",
  "app_id": "default",
  "project_id": "default",
  "page": 1,
  "page_size": 20,
  "sort_by": "timestamp",
  "sort_order": "desc",
  "filters": {
    "AND": [
      "<unknown>"
    ],
    "OR": [
      "<unknown>"
    ]
  }
}
'
{
  "request_id": "<string>",
  "data": {
    "episodes": [
      {
        "id": "<string>",
        "user_id": "<string>",
        "session_id": "<string>",
        "timestamp": "2023-11-07T05:31:56Z",
        "summary": "<string>",
        "subject": "<string>",
        "episode": "<string>",
        "type": "<string>",
        "app_id": "default",
        "project_id": "default",
        "sender_ids": [
          "<string>"
        ]
      }
    ],
    "profiles": [
      {
        "id": "<string>",
        "user_id": "<string>",
        "profile_data": {},
        "app_id": "default",
        "project_id": "default"
      }
    ],
    "agent_cases": [
      {
        "id": "<string>",
        "agent_id": "<string>",
        "session_id": "<string>",
        "task_intent": "<string>",
        "approach": "<string>",
        "quality_score": 123,
        "timestamp": "2023-11-07T05:31:56Z",
        "app_id": "default",
        "project_id": "default",
        "key_insight": "<string>"
      }
    ],
    "agent_skills": [
      {
        "id": "<string>",
        "agent_id": "<string>",
        "name": "<string>",
        "description": "<string>",
        "content": "<string>",
        "confidence": 123,
        "maturity_score": 123,
        "app_id": "default",
        "project_id": "default",
        "source_case_ids": [
          "<string>"
        ]
      }
    ],
    "total_count": 0,
    "count": 0
  }
}

Body

application/json

Request body for POST /api/v1/memory/get. Identify the memory owner via user_id XOR agent_id — exactly one must be set.

memory_type
enum<string>
required

The four kinds enumerated by /get. episode and profile are user-owned; agent_case and agent_skill are agent-owned.

Available options:
episode,
profile,
agent_case,
agent_skill
user_id
string | null
Minimum string length: 1
agent_id
string | null
Minimum string length: 1
app_id
string
default:default
project_id
string
default:default
page
integer
default:1
Required range: x >= 1
page_size
integer
default:20
Required range: 1 <= x <= 100
sort_by
enum<string>
default:timestamp
Available options:
timestamp,
updated_at
sort_order
enum<string>
default:desc
Available options:
asc,
desc
filters
FilterNode · object

One Filters DSL node. Recursive AND / OR arrays mix with arbitrary scalar fields at the same level.

Response

Successful Response

Top-level response envelope.

request_id
string
required
data
GetData · object
required

Body of response.data. All four arrays are always present so client code can iterate without branching on memory_type.