> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-studio-tools-doc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Learning

> 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.



## OpenAPI

````yaml patch /learnings/{learning_id}
openapi: 3.1.0
info:
  title: Agno API Reference
  description: The all-in-one, private, secure agent platform that runs in your cloud.
  version: 2.5.6
servers: []
security: []
paths:
  /learnings/{learning_id}:
    patch:
      tags:
        - Learnings
      summary: Update Learning
      description: >-
        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.
      operationId: update_learning
      parameters:
        - name: learning_id
          in: path
          required: true
          schema:
            type: string
            description: The learning ID
            title: Learning Id
          description: The learning ID
        - name: db_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Database ID to use
            title: Db Id
          description: Database ID to use
        - name: table
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The database table to use (requires db_id)
            title: Table
          description: The database table to use (requires db_id)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LearningUpdate'
      responses:
        '200':
          description: Learning updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LearningResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    LearningUpdate:
      properties:
        content:
          anyOf:
            - type: object
            - type: 'null'
          title: Content
          description: Replacement content payload
        metadata:
          anyOf:
            - type: object
            - type: 'null'
          title: Metadata
          description: Replacement metadata
      type: object
      title: LearningUpdate
      description: >-
        Request body for updating a learning record. Identity fields are
        immutable.
    LearningResponse:
      properties:
        learning_id:
          type: string
          title: Learning Id
          description: Unique identifier for the learning record
        learning_type:
          type: string
          title: Learning Type
          description: Type of learning (e.g. 'user_profile', 'entity_memory')
        namespace:
          anyOf:
            - type: string
            - type: 'null'
          title: Namespace
          description: Namespace for scoping ('user', 'global', or custom)
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
          description: Associated user ID
        agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Id
          description: Associated agent ID
        team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Id
          description: Associated team ID
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
          description: Associated session ID
        entity_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Entity Id
          description: Associated entity ID (for entity-specific learnings)
        entity_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Entity Type
          description: Entity type (e.g. 'person', 'company')
        content:
          anyOf:
            - type: object
            - type: 'null'
          title: Content
          description: The learning content payload
        metadata:
          anyOf:
            - type: object
            - type: 'null'
          title: Metadata
          description: Optional metadata
        created_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created At
          description: Creation timestamp (Unix epoch seconds)
        updated_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Updated At
          description: Last update timestamp (Unix epoch seconds)
      type: object
      required:
        - learning_id
        - learning_type
      title: LearningResponse
      description: A single learning record as returned by the API.
    UnauthenticatedResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: UnauthenticatedResponse
      example:
        detail: Unauthenticated access
        error_code: UNAUTHENTICATED
    ForbiddenResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: ForbiddenResponse
      example:
        detail: Cannot list learnings for another user
        error_code: FORBIDDEN
    NotFoundResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: NotFoundResponse
      example:
        detail: Not found
        error_code: NOT_FOUND
    ValidationErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: ValidationErrorResponse
      example:
        detail: Validation error
        error_code: VALIDATION_ERROR
    InternalServerErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: InternalServerErrorResponse
      example:
        detail: Internal server error
        error_code: INTERNAL_SERVER_ERROR
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````