---
title: "🔒 #25987 Изменение записи памяти агентов: поля, уровень и область, модерация (verified, shared - только администратор). version - версия, которую видел пользователь; запись изменилась после чтения - отказ."
method: POST
path: "/agent-memory/update"
tags: ["AgentMemory"]
---

# 🔒 #25987 Изменение записи памяти агентов: поля, уровень и область, модерация (verified, shared - только администратор). version - версия, которую видел пользователь; запись изменилась после чтения - отказ.

`POST /agent-memory/update`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/agent-memory/update`
- Auth: one of:
  - API key in header `sid` and API key in header `rts` and API key in header `sig`
  - HTTP bearer

#25987 Изменение записи памяти агентов: поля, уровень и область, модерация (verified, shared - только администратор). version - версия, которую видел пользователь; запись изменилась после чтения - отказ.

**Access:** `authorized` (10 ) · **Scope:** `write`

**Allows:** `memory:write`, `memory:moderate` (все обязательны; проверка в команде по ресурсу из запроса)

### TypeScript (copy-paste)

**`POST /agent-memory/update`**

<details open><summary><b>Params</b></summary>

```typescript
export interface AgentMemoryUpdateParams {
  ID: string
}
```

</details>

<details open><summary><b>Body</b></summary>

```typescript
export interface AgentMemoryUpdateBody {
  /** Unix timestamp in milliseconds */
  version: number
  level?: AgentMemory_Level | null
  projectID?: string | null
  repositoryID?: string | null
  load?: AgentMemory_Load | null
  jobs?: Array<AgentMemory_Job> | null
  title?: string | null
  text?: string | null
  verified?: boolean | null
  shared?: boolean | null
}
```

</details>

<details open><summary><b>Response</b></summary>

```typescript
export type AgentMemoryUpdateResponse = IServerResponse<Record<string, any>>

export interface IServerResponse<T = any> {
  code: number
  data: T
  srvTS: number
  rkey: string
}
```

</details>

> Полный файл типов: [`/docs/types`](/docs/types) · raw: [`/docs/api-types.ts`](/docs/api-types.ts)

## Query parameters

- `ID` string, uuid, required

## Headers

- `devID` string, uuid, required
- `tz` string, required
- `app` string, required
- `appVer` string, required
- `rKey` string

## Request body

- AgentMemoryUpdateBody: JSON body for `agent-memory/update`
  - `version` integer, required: Unix timestamp in milliseconds
  - `level` 'company' | 'user' | 'project' | 'repository': `company` = "company", `user` = "user", `project` = "project", `repository` = "repository"
  - `projectID` string, uuid, nullable
  - `repositoryID` string, uuid, nullable
  - `load` 'always' | 'job' | 'request': `always` = "always", `job` = "job", `request` = "request"
  - `jobs` AgentMemoryJob[], nullable
  - `title` string, nullable
  - `text` string, nullable
  - `verified` boolean, nullable
  - `shared` boolean, nullable

## Response `200`

OK — `IServerResponse<Record<string, any>>`

- object
  - `code` integer, required
  - `data` object, required: Response payload (нет ResponseData / doc.schema)
  - `srvTS` integer, required: Server timestamp (ms)
  - `rkey` string, required: Request key

## Other responses

- `400`: BadRequest / Validation — неверные params/body/headers
- `401`: Unauthorized: Active user session required
- `403`: AccessNotAllowed: Privilege memory:write required (own record), memory:moderate - foreign record and moderation
- `404`: NotFound: Memory record not found
- `406`: TimeResync — расхождение rts с сервером
- `422`: UnprocessableContent: Invalid fields (no jobs for job/request) or the record changed since it was read

---

[API](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api.md) · [All operations](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/revisions/a143b51ba29a?raw)
