---
title: "Search the hints"
method: POST
path: "/api/agent-hints/search"
tags: ["agent_hints"]
---

# Search the hints

`POST /api/agent-hints/search`

## Request

- Base URL: `https://beta.getsales.io/unibox/v1`
- URL: `https://beta.getsales.io/unibox/v1/api/agent-hints/search`
- Auth: HTTP bearer and API key in header `Team-SID`

What the AI SDR's replies needed and did not find: a missing_answer (a question leads ask that nothing in Knowledge answers; fix with create_agent_source) or a no_example (a situation with no close dialogue in the Golden set; fix with create_agent_example), each counted per reply, with counts by status and kind. filter status open is what needs you; include samples adds the newest replies that hit each. page_size 0 returns counts alone.

Contract:
- MCP tool `search_agent_hints`, registry package `mcp.unibox/agent_hints`, mount `unibox.agent-memory`.
- Operation `search`, response envelope `search`.
- Flags: read only.

## Request body

- SearchAgentHintsRequest: Request body of `search_agent_hints`.
  - `filter` object: Field filters, ANDed: {field: {eq | ne | in | nin | gte | lte | gt | lt | is_null}}; q inside it is free text. Omit for every row.
    - `q` string: Words in the subject.
    - `sid` object: Hint sid(s), ub_hn_ prefix.
      - `eq` string: Hint sid (ub_hn_…).
      - `in` string[]
    - `agent_sid` object: The AI SDR the rows belong to (ub_ag_…, block 10, 2026-10-30); left out, the team's default agent.
      - `eq` string
      - `in` string[]
    - `kind` object: missing_answer or no_example.
      - `eq` 'missing_answer' | 'no_example'
      - `in` string[]
    - `goes_to` object: Where the fix lands.
      - `eq` 'knowledge' | 'golden_set'
      - `in` string[]
    - `scenario_key` object: The scenario of the replies that hit it.
      - `eq` string
      - `in` string[]
      - `is_null` boolean
    - `status` object: { eq: "open" } is what needs you; the default lists every status.
      - `eq` 'open' | 'resolved' | 'dismissed'
      - `in` string[]
    - `resolved_by_sid` object: The hints one answer, document or dialogue resolved.
      - `eq` string
      - `in` string[]
      - `is_null` boolean
    - `first_seen` object: ISO 8601 range.
      - `gte` string
      - `lte` string
      - `gt` string
      - `lt` string
    - `last_seen` object: ISO 8601 range of the newest reply that hit it.
      - `gte` string
      - `lte` string
      - `gt` string
      - `lt` string
    - `status_at` object: ISO 8601 range of the last status move (the resolved lately).
      - `gte` string
      - `lte` string
      - `gt` string
      - `lt` string
    - `created_at` object: ISO 8601 range.
      - `gte` string
      - `lte` string
      - `gt` string
      - `lt` string
  - `include` string[]: Relations to attach to every item; omit for the bare rows.
  - `sort` object: One column and its direction; omit for the default order.
    - `field` 'last_seen' | 'first_seen' | 'count' | 'status_at' | 'created_at', required: The column to order by.
    - `direction` 'asc' | 'desc': asc or desc; default desc.
  - `page_size` integer: 0..500, default 50; 0 = counts only, 1 = the first row.
  - `cursor` string, nullable: pagination.next_cursor of the previous page.

## Response `200`

`search` success envelope.

- SearchAgentHintsResponse
  - `success` true, required
  - `operation` 'search', required
  - `items` object[], required
    - `item` object, required
      - `sid` string, required: Hint sid (ub_hn_…).
      - `team_sid` string, required: Owning team (ts_tm_…, external - gs.service.id).
      - `agent_sid` string, required: The team's agent (ub_ag_…).
      - `kind` 'missing_answer' | 'no_example', required: missing_answer: the lead asked something nothing in Knowledge answers above the floor; no_example: no dialogue of the Golden set was close enough for the scenario and the lead's move.
      - `subject` string, required: What was missing, as leads put it: the question (missing_answer), or the lead's message (no_example); up to 500 chars. The same subject in other words is one hint.
      - `goes_to` 'knowledge' | 'golden_set', required: Where the fix lands: knowledge (add an answer: create_agent_source) or golden_set (keep a dialogue: create_agent_example).
      - `scenario_key` string, nullable, required: The scenario of the reply that opened it (objection, info_request, ...); for a no_example, the situation's scenario.
      - `count` integer, required: The real replies that hit it.
      - `first_seen` string, nullable, required: ISO 8601 UTC of the first reply that hit it.
      - `last_seen` string, nullable, required: ISO 8601 UTC of the newest.
      - `samples` object[], required: The newest five replies that hit it, newest first: the run, the thread, the lead's message.
        - `run_sid` string, required: The run that hit the hint (ub_rn_…), a row of search_agent_runs.
        - `conversation_sid` string, required: Its thread (ub_cv_…).
        - `message_sid` string, nullable, required: The lead's message the run answered (ub_ms_…); null when the run carried none.
        - `at` string, nullable, required: ISO 8601 UTC, when the reply hit it.
      - `status` 'open' | 'resolved' | 'dismissed', required: open; resolved (what was missing appeared, or a person said so); dismissed (by a person; opens again when new replies hit it).
      - `status_by` object, nullable, required: Who resolved or dismissed it; the system when the engine resolved it; null while open from birth.
        - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
        - `actor_sid` string, nullable, required
        - `team_sid` string, required
        - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
        - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
        - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
        - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
        - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
        - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
      - `status_at` string, nullable, required: ISO 8601 UTC of the last status move; null while open from birth.
      - `resolved_by_sid` string, nullable, required: What resolved it: a Knowledge answer (ub_an_…), a document (ub_as_…), a dialogue of the Golden set (ub_eg_…), or what a person named; null unless resolved.
      - `history` object[], required: Every status move, oldest first, a dismissal kept when the hint opened again.
        - `status` 'open' | 'resolved' | 'dismissed', required: The status the hint took.
        - `at` string, nullable, required: ISO 8601 UTC.
        - `by` object, nullable, required: Who moved it; the system when the engine did (a reopening, an auto-resolve).
          - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
          - `actor_sid` string, nullable, required
          - `team_sid` string, required
          - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
          - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
          - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
          - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
          - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
          - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
        - `resolved_by_sid` string, nullable, required: On a resolve: what resolved it (an answer ub_an_, a dialogue ub_eg_, or what a person named).
        - `run_sid` string, nullable, required: On a resolve by a fix applied under a reply (apply_agent_fix, block AC7 of 2026-10-27): that reply's run (ub_rn_…); null on every other move.
      - `embedding_state` 'pending' | 'ready' | 'failed', required: ready when the subject's vector is written (the merge and the auto-resolve reach it); pending when the plane did not answer at birth.
      - `embedding_model` string, nullable, required: provider/model that wrote the vector; null while pending.
      - `created_at` string, required: ISO 8601 UTC.
      - `updated_at` string, required: ISO 8601 UTC.
    - `included` object, required
      - `samples` object[]: include samples: the newest replies that hit it, each with its thread's lead.
        - `run_sid` string, required: The run that hit the hint (ub_rn_…), a row of search_agent_runs.
        - `conversation_sid` string, required: Its thread (ub_cv_…).
        - `message_sid` string, nullable, required: The lead's message the run answered (ub_ms_…); null when the run carried none.
        - `at` string, nullable, required: ISO 8601 UTC, when the reply hit it.
        - `lead_name` string, nullable, required: The lead of that thread.
  - `pagination` object, required
    - `next_cursor` string, nullable, required
    - `has_more` boolean, required
    - `total_count` integer, nullable, required
  - `applied_filters` object, required
  - `includes` string[], required
  - `meta` object, required
    - `trace_id` string, required: UUID v7; same 128-bit value as the X-Trace-Id header.
    - `span_id` string, required: 16 hex chars, root span of this request.
    - `timestamp` string, required: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
    - `duration_ms` integer, required: Server-side wall clock.
    - `team_sid` string, nullable: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
    - `actor_type` string, nullable: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
  - `counts` object
    - `total_count` integer, required: Hints matching the filter (full filter scope, not the page).
    - `groups` object, required
      - `status` union, required: Hints by status (open, resolved, dismissed) over the other filters: the tab's segments.
        - object
        - unknown[]
          - unknown
      - `kind` union, required: Hints by kind (missing_answer, no_example): the kind filter.
        - object
        - unknown[]
          - unknown

## Other responses

- `4XX`: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
- `5XX`: MCP error envelope with `error.code` internal_error or service_unavailable.

---

[API](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-unibox.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-unibox/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-unibox/revisions/8f1bc317897f?raw)
