---
title: "Search Session Events"
method: POST
path: "/v2/session-events/search"
tags: ["external", "external-v2"]
---

# Search Session Events

`POST /v2/session-events/search`

## Request body

- SearchSessionEventsRequestSchema
  - `limit` integer, nullable
  - `offset` integer, nullable
  - `session_id` string, uuid, required

## Response `200`

OK

- SearchSessionEventsResponseSchema
  - `results` SessionEventResponseSchema[], required
    - `associated_session_agent_run_id` string, uuid, nullable
    - `data` union, required
      - SessionEventUserActionV1EventDataSchema
        - `kind` 'USER_ACTION_V1', required
        - `value` SessionEventUserActionV1Value, required — V1 version of user message events. Represents messages sent by the user to the session.
          - `context` UserActionV1SessionEventContext — Context for V1 user action session events. Contains additional metadata about the user action.
            - `implicit_mentions` union[], nullable
              - …
            - `kind` 'USER_CONTEXT_V1'
            - `mentions` union[], nullable
              - …
          - `parts` union[], required
            - union
              - …
      - SessionEventAgentPlanningV1EventDataSchema
        - `kind` 'AGENT_PLANNING_V1', required
        - `value` SessionEventAgentPlanningV1Value, required — V1 version of agent output events. Represents the thoughts/outputs associated with an agent at that point in time.
          - `internal_parts` union[]
            - union
              - …
          - `parts` union[], required
            - union
              - …
      - SessionEventAgentDigestV1EventDataSchema
        - `kind` 'AGENT_DIGEST_V1', required
        - `value` SessionEventAgentDigestV1Value, required — V1 version of agent digest events.
          - `parts` union[], required
            - union
              - …
      - SessionEventAgentActionV1EventDataSchema
        - `kind` 'AGENT_ACTION_V1', required
        - `value` union, required
          - SessionEventAgentActionV1Value — V1 version of agent tool invocation events. Represents an action taken by the agent.
            - `completed_at` string, date-time, nullable, required
            - `invoked_at` string, date-time, required
            - `parts` union[], required
              - …
            - `tool_call_args` union, required
              - …
            - `tool_call_id` string, required
            - `tool_call_kind` 'CREATE_NOTE_TOOL_CALL_V1' | 'UPDATE_NOTE_TOOL_CALL_V1' | 'CREATE_COLLECTION_TOOL_CALL_V1' | 'ADD_NOTE_TO_COLLECTION_TOOL_CALL_V1' | 'REMOVE_NOTE_FROM_COLLECTION_TOOL_CALL_V1' | 'MOVE_NOTE_TOOL_CALL_V1' | 'SEARCH_FOR_COLLECTIONS_TOOL_CALL_V1' | 'SEARCH_NOTES_TOOL_CALL_V1' | 'FIND_RELATED_NOTES_TOOL_CALL_V1' | 'MESSAGE_USER_TOOL_CALL_V1' | 'READ_NOTE_TOOL_CALL_V1' | 'RENAME_COLLECTION_TOOL_CALL_V1' | 'UPDATE_COLLECTION_DESCRIPTION_TOOL_CALL_V1' | 'READ_COLLECTION_TOOL_CALL_V1' | 'TRASH_NOTE_TOOL_CALL_V1' | 'RESTORE_NOTE_TOOL_CALL_V1' | 'DELETE_COLLECTION_TOOL_CALL_V1' | 'VIEW_IMAGE_TOOL_CALL_V1' | 'CREATE_FACT_CARD_TOOL_CALL_V1' | 'CREATE_DRAFT_NOTE_TOOL_CALL_V1' | 'GET_HELP_CENTER_INFO_TOOL_CALL_V1' | 'GET_USER_ACCOUNT_STATISTICS_TOOL_CALL_V1' | 'SEARCH_WITHIN_DOCUMENT_TOOL_CALL_V1' | 'RETRIEVE_DOCUMENT_PAGES_TOOL_CALL_V1', required — Enum for different types of agent tool calls with version information.
            - `tool_call_origin` 'MODEL' | 'USER' — Indicates who initiated a tool call. MODEL: The AI model requested this tool call as part of its response. USER: The system initiated this call on behalf of the user (e.g., pre-fetching mentioned content). These are formatted as context in conversation history.
            - `tool_call_result` union, required
              - …
          - SessionEventAgentCommonActionV1Value — Agent action event for BaseAiAgent-backed common tools. Unlike SessionEventAgentActionV1Value, this stores the common tool name and raw JSON args/results directly so V2 chat session history does not need to map back through legacy AgentToolCallKind aliases.
            - `action_schema` 'common_tool_call_v1'
            - `completed_at` string, date-time, nullable, required
            - `invoked_at` string, date-time, required
            - `parts` union[], required
              - …
            - `tool_call_args` object
            - `tool_call_error` string, nullable
            - `tool_call_id` string, required
            - `tool_call_origin` 'MODEL' | 'USER' — Indicates who initiated a tool call. MODEL: The AI model requested this tool call as part of its response. USER: The system initiated this call on behalf of the user (e.g., pre-fetching mentioned content). These are formatted as context in conversation history.
            - `tool_call_result` unknown
            - `tool_call_status` 'in_progress' | 'succeeded' | 'failed' | 'interrupted'
            - `tool_name` string, required
      - SessionEventSystemNotificationV1EventDataSchema
        - `kind` 'SYSTEM_NOTIFICATION_V1', required
        - `value` SessionEventSystemNotificationV1Value, required — V1 version of system notification events. Represents a notification or message from the system.
          - `communication_kind` 'WEB_CLIP_CREATED' | 'API_REQUEST_RECORD_CREATED' | 'QUOTA_LIMIT_REACHED', required
          - `notification_payload` union, required
            - WebClipCreatedNotificationPayload
              - …
            - ApiRequestRecordCreatedNotificationPayload
              - …
            - QuotaLimitReachedNotificationPayload
              - …
          - `parts` union[], required
            - union
              - …
      - SessionEventAgentOutputEventDataSchema
        - `kind` 'AGENT_OUTPUT', required
        - `value` SessionEventAgentOutputValue, required — Represents the thoughts associated with an agent at that point in time. (Often thoughts are associated with a specific tool call, but sometimes the agent just outputs tokens that we want to track for historical context purposes.)
          - `parts` union[], required
            - union
              - …
      - SessionEventExternalInputEventDataSchema
        - `kind` 'EXTERNAL_INPUT', required
        - `value` SessionEventExternalInputValue, required — Represents an external input attached to the session.
          - `parts` union[], required
            - union
              - …
          - `payload` union, required
            - WebClipExternalInputPayload
              - …
            - MemItApiRequestExternalInputPayload
              - …
      - SessionEventAgentToolInvocationEventDataSchema
        - `kind` 'AGENT_TOOL_INVOCATION', required
        - `value` SessionEventAgentToolInvocationValue, required — Roughly maps to Pydantic's ToolCallPart and ToolReturnPart. https://ai.dev/api/messages Represents an action taken by the agent. Note that multiple actions can be performed at the same time. This is created immediately after invocation, and then updated upon completion. Note that it may complete with an error - you'll need to look at the "tool_call_result" field to determine if it was successful.
          - `completed_at` string, date-time, nullable, required
          - `invoked_at` string, date-time, required
          - `parts` union[], required
            - union
              - …
          - `tool_call_args` union, required
            - CreateNoteToolCallArgs
              - …
            - UpdateNoteToolCallArgs
              - …
            - CreateCollectionToolCallArgs
              - …
            - AddNoteToCollectionToolCallArgs
              - …
            - RemoveNoteFromCollectionToolCallArgs
              - …
            - MoveNoteToolCallArgs
              - …
            - SearchForCollectionsToolCallArgs
              - …
            - SearchNotesToolCallArgs
              - …
            - FindRelatedNotesToolCallArgs
              - …
            - FindRelatedNotesToolCallArgsLegacy
              - …
            - MessageUserToolCallArgs
              - …
            - ReadNoteToolCallArgs
              - …
            - RenameCollectionToolCallArgs
              - …
            - UpdateCollectionDescriptionToolCallArgs
              - …
            - ReadCollectionToolCallArgs
              - …
            - DeleteCollectionToolCallArgs
              - …
            - TrashNoteToolCallArgs
              - …
            - RestoreNoteToolCallArgs
              - …
            - ViewImageToolCallArgs
              - …
            - CreateFactCardToolCallArgs
              - …
            - CreateDraftNoteToolCallArgs
              - …
            - GetHelpCenterInfoToolCallArgs
              - …
            - GetUserAccountStatisticsToolCallArgs — Empty args model since this tool doesn't require any parameters.
            - SearchWithinDocumentToolCallArgs
              - …
            - RetrieveDocumentPagesToolCallArgs
              - …
          - `tool_call_id` string, required
          - `tool_call_kind` 'CREATE_NOTE_TOOL_CALL_V1' | 'UPDATE_NOTE_TOOL_CALL_V1' | 'CREATE_COLLECTION_TOOL_CALL_V1' | 'ADD_NOTE_TO_COLLECTION_TOOL_CALL_V1' | 'REMOVE_NOTE_FROM_COLLECTION_TOOL_CALL_V1' | 'MOVE_NOTE_TOOL_CALL_V1' | 'SEARCH_FOR_COLLECTIONS_TOOL_CALL_V1' | 'SEARCH_NOTES_TOOL_CALL_V1' | 'FIND_RELATED_NOTES_TOOL_CALL_V1' | 'MESSAGE_USER_TOOL_CALL_V1' | 'READ_NOTE_TOOL_CALL_V1' | 'RENAME_COLLECTION_TOOL_CALL_V1' | 'UPDATE_COLLECTION_DESCRIPTION_TOOL_CALL_V1' | 'READ_COLLECTION_TOOL_CALL_V1' | 'TRASH_NOTE_TOOL_CALL_V1' | 'RESTORE_NOTE_TOOL_CALL_V1' | 'DELETE_COLLECTION_TOOL_CALL_V1' | 'VIEW_IMAGE_TOOL_CALL_V1' | 'CREATE_FACT_CARD_TOOL_CALL_V1' | 'CREATE_DRAFT_NOTE_TOOL_CALL_V1' | 'GET_HELP_CENTER_INFO_TOOL_CALL_V1' | 'GET_USER_ACCOUNT_STATISTICS_TOOL_CALL_V1' | 'SEARCH_WITHIN_DOCUMENT_TOOL_CALL_V1' | 'RETRIEVE_DOCUMENT_PAGES_TOOL_CALL_V1', required — Enum for different types of agent tool calls with version information.
          - `tool_call_result` union, required
            - InterruptedToolCallResult
              - …
            - CreateNoteToolCallResult
              - …
            - UpdateNoteToolCallResult
              - …
            - CreateCollectionToolCallResult
              - …
            - AddNoteToCollectionToolCallResult
              - …
            - RemoveNoteFromCollectionToolCallResult
              - …
            - MoveNoteToolCallResult
              - …
            - SearchForCollectionsToolCallResult
              - …
            - SearchNotesToolCallResult
              - …
            - FindRelatedNotesToolCallResult
              - …
            - MessageUserToolCallResult
              - …
            - ReadNoteToolCallResult
              - …
            - UpdateCollectionDescriptionToolCallResult
              - …
            - ReadCollectionToolCallResult
              - …
            - DeleteCollectionToolCallResult
              - …
            - TrashNoteToolCallResult
              - …
            - RestoreNoteToolCallResult
              - …
            - RenameCollectionToolCallResult
              - …
            - ViewImageToolCallResult
              - …
            - CreateFactCardToolCallResult
              - …
            - CreateDraftNoteToolCallResult
              - …
            - GetHelpCenterInfoToolCallResult
              - …
            - GetUserAccountStatisticsToolCallResult
              - …
            - SearchWithinDocumentToolCallResult
              - …
            - RetrieveDocumentPagesToolCallResult
              - …
      - SessionEventUserMessageEventDataSchema
        - `kind` 'USER_MESSAGE', required
        - `value` SessionEventUserMessageValue, required — Represents messages sent by the user to the session.
          - `parts` union[], required
            - union
              - …
      - SessionEventUntypedEventDataSchema — For now, every other session event kind is bucketed as "untyped". (This mainly applies to our "legacy" event kinds.)
        - `kind` 'UNKNOWN' | 'INPUT_ATTACHED' | 'ARTIFACT_CREATED' | 'OPERATION_PERFORMED' | 'MESSAGE_SENT' | 'INPUT_REQUESTED' | 'INPUT_PROVIDED' | 'EXPERIMENTAL', required
        - `value` object, required
    - `id` string, uuid, required
    - `internal_created_at` string, date-time, required
    - `internal_updated_at` string, date-time, required
    - `locally_created_at` string, date-time, required
    - `reply_to_session_event_id` string, uuid, nullable
    - `root_session_event_id` string, uuid, nullable
    - `session_id` string, uuid, required
    - `session_thread_id` string, uuid, nullable
  - `total` integer, required

---

[API](https://skmtc.net/mem/apis/mem-api.md) · [All operations](https://skmtc.net/mem/apis/mem-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mem/mem-api/versions/4023cb07f31f/schema)
