Set Current Config Version

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.

Select a published version

Use this to move the current pointer to an existing published version. A draft returns 400, an absent component/version returns 404, and invalid active dependencies can return 409.

An optional request body checks the previous pointer:

{"guard": {"current_version": 1}}

Use the actual expected value; 0 means no current published version. A stale guard returns 409. A non-null guard.latest_version is unsupported here and returns 400. Omitting the guard performs no caller-specified compare-and-set check.

POST/components/{component_id}/configs/{version}/set-current

Set a published config version as current (for rollback).

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

component_id*Component Id

Component ID

version*Version

Version number

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Optional guard; an empty POST keeps working

Body for set-current. Optional: an empty POST keeps working.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl --request POST 'https://example.com/components/string/configs/0/set-current' \  --header 'Content-Type: application/json' \  --data-raw '{}'
{  "component_id": "string",  "component_type": "agent",  "name": "string",  "user_id": "string",  "description": "string",  "current_version": 0,  "metadata": {},  "created_at": 0,  "updated_at": 0,  "deleted_at": 0}