---
title: "Update Learning"
method: PATCH
path: "/learnings/{learning_id}"
tags: ["Learnings"]
---

# Update Learning

`PATCH /learnings/{learning_id}`

Update a learning record. Only `content` and `metadata` may be modified; identity fields (user_id, agent_id, team_id, etc.) are immutable. Provided fields fully replace the existing values. Records with no owner (`user_id IS NULL` — shared agent/team/session/entity learnings) are readable by any caller but may only be modified by an admin.

## Path parameters

- `learning_id` string, required — The learning ID

## Query parameters

- `db_id` string, nullable — Database ID to use
- `table` string, nullable — The database table to use (requires db_id)

## Request body

- LearningUpdate — Request body for updating a learning record. Identity fields are immutable.
  - `content` object, nullable — Replacement content payload
  - `metadata` object, nullable — Replacement metadata

## Response `200`

Successful Response

- LearningResponse — A single learning record as returned by the API.
  - `learning_id` string, required — Unique identifier for the learning record
  - `learning_type` string, required — Type of learning (e.g. 'user_profile', 'entity_memory')
  - `namespace` string, nullable — Namespace for scoping ('user', 'global', or custom)
  - `user_id` string, nullable — Associated user ID
  - `agent_id` string, nullable — Associated agent ID
  - `team_id` string, nullable — Associated team ID
  - `session_id` string, nullable — Associated session ID
  - `entity_id` string, nullable — Associated entity ID (for entity-specific learnings)
  - `entity_type` string, nullable — Entity type (e.g. 'person', 'company')
  - `content` object, nullable — The learning content payload
  - `metadata` object, nullable — Optional metadata
  - `created_at` integer, nullable — Creation timestamp (Unix epoch seconds)
  - `updated_at` integer, nullable — Last update timestamp (Unix epoch seconds)

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/agno/apis/agno-api-reference.md) · [All operations](https://skmtc.net/agno/apis/agno-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agno/agno-api-reference/revisions/5f6149d395d0/schema)
