v29

latestOpenAPI 3.1.0raw.githubusercontent.com2026-01-1415662.1 KB
context

Search for context data in the context processor

This endpoint sends a search request to the context processor to retrieve relevant context data based on the provided query.

post/api/v1/context/search

Query parameters

metadata'true' | 'false'

Controls whether metadata is included in the response:

  • metadata=true → metadata will be included in each context item in the response.
  • metadata=false (or omitted) → metadata will be excluded from the response for better performance.
mode'fast' | 'standard'

Controls the search mode:

  • mode=fast → prioritizes speed over completeness.
  • mode=standard → performs a comprehensive search (default if omitted).

Request body

user_idstring

The ID of the user making the request

querystring required

The search query used to search for context data

similarity_thresholdnumber required

Maximum similarity threshold (must be >= minimum_similarity_threshold)

minimum_similarity_thresholdnumber required

Minimum similarity threshold

scope'internal' | 'external'

Search scope

body_metadataobject

Additional metadata for the search

Example request

{
  "user_id": "user123",
  "query": "search query for user preferences",
  "similarity_threshold": 0.8,
  "minimum_similarity_threshold": 0.5
}

Response

Context search request successfully processed. Response structure varies based on metadata query parameter: if metadata=true, each context includes metadata; if metadata=false or omitted, metadata is excluded from the response.