---
title: "Replace an agent's memory notes"
method: PUT
path: "/v1/personal-agents/{id}/memory"
tags: ["Agents"]
---

# Replace an agent's memory notes

`PUT /v1/personal-agents/{id}/memory`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/personal-agents/{id}/memory`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Replaces all of the agent's memory notes at once. Only the owner or a manager can do this. Send the version you read as expectedVersion; a 409 means someone changed the notes since, so read them again.

## Path parameters

- `id` string, required

## Request body

- SetPersonalAgentMemory
  - `notes` string, required
  - `expectedVersion` integer, required

## Response `200`

The agent's notes and routine progress.

- PersonalAgentMemory
  - `notes` string, required
  - `version` integer, required: Send it back when saving; a save against an older version is refused.
  - `updatedAt` string, date-time, nullable, required
  - `updatedBy` PersonalAgentPerson, nullable, required
    - `memberId` string, required
    - `name` string, required
  - `canEdit` boolean, required: The caller is the owner or a manager.
  - `routines` object[], required: What each routine's last run for the owner did.
    - `routineId` string, required
    - `name` string, required
    - `state` string, required
    - `updatedAt` string, date-time, required

## Other responses

- `403`: You cannot edit this memory.
- `404`: Not found.
- `409`: Someone else changed the memory. Reload it and try again.

## Changes

- **2026-11-26** `bc0092687a7b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/personal-agents/:id/memory/put.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/84fb0f99fb95?raw)
