Memory

Search memory for the specified session.

POST
Search memory for the specified session.

Path parameters

sessionIdstringRequired
The ID of the session for which memory should be searched.

Query parameters

limitintegerOptional
The maximum number of search results to return. Defaults to None (no limit).

Request

This endpoint expects an object.
metadata
map from strings to anyOptional
Metadata Filter
min_score
doubleOptional
mmr_lambda
doubleOptional
search_scope
enumOptional
Allowed values: messagessummaryfacts
search_type
enumOptional
Allowed values: similaritymmr
text
stringOptional

Response

This endpoint returns a list of objects
message
objectOptional
metadata
map from strings to anyOptional
score
doubleOptional
summary
objectOptional

Errors

POST
1curl -X POST https://api.getzep.com/api/v2/sessions/sessionId/search \
2 -H "Authorization: Api-Key <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{}'
1[
2 {
3 "message": {
4 "content": "content",
5 "created_at": "created_at",
6 "role": "role",
7 "role_type": "norole",
8 "token_count": 1,
9 "updated_at": "updated_at",
10 "uuid": "uuid"
11 },
12 "metadata": {
13 "metadata": {
14 "key": "value"
15 }
16 },
17 "score": 1.1,
18 "summary": {
19 "content": "content",
20 "created_at": "created_at",
21 "related_message_uuids": [
22 "related_message_uuids"
23 ],
24 "token_count": 1,
25 "uuid": "uuid"
26 }
27 }
28]