Skip to main content
GET
/
api
/
profiles
/
{id}
/
memories
{
  "memories": [
    {
      "id": "mem-123",
      "content": "Working on microservices migration at work",
      "type": "event",
      "importance": 0.8,
      "decayFactor": 0.95,
      "createdAt": "2024-01-14T00:00:00Z",
      "lastAccessedAt": "2024-01-15T00:00:00Z"
    },
    {
      "id": "mem-124",
      "content": "Prefers async/await patterns over callbacks",
      "type": "preference",
      "importance": 0.6,
      "decayFactor": 1.0,
      "createdAt": "2024-01-10T00:00:00Z",
      "lastAccessedAt": null
    }
  ]
}

Overview

Returns memories associated with a user profile, sorted by importance and recency.

Path Parameters

id
string
required
Profile ID

Query Parameters

type
string
Filter by memory type: fact, preference, event, context
limit
number
default:"20"
Maximum number of memories to return

Response

{
  "memories": [
    {
      "id": "mem-123",
      "content": "Working on microservices migration at work",
      "type": "event",
      "importance": 0.8,
      "decayFactor": 0.95,
      "createdAt": "2024-01-14T00:00:00Z",
      "lastAccessedAt": "2024-01-15T00:00:00Z"
    },
    {
      "id": "mem-124",
      "content": "Prefers async/await patterns over callbacks",
      "type": "preference",
      "importance": 0.6,
      "decayFactor": 1.0,
      "createdAt": "2024-01-10T00:00:00Z",
      "lastAccessedAt": null
    }
  ]
}

Example

# Get all memories
curl https://api.yourserver.com/api/profiles/user-123/memories \
  -H "Authorization: Bearer gp_your_key"

# Get only facts
curl "https://api.yourserver.com/api/profiles/user-123/memories?type=fact&limit=10" \
  -H "Authorization: Bearer gp_your_key"