Delete Learning User

Storage and identity

Use a registered database with learning methods. Specify db_id when several databases are available; table also requires db_id. RemoteDb and adapters without learning support return 501.

Human JWT callers are scoped when user isolation is enabled. Non-admin service-account PAT callers always self-scope. Scoped readers can access their own and shared records; other-owned records return 404. Shared records cannot be modified or deleted by a scoped caller (403). Admins and unscoped callers retain access under the deployment's authentication and permission configuration.

A scoped caller can delete only their own user's records; a different path user_id returns 403. Unowned shared records are unaffected. 204 also covers a user with no matching records.

DELETE/learnings/users/{user_id}

Delete the learning records owned by a user. By default removes every learning type backed by the agno_learnings table (user_profile, user_memory, and any user-scoped entity records); pass learning_type to restrict deletion to a single store. Records with no owner (user_id IS NULL) are not affected. For a scoped (non-admin) caller, only their own learnings may be deleted; a different user_id is rejected with 403. Admins and unscoped callers may delete any user's learnings. Returns 204 even if the user had no matching records.

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

user_id*User Id

The user whose learnings should be deleted

Query Parameters

learning_type?|

Restrict deletion to a single learning type; omit to delete all of the user's learnings

db_id?|

Database ID to use

table?|

The database table to use (requires db_id)

Response Body

application/json

application/json

application/json

application/json

application/json

curl --request DELETE 'https://example.com/learnings/users/string'
Empty