Search V1
Search through memories with authentication required.
**Authentication Required**:
One of the following authentication methods must be used:
- Bearer token in `Authorization` header
- API Key in `X-API-Key` header
- Session token in `X-Session-Token` header
**Response Format Options**:
Choose between standard JSON or TOON (Token-Oriented Object Notation) format:
- **JSON (default)**: Standard JSON response format
- **TOON**: Optimized format achieving 30-60% token reduction for LLM contexts
- Use `response_format=toon` query parameter
- Returns `text/plain` with TOON-formatted content
- Ideal for LLM integrations to reduce API costs and latency
- Maintains semantic clarity while minimizing token usage
- Example: `/v1/memory/search?response_format=toon`
**Custom Schema Support**:
This endpoint supports both system-defined and custom user-defined node types:
- **System nodes**: Memory, Person, Company, Project, Task, Insight, Meeting, Opportunity, Code
- **Custom nodes**: Defined by developers via UserGraphSchema (e.g., Developer, Product, Customer, Function)
When custom schema nodes are returned:
- Each custom node includes a `schema_id` field referencing the UserGraphSchema
- The response includes a `schemas_used` array listing all schema IDs used
- Use `GET /v1/schemas/{schema_id}` to retrieve full schema definitions including:
- Node type definitions and properties
- Relationship type definitions and constraints
- Validation rules and requirements
**Recommended Headers**:
```
Accept-Encoding: gzip
```
The API supports response compression for improved performance. Responses larger than 1KB will be automatically compressed when this header is present.
**HIGHLY RECOMMENDED SETTINGS FOR BEST RESULTS:**
- Set `enable_agentic_graph: true` for intelligent, context-aware search that can understand ambiguous references
- Use `max_memories: 15-20` for comprehensive memory coverage
- Use `max_nodes: 10-15` for comprehensive graph entity relationships
- Use `response_format: toon` when integrating with LLMs to reduce token costs by 30-60%
**Agentic Graph Benefits:**
When enabled, the system can understand vague references by first identifying specific entities from your memory graph, then performing targeted searches. For example:
- "customer feedback" → identifies your customers first, then finds their specific feedback
- "project issues" → identifies your projects first, then finds related issues
- "team meeting notes" → identifies your team members first, then finds meeting notes
- "code functions" → identifies your functions first, then finds related code
**Role-Based Memory Filtering:**
Filter memories by role and category using metadata fields:
- `metadata.role`: Filter by "user" or "assistant"
- `metadata.category`: Filter by category (user: preference, task, goal, facts, context | assistant: skills, learning)
**User Resolution Precedence:**
- If both user_id and external_user_id are provided, user_id takes precedence.
- If only external_user_id is provided, it will be resolved to the internal user.
- If neither is provided, the authenticated user is used.
Query parameters
HIGHLY RECOMMENDED: Maximum number of memories to return. Use at least 15-20 for comprehensive results. Lower values (5-10) may miss relevant information. Default is 20 for optimal coverage.
HIGHLY RECOMMENDED: Maximum number of memories to return. Use at least 15-20 for comprehensive results. Lower values (5-10) may miss relevant information. Default is 20 for optimal coverage.
HIGHLY RECOMMENDED: Maximum number of neo nodes to return. Use at least 10-15 for comprehensive graph results. Lower values may miss important entity relationships. Default is 15 for optimal coverage.
HIGHLY RECOMMENDED: Maximum number of neo nodes to return. Use at least 10-15 for comprehensive graph results. Lower values may miss important entity relationships. Default is 15 for optimal coverage.
Response format options for API endpoints.
- json: Standard JSON format (default)
- toon: Token-Oriented Object Notation format for 30-60% token reduction in LLM contexts
Response format: 'json' (default) or 'toon' (Token-Oriented Object Notation for 30-60% token reduction in LLM contexts)
Headers
Recommended to use 'gzip' for response compression
Request body
Example request
{
"enable_agentic_graph": false,
"external_user_id": "external_user_123",
"query": "Find recurring customer complaints about API performance from the last month. Focus on issues that multiple customers have mentioned and any specific feature requests or workflow improvements they've suggested.",
"rank_results": true
}Response
Successfully retrieved memories
Example response
{
"code": 200,
"data": {
"memories": [],
"nodes": []
},
"search_id": "abc123def456",
"status": "success"
}Changes
Changed in 20 of the 37 revisions of this API.1234300
- ▲
removed from the
//request propertyanyOflistrequest-property-any-of-removed
- ○
added
subschema #1to the//request propertyanyOflistrequest-property-any-of-added
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ▲
removed
subschema #1from the//request propertyanyOflistrequest-property-any-of-removed
- ○
added to the
//request propertyanyOflistrequest-property-any-of-added
This revision also has 8 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
added the new optional request property
new-optional-request-property
This revision also has 7 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ●
removed the request property
request-property-removed
This revision also has 11 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ●
- ▲
removed from the
//request propertyanyOflistrequest-property-any-of-removed
- ○
added
subschema #1to the//request propertyanyOflistrequest-property-any-of-added
- ▲
- ●
removed the request property
//request-property-removed
- ●
removed the request property
//request-property-removed
- ○
added the new optional request property
//new-optional-request-property
- ○
added the new optional request property
//new-optional-request-property
- ○
added the new optional request property
//new-optional-request-property
- ○
added the new optional request property
//new-optional-request-property
- ○
added the new optional request property
//new-optional-request-property
- ○
the
request property default value changed fromfalsetotruerequest-property-default-value-changed
- ○
the
request property default value changed fromgpt-5-nanotorerank-v3.5request-property-default-value-changed
- ○
the
request property default value changed fromopenaitocohererequest-property-default-value-changed
- ○
request property
deprecatedrequest-property-deprecated
- ○
added the new
noneenum value to the request property//request-property-enum-value-added
- ○
added the new
papr_enhancedenum value to the request property//request-property-enum-value-added
- ○
added the new
papr_maxenum value to the request property//request-property-enum-value-added
This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ●
- ○
added the new optional request property
new-optional-request-property
- ○
for the
queryrequest parametermax_memories, the max was increased from50.00to200.00request-parameter-max-increased
- ○
request property
deprecatedrequest-property-deprecated
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
added the new optional request property
//new-optional-request-property
- ○
added the new optional request property
//new-optional-request-property
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
added the new optional request property
//new-optional-request-property
- ○
added the new optional request property
//new-optional-request-property
- ○
added the new optional request property
new-optional-request-property
- ○
added the optional property
//to the response with the statusresponse-optional-property-added
- ○
added the optional property
//to the response with the statusresponse-optional-property-added
- ○
- ●
removed the request property
request-property-removed
- ○
added the new optional request property
new-optional-request-property
- ○
added the new optional request property
//new-optional-request-property
- ○
added the new optional request property
//new-optional-request-property
- ○
added the new optional request property
//new-optional-request-property
- ○
added the new optional request property
new-optional-request-property
- ○
added the new optional request property
new-optional-request-property
- ○
added the new optional request property
new-optional-request-property
- ○
request property
//deprecatedrequest-property-deprecated
- ○
request property
//deprecatedrequest-property-deprecated
- ○
request property
//deprecatedrequest-property-deprecated
- ○
request property
//deprecatedrequest-property-deprecated
- ○
request property
deprecatedrequest-property-deprecated
- ○
request property
deprecatedrequest-property-deprecated
- ○
request property
//list-of-types was widened by adding typesarrayto media typeapplication/jsonrequest-property-list-of-types-widened
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ○
added the optional property
////to the response with the statusresponse-optional-property-added
- ●