Skip to main content
POST
/
list-memories
curl -X POST "https://api.magpipe.ai/functions/v1/list-memories" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "123e4567-e89b-12d3-a456-426614174000",
    "limit": 50,
    "offset": 0
  }'
{
  "memories": [
    {
      "id": "789e0123-e89b-12d3-a456-426614174000",
      "contact_phone": "+14155551234",
      "contacts": {
        "id": "abc12345-e89b-12d3-a456-426614174000",
        "name": "Sarah Johnson",
        "phone_number": "+14155551234"
      },
      "summary": "Regular customer who had delivery issues with order #4521. Issue was resolved. Prefers email follow-ups.",
      "key_topics": ["orders", "delivery", "refunds"],
      "preferences": {
        "contact_method": "email",
        "best_time": "afternoons"
      },
      "relationship_notes": null,
      "interaction_count": 3,
      "sms_interaction_count": 0,
      "semantic_match_count": 1,
      "last_updated": "2024-01-15T14:30:00Z"
    }
  ],
  "total": 1,
  "has_more": false
}
Retrieve all stored conversation memories for a specific agent. Each memory represents the relationship with a unique caller.

Request Body

agent_id
string
required
UUID of the agent to list memories for
limit
integer
default:50
Maximum number of results to return
offset
integer
default:0
Pagination offset

Response

Returns an object with an array of memory records and pagination info.
memories
array
Array of memory objects
memories[].id
string
UUID of the memory record
memories[].contact_phone
string
Phone number of the caller
memories[].contacts
object
Contact information
  • id - Contact UUID
  • name - Contact name
  • phone_number - Phone number in E.164 format
memories[].summary
string
AI-generated summary of the relationship with this caller
memories[].key_topics
array
List of key topics discussed across conversations
memories[].preferences
object
Caller’s stated preferences (contact method, language, etc.)
memories[].relationship_notes
string
Additional notes about the relationship
memories[].interaction_count
integer
Number of voice conversations with this caller
memories[].sms_interaction_count
integer
Number of SMS interactions with this caller
memories[].semantic_match_count
integer
Number of semantic memory matches
memories[].last_updated
string
ISO 8601 timestamp of last interaction
total
integer
Total number of memories for this agent
has_more
boolean
Whether more results are available
curl -X POST "https://api.magpipe.ai/functions/v1/list-memories" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "123e4567-e89b-12d3-a456-426614174000",
    "limit": 50,
    "offset": 0
  }'
{
  "memories": [
    {
      "id": "789e0123-e89b-12d3-a456-426614174000",
      "contact_phone": "+14155551234",
      "contacts": {
        "id": "abc12345-e89b-12d3-a456-426614174000",
        "name": "Sarah Johnson",
        "phone_number": "+14155551234"
      },
      "summary": "Regular customer who had delivery issues with order #4521. Issue was resolved. Prefers email follow-ups.",
      "key_topics": ["orders", "delivery", "refunds"],
      "preferences": {
        "contact_method": "email",
        "best_time": "afternoons"
      },
      "relationship_notes": null,
      "interaction_count": 3,
      "sms_interaction_count": 0,
      "semantic_match_count": 1,
      "last_updated": "2024-01-15T14:30:00Z"
    }
  ],
  "total": 1,
  "has_more": false
}