Delete All Content

Select a knowledge base

Register a Knowledge with contents_db on AgentOS, an Agent or a Team. Read the actual generated ID from GET /config under knowledge.knowledge_instances; use that knowledge_id in the request's selector. It is not an arbitrary Knowledge.id. A selector is required when multiple instances make the request ambiguous (400); no configured knowledge base returns 503. If both selectors are supplied, knowledge_id takes precedence over db_id.

Ingestion and search also require suitable readers, vector storage, an embedder where needed, and their dependencies and credentials. See Knowledge.

Content access

Scoped callers can read their own and shared content; other-owned records return 404. JWT user scoping requires user isolation, while non-admin service-account PAT users always self-scope. A scoped caller cannot modify, refresh or delete shared content (403). Authentication alone does not enable JWT user isolation.

Deletion scope

For a scoped caller, this deletes only that caller's content rows; shared rows remain. Admins and unscoped callers clear the whole selected knowledge base. Success returns the JSON string "success". A vector-deletion failure returns 500.

DELETE/knowledge/content

Permanently remove all content from the knowledge base. This is a destructive operation that cannot be undone. Use with extreme caution.

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Query Parameters

db_id?|

Database ID to use

knowledge_id?|

Knowledge base ID to use

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl --request DELETE 'https://example.com/knowledge/content'
null