---
title: "Add to the golden set"
method: POST
path: "/api/agent-examples"
tags: ["agent_examples"]
---

# Add to the golden set

`POST /api/agent-examples`

## Request

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

Add to the golden set: Remember this reply (message_sid, a message of ours that went out, the lead's message before it as the situation: 201, or 200 already_exists when the set held it and it was promoted to golden) or a pair typed by hand (situation, answer, kind), born golden. 409 message_not_sent, message_has_no_situation.

Contract:
- MCP tool `create_agent_example`, registry package `mcp.unibox/agent_examples`, mount `unibox.agent-memory`.
- Operation `create`, response envelope `create`.
- Flags: none.

## Request body

- CreateAgentExampleRequest: Request body of `create_agent_example`.
  - `agent_sid` string: The AI SDR it is made for (ub_ag_…, block 10, 2026-10-30); left out, the team's default agent.
  - `message_sid` string: Remember this reply: a message of ours that went out (ub_ms_…) becomes a golden row, the lead's message before it the situation; promoted when held already. 409 message_not_sent, message_has_no_situation. Takes note, not the fields below.
  - `situation` string: A pair typed by hand: what the lead wrote, 1..4000 chars, names as placeholders ({lead}, {lead_company}, {sender}). Required with answer.
  - `answer` string: The team's answer to it, 1..8000 chars. Required with situation.
  - `kind` 'reply' | 'followup': reply (default) or followup.
  - `context_before` string, nullable: Our message before the lead's, max 1500 chars.
  - `channel` 'linkedin' | 'email', nullable: The channel it answers on; omit for every channel.
  - `scenario_key` string, nullable: The scenario the situation belongs to (interested, objection, ...).
  - `note` string, nullable: When the row applies, in a person's words, max 512 chars.

## Response `200`

`create` success envelope.

- CreateAgentExampleResponse
  - `success` true, required
  - `operation` 'create', required
  - `item` object, required
    - `sid` string, required: Golden set row sid (ub_eg_…).
    - `team_sid` string, required: Owning team (ts_tm_…, external - gs.service.id).
    - `agent_sid` string, nullable, required: The AI SDR whose Golden set the row is in (ub_ag_…, block 10, 2026-10-30); null on a row from before, read as the team's default's.
    - `tier` 'golden' | 'auto', required: golden: a person vouched for it (Remember, a pair by hand, a Keep, a promotion), picked ahead; auto: learned by rule from the team's own sends.
    - `source` 'history' | 'own_send' | 'approved_edit' | 'remembered' | 'document' | 'manual', required: history (the history walk's harvest), own_send (a person's reply in a live thread), approved_edit (an agent draft a person edited), remembered, manual (a pair typed by hand), document (kept from a conversations upload, block AC5).
    - `kind` 'reply' | 'followup', required: reply: the team's answer to the lead's message; followup: our message after the lead went quiet.
    - `situation` string, required: What the answer responds to: the lead's message(s), or our unanswered message for a follow-up. Names are placeholders: {lead}, {lead_company}, {sender}.
    - `answer` string, required: The team's answer as it went out (or as the person wrote it), names as placeholders.
    - `sender_profile_sid` string, nullable, required: The sender profile that answered (ub_sp_…); null on a pair typed by hand.
    - `conversation_sid` string, nullable, required: The thread the pair was read from (ub_cv_…); null on a pair typed by hand.
    - `message_sid` string, nullable, required: The outbound message the answer is (ub_ms_…); one row per message. Null on a pair typed by hand.
    - `document_sid` string, nullable, required: The conversations upload the dialogue was kept from (ub_cu_…, block AC5); null on every other source.
    - `channel` 'linkedin' | 'email', nullable, required: The channel the answer went on; null on a pair typed by hand (read on every channel).
    - `scenario_key` string, nullable, required: The classified scenario of the situation (interested, objection, ...) when known.
    - `context_before` string, nullable, required: Our message before the lead's, the context the situation reads against; null on a follow-up.
    - `draft_text` string, nullable, required: approved_edit only: the agent's draft before the person's edit, beside the answer they sent.
    - `note` string, nullable, required: A person's note on when the row applies, max 512 chars.
    - `seen_count` integer, required: How often the same answer was met across the team's threads.
    - `used_count` integer, required: How many agent turns the row was shown to.
    - `last_used_at` string, nullable, required: ISO 8601 UTC of the last turn that read it; null when none did.
    - `answered_at` string, nullable, required: ISO 8601 UTC, when the answer went out.
    - `embedding_state` 'pending' | 'ready' | 'failed', required: pending until the vector is written, ready when the pick can read it, failed after three tries (an edit of the situation sends it back to pending).
    - `embedding_model` string, nullable, required: provider/model that wrote the vector; null while pending.
    - `golden_by` object, nullable, required: Who made the row golden; null on an auto row.
      - `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.
    - `golden_at` string, nullable, required: ISO 8601 UTC, when it became golden; null on an auto row.
    - `proposed_at` string, nullable, required: Set while an edited draft waits for a person's Keep (From your edits): such a row is never picked. Null once in the set.
    - `created_by` object, required: The actor whose write bore the row (the system for the harvest).
      - `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.
    - `deleted_by` object, nullable, required: Who forgot it; null on a live row.
      - `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.
    - `created_at` string, required: ISO 8601 UTC.
    - `updated_at` string, required: ISO 8601 UTC.
    - `deleted_at` string, nullable, required: ISO 8601 UTC once forgotten; null on a live row.
  - `already_exists` boolean, 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.

## 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)
