---
title: "Update Memory"
method: PATCH
path: "/api/agents/{agent_id}/memories/{memory_id}"
tags: ["agent-memories"]
---

# Update Memory

`PATCH /api/agents/{agent_id}/memories/{memory_id}`

## Request

- Base URL: `https://api.tintin-x.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tintin-x.com/api/agents/{agent_id}/memories/{memory_id}`
- Auth: HTTP bearer

Pin/unpin, edit text, or change kind.

Confidence is admin-only — silently ignored for non-admins (we don't
raise so the same UI form works for both admin and user). Admin
detection: `user.is_admin` flag on the User model.

## Path parameters

- `agent_id` string, uuid, required
- `memory_id` string, uuid, required

## Request body

- MemoryUpdate: User-facing PATCH payload — pin/unpin, edit text/kind, owner-only. `confidence` adjustments are admin-only — the route layer enforces that. We accept the field here so admins can pass it through the same shape.
  - `text` string, nullable
  - `kind` 'preference' | 'fact' | 'instruction' | 'observation' | 'skill_outcome', nullable
  - `pinned` boolean, nullable
  - `confidence` number, nullable

## Response `200`

Successful Response

- MemoryItem: A single memory row — what list/detail endpoints return.
  - `id` string, uuid, required
  - `agent_id` string, uuid, required
  - `user_id` string, uuid, nullable, required
  - `text` string, required
  - `kind` 'preference' | 'fact' | 'instruction' | 'observation' | 'skill_outcome', required
  - `source` 'chat_user_explicit' | 'chat_inferred' | 'heartbeat' | 'admin' | 'skill' | 'memory_md' | 'memory_dir', required
  - `source_message_id` string, uuid, nullable, required
  - `confidence` number, required
  - `pinned` boolean, required
  - `hit_count` integer, required
  - `last_recalled_at` string, date-time, nullable, required
  - `expires_at` string, date-time, nullable, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/tintin-x/apis/tintin-api.md) · [All operations](https://skmtc.dev/tintin-x/apis/tintin-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tintin-x/apis/tintin-api/revisions/8839a8d0a66c?raw)
