---
title: "Search past investigation memories for the closest CANDIDATES — for the agent to judge for itself, not a ranked answer"
method: POST
path: "/v1/agent-memory/search"
tags: ["Agent Memory"]
---

# Search past investigation memories for the closest CANDIDATES — for the agent to judge for itself, not a ranked answer

`POST /v1/agent-memory/search`

## Request

- Base URL: `https://docs.grepr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.grepr.ai/v1/agent-memory/search`
- Auth: none declared

## Request body

- MemorySearchRequest
  - `agentId` string
  - `entityTags` object
  - `includeVocabulary` boolean
  - `limit` integer
  - `mode` 'SEMANTIC' | 'TEXT' | 'TIMELINE': The retrieval strategy. Leave it out for the server to pick: SEMANTIC when the agent searched has a semantic-search store and TEXT when it has none.
  - `query` string
  - `recordedAfter` string, date-time
  - `significances` string[], required
  - `verbosity` 'COMPACT' | 'FULL'

## Response `200`

Search results

- MemorySearchResponse
  - `entityTagVocabulary` object
  - `hasMore` boolean
  - `note` string
  - `preamble` string
  - `results` MemorySearchResult[]
    - `ageDays` integer
    - `agentId` string
    - `investigationId` string
    - `lastSeenAt` string, date-time
    - `lastSeenDays` integer
    - `matchedOn` 'SEMANTIC' | 'TEXT' | 'TIMELINE' | 'LOOKUP'
    - `recencyLabel` 'ACTIVE' | 'RECENT' | 'HISTORICAL'
    - `recordedAt` string, date-time
    - `recurrenceCount` integer
    - `resolution` string
    - `review` MemoryReview
      - `editedAt` string, date-time
      - `verdictAt` string, date-time
      - `verdictNote` string
    - `rootCause` string
    - `rootCauseConfidence` 'CONFIRMED' | 'SUSPECTED' | 'UNKNOWN'
    - `ruledOut` string
    - `score` number, double
    - `significance` 'INCIDENT' | 'OBSERVATION' | 'INCONCLUSIVE' | 'BENIGN'
    - `symptoms` string
    - `tags` object
    - `title` string
  - `semanticSearchUnavailable` boolean
  - `verbosity` 'COMPACT' | 'FULL'

---

[API](https://skmtc.dev/grepr/apis/grepr-api.md) - [All operations](https://skmtc.dev/grepr/apis/grepr-api/llms.txt) - [OpenAPI document](https://skmtc.dev/grepr/apis/grepr-api/revisions/2a5ce03a0bf0?raw)
