Delete Component
Catalog prerequisites
This operates on the database-backed component catalog configured on AgentOS, not on the in-code agents, teams or workflows lists. It requires a supported synchronous BaseDb adapter with component methods.
Published components can be readable across scoped owners, while writes remain owner-scoped; a visible foreign or shared row can still reject a write with 403. Draft versions require preview access. Saving configuration does not validate model credentials, run tools or deploy a service.
Archive a component
Deletion is a soft archive: configurations and the component ID are retained, and component schedules are cascaded. It does not delete every associated run or session. Normal reads hide archived components; use include_deleted=true to inspect them and Restore Component to restore one.
An optional guard body can check the published pointer:
{"guard": {"current_version": 1}}Use the actual expected value; 0 means no current published version. A stale guard returns 409. This operation rejects a non-null guard.latest_version with 400. If both query and body guards are supplied, they must agree (400 otherwise). Dependency conflicts can also return 409.
/components/{component_id}Soft-delete a component by ID. Component configs and links remain stored.
Authorization
HTTPBearer In: header
Path Parameters
Component ID
Query Parameters
Optional compare-and-set guard on the current version
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Optional compare-and-set guard, matching the other guarded routes
Body for delete. Optional: a bodyless DELETE keeps working.
Delete also accepts the guard as an expected_current_version query
param; this shape exists so the guard reads the same as on every other
guarded component route instead of being silently ignored here.
Response Body
application/json
application/json
application/json
application/json
application/json
curl --request DELETE 'https://example.com/components/string' \ --header 'Content-Type: application/json' \ --data-raw '{}'{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}