User events in Memobase are stored as a sequence of experiences, each enriched with tags. By default, events are retrieved in chronological order, but Memobase also provides a powerful search function to find events based on a query.

You can perform a semantic search to find events related to a specific topic or concept.

# To use the Python SDK, first install the package:
# pip install memobase

from memobase import MemoBaseClient

client = MemoBaseClient(project_url='YOUR_PROJECT_URL', api_key='YOUR_API_KEY')
user = client.get_user('some_user_id')

# Search for events related to the user's emotions
events = user.search_event("Anything about my emotions")
print(events)

This query will return events where the user discussed their emotions, events that were automatically tagged with an emotion tag, or events that updated profile slots related to emotion.

For a detailed list of search parameters, please refer to the API documentation.