{"paths":{"/v3/agents/agent-defaults":{"get":{"operationId":"defaults","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDefaultsDto"}}},"description":"What the agent limit fields accept here, and what an omitted field buys"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":["agents"]}},"/v3/agents/agents":{"get":{"operationId":"list","parameters":[{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"description":"Only agents on this machine. Absent means every machine of the caller's own tenant.","in":"query","name":"instance_id","required":false,"schema":{"type":"string"}},{"description":"Only agents carrying this one label, written `key=value`; absent or empty means every\nagent. One label per call. Combines with `instance_id`, paging and `X-Total-Count`,\nwhich counts the agents it matches. A value that is not a `key=value` of the form a\nlaunch accepts is a `422`.","in":"query","name":"label","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentDto"},"type":"array"}}},"description":"The caller's agents, newest first; X-Total-Count counts the filtered set, not the tenant's whole history"},"422":{"description":"A `label` that is not `key=value` of the form a launch accepts"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":["agents"]},"post":{"operationId":"create","parameters":[{"description":"Stable key for this tenant's creation request","in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentReq"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAcceptedDto"}}},"description":"Agent recorded, with a snapshot of its preset (the request's overrides applied), its environment at the current version and its AI profile"},"404":{"description":"No such live preset of this tenant's"},"409":{"description":"Idempotency conflict (the same key with another request, another preset, environment or profile included); a preset that no longer holds, named in the message: its environment or AI profile has ended, a secret its MCP servers or plugins name is absent from the environment's current version, or its default model or a subagent's model is not available under its AI profile; or a model of the tenant's own subscription (`openai/…`) whose selected subscription is not active (a new sign-in is needed) or whose token is missing or names no account"},"422":{"description":"Invalid request — `without_repo` together with `repo_url` included — or no prompt or model from either the request or the preset; or `model_not_available`: the model the request names is not provider/model, or is not available under the preset's AI profile (no provider of that key — custom providers are `custom-<name>`; `openai` needs a selected ChatGPT subscription or the `openai` key, `anthropic` a selected Claude subscription — a custom provider without its key, or a model its provider does not list: the release's catalog for `openai` and `anthropic`, the list stored with a custom provider)"},"429":{"description":"Admission limit"},"503":{"description":"The subscription could not be read; repeat shortly"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":["agents"]}},"/v3/agents/agents/check":{"post":{"operationId":"check","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentReq"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchCheckDto"}}},"description":"What a launch of this body would stumble on once its machine is up — an empty list when nothing was found. Advice only: nothing is launched or reserved, and `POST /v3/agents/agents` does not wait on it"},"404":{"description":"No such live preset of this tenant's"},"409":{"description":"A preset that no longer holds, as on `POST /v3/agents/agents`"},"422":{"description":"Invalid request, `without_repo` together with `repo_url` included"},"502":{"description":"The store holding the environment's secrets would not answer; repeat later"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":["agents"]}},"/v3/agents/agents/{agent_id}":{"get":{"operationId":"get","parameters":[{"description":"Agent identifier","in":"path","name":"agent_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDto"}}},"description":"Agent"},"404":{"description":"Unknown agent"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":["agents"]}},"/v3/agents/agents/{agent_id}/context":{"get":{"operationId":"context","parameters":[{"description":"Agent identifier","in":"path","name":"agent_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentContextDto"}}},"description":"Last completed model request measurement"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":["agents"]}},"/v3/agents/agents/{agent_id}/events":{"get":{"operationId":"events","parameters":[{"description":"Only events numbered after this one; absent or `0` reads from the first.","in":"query","name":"after","required":false,"schema":{"format":"int64","type":"integer"}},{"description":"At most this many events; the deployment's page cap when absent or larger.","in":"query","name":"limit","required":false,"schema":{"format":"int64","type":"integer"}},{"description":"Only events of these kinds, comma-separated (`agent_text,turn_ended`: the agent's words and\nhow its turns ended, without tool output): absent reads every kind. The kinds are\n`turn_started`, `agent_text`, `tool_called`, `tool_returned`, `turn_continued`,\n`turn_ended` and `ci_loop_exhausted`; another is\nrefused. Each event keeps its own `number`, so the numbers of a filtered page have gaps\nwhere the other kinds are; pass the last one back as `after` as ever.","example":"agent_text,turn_ended","in":"query","name":"kinds","required":false,"schema":{"type":"string"}},{"description":"Agent identifier","in":"path","name":"agent_id","required":true,"schema":{"type":"string"}},{"description":"With a stream: the number of the last event received, to resume after it; it wins over `after`","in":"header","name":"Last-Event-ID","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentEventDto"},"type":"array"}},"text/event-stream":{"schema":{"$ref":"#/components/schemas/AgentStreamFrame"}}},"description":"The agent's turn events numbered after `after`, oldest first. As `application/json` (the default): one page — each event's `number` is the cursor: pass the last one back as `after` for the next page; an empty array means nothing new yet, not an error; X-Total-Count is how many events the agent has in all — the number of its last, of any kind even with `kinds`. With `kinds`, a page or a stream carries only events of those kinds, each with its own `number`: a reader resumes after the last one it was given. As `text/event-stream` (asked for by `Accept: text/event-stream`): every event after the cursor and then each new one as it is kept, one SSE event apiece whose `id` is its `number` and whose `data` is the same JSON object; a comment line every 15 s while nothing happens; the stream ends once every event is out and nothing more will be kept for the agent, or when the service restarts; reconnect with Last-Event-ID to go on. The response asks proxies not to buffer it (`X-Accel-Buffering: no`). While a turn runs, the stream also carries the agent's text as it is being written: SSE events named `text_delta`, with no `id`, whose `data` is an `AgentTextDeltaDto`. They are not kept, not numbered and not in a page: a reader connected later or reconnecting does not get them again, and may miss some; the part arrives whole as an `agent_text` event once it is done, which replaces its pieces; with `kinds`, only when `agent_text` is one of them. Text and tool output in kept events are capped like the transcript's parts. Kept while the agent's record lives."},"204":{"description":"A stream asked of an agent that has ended (or failed and let go of its machine) with no event after the cursor: nothing more will come, so a browser's EventSource stops rather than reconnecting"},"400":{"description":"A negative `after` or Last-Event-ID, or a `limit` below 1"},"404":{"description":"No such agent of this tenant"},"422":{"description":"`kinds` names something other than an event kind; the message names the kinds"},"429":{"description":"The tenant already holds as many event streams as one may"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":["agents"]}},"/v3/agents/agents/{agent_id}/interrupt":{"post":{"description":"What the turn was sent and never ran: `steer` messages are\nrecorded `failed` with code `not_executed`; `queue` messages are kept and run as the next\nturns, in acceptance order. A turn the guest had already ended on its own when the\ninterrupt reached it keeps its own outcome, and nothing is withdrawn.\n\nAn idle agent is not kept for ever: once it has had no turn, and no message, for its\nmachine's idle timeout, it is stopped as if asked to.","operationId":"interrupt","parameters":[{"description":"Agent identifier","in":"path","name":"agent_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentInterruptReq"}]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentInterruptDto"}}},"description":"Nothing was running"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentInterruptDto"}}},"description":"The running turn is being stopped; the agent stays active, with turn_stop set, until the guest confirms it stopped"},"404":{"description":"Unknown agent"},"409":{"description":"Not running a turn: not ready yet, stopping or terminal"},"503":{"description":"The controller is in the middle of a pass over this agent; nothing was changed. Retry after the seconds in Retry-After","headers":{"Retry-After":{"description":"Seconds to wait before asking again","schema":{"type":"string"}}}}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Stop the running turn and keep the agent: it goes idle and takes the next message, on the\nsame conversation.","tags":["agents"]}},"/v3/agents/agents/{agent_id}/log":{"get":{"operationId":"log","parameters":[{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"description":"Agent identifier","in":"path","name":"agent_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentLogEntryDto"},"type":"array"}}},"description":"Technical phase log"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":["agents"]}},"/v3/agents/agents/{agent_id}/messages":{"get":{"operationId":"messages","parameters":[{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"description":"Agent identifier","in":"path","name":"agent_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentMessageDto"},"type":"array"}}},"description":"Ordered message receipts"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":["agents"]},"post":{"description":"`delivery` says how it meets a turn already running. `steer` (the default) is taken in by that turn at its next step boundary. `queue` leaves it alone and runs as its own turn after it, in acceptance order, with its own budget and its own `last_turn`; the agent reads it only after the running turn ends, so `delivered` under `queue` means waiting for the turn, not read. To an idle agent both start a turn at once.\n\nWhen a running turn is cut — interrupted, or past its budget or silence limit — a `steer` message sent to it that did not run is recorded `failed` with code `not_executed`; a `queue` message is kept and runs as a next turn. When the agent is stopped, nothing that has not run runs.","operationId":"send","parameters":[{"description":"Agent identifier","in":"path","name":"agent_id","required":true,"schema":{"type":"string"}},{"description":"Stable key for this agent's message","in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentMessageReq"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentMessageAcceptedDto"}}},"description":"Message recorded"},"409":{"description":"Not accepting messages"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Send the agent a message.","tags":["agents"]}},"/v3/agents/agents/{agent_id}/messages/{message_id}":{"get":{"operationId":"message","parameters":[{"description":"Agent identifier","in":"path","name":"agent_id","required":true,"schema":{"type":"string"}},{"description":"Message receipt identifier","in":"path","name":"message_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentMessageDto"}}},"description":"Message receipt"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":["agents"]}},"/v3/agents/agents/{agent_id}/stop":{"post":{"operationId":"stop","parameters":[{"description":"Agent identifier","in":"path","name":"agent_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentStopReq"}]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAcceptedDto"}}},"description":"Already terminal"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAcceptedDto"}}},"description":"Stopping"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":["agents"]}},"/v3/agents/agents/{agent_id}/transcript":{"get":{"operationId":"transcript","parameters":[{"description":"Agent identifier","in":"path","name":"agent_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"Full available transcript snapshot"},"503":{"description":"Transcript unavailable"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":["agents"]}},"/v3/agents/ai-profiles":{"get":{"operationId":"list_profiles","parameters":[{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AiProfileDto"},"type":"array"}}},"description":"the live profiles, the default first; X-Total-Count counts them all"},"400":{"description":"an unusable page window"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"The caller's AI profiles, the default first — a bare array with the total in\n`X-Total-Count`.","tags":["ai-profiles"]},"post":{"operationId":"create_profile","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAiProfileReq"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiProfileDto"}}},"description":"made"},"409":{"description":"the name is taken, or the tenant holds as many profiles as it may"},"422":{"description":"a name outside `^[a-z0-9][a-z0-9_-]*$` or over 63 bytes"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Make a profile. It starts empty: set keys and providers, sign subscriptions in.","tags":["ai-profiles"]}},"/v3/agents/ai-profiles/{id}":{"get":{"operationId":"get_profile","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiProfileDto"}}},"description":"the profile"},"404":{"description":"no such live profile of the caller's"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"One profile with what it holds — key presence, never a value.","tags":["ai-profiles"]},"delete":{"operationId":"delete_profile","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"ended"},"404":{"description":"no such live profile of the caller's"},"409":{"description":"the profile is the default, or machines, live agents or subscriptions stand on it — the message names them"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"End a profile and drop what it held. Refused with `409` — naming each — while it is the\ndefault, a machine stands on it, a live agent runs on it, or it holds subscriptions.","tags":["ai-profiles"]},"patch":{"description":"The default is never unset, only handed to another profile: `default: false` or `null` on\nthe default is refused, and nothing changes.\n\nA chosen source is a preference: while the profile does not hold it, the other one runs, and\nthe read names both. The models of the provider are those of the source it runs on. With the\nkey chosen, the subscription's token is not given to the profile's machines and is taken off\nthose that hold one; a machine raised before a change takes no new agent.","operationId":"patch_profile","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAiProfileReq"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiProfileDto"}}},"description":"the profile as it is now"},"404":{"description":"no such live profile of the caller's"},"409":{"description":"the name is taken"},"422":{"description":"a malformed name, an unknown field, `default` unset on the default profile — make another profile the default instead — or a source for a provider not reached two ways"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Rename a profile, make it the default, or choose the source of a provider it reaches two\nways (`sources`).","tags":["ai-profiles"]}},"/v3/agents/ai-profiles/{id}/copy":{"post":{"operationId":"copy_profile","parameters":[{"description":"the source profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyAiProfileReq"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiProfileDto"}}},"description":"the copy"},"404":{"description":"no such live profile of the caller's"},"409":{"description":"the name is taken, or the tenant holds as many profiles as it may"},"422":{"description":"a malformed name"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"A new profile with the source's custom providers and every key, copied server-side —\nand none of its subscriptions: one subscription held by two profiles would log itself out\nat the first refresh.","tags":["ai-profiles"]}},"/v3/agents/ai-profiles/{id}/keys/{provider}":{"put":{"operationId":"put_profile_key","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"a known provider: its id from `GET /v3/agents/ai-providers`, or its name — `openai`, `zai`, `openrouter` or `fluence` (the name is accepted for now)","in":"path","name":"provider","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProfileKeyReq"}}},"required":true},"responses":{"204":{"description":"kept"},"404":{"description":"no such live profile of the caller's, or not a known provider"},"422":{"description":"a blank or oversized key, or a `fluence` key its endpoint gives no model list for"},"502":{"description":"the key store did not take it"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Set the key of a known provider (`openai`, `zai`, `openrouter`, `fluence`): only the key — the address and\nprotocol are the harness's, or for `fluence` the orchestrator's (Fluence inference,\n`https://api.fluence.cloud/v1`). A `fluence` key is asked for its model list there first: no list —\na refused key, no answer, an empty list — is a 422 and nothing is kept. Stored, never returned;\nreads show presence.","tags":["ai-profiles"]},"delete":{"operationId":"delete_profile_key","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"a known provider: its id from `GET /v3/agents/ai-providers`, or its name — `openai`, `zai`, `openrouter` or `fluence` (the name is accepted for now)","in":"path","name":"provider","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"gone (or never held)"},"404":{"description":"no such live profile of the caller's, or not a known provider"},"502":{"description":"the key store did not answer"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Remove the key of a known provider. Idempotent.","tags":["ai-profiles"]}},"/v3/agents/ai-profiles/{id}/models":{"get":{"operationId":"list_profile_models","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AiProfileModelDto"},"type":"array"}}},"description":"the models the profile can run; X-Total-Count counts them all"},"400":{"description":"an unusable page window"},"404":{"description":"no such live profile of the caller's"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"The models the profile can run — exactly what the model check accepts for it, by the same\nrule: the catalog's models of the providers its subscriptions and keys carry, and the models\nits keyed custom providers listed when written. A `subscription` model also needs that\nsubscription active at launch (`POST /v3/agents/agents` answers 409 otherwise). Ordered by provider,\nthen model; a bare array with the total in `X-Total-Count`.","tags":["ai-profiles"]}},"/v3/agents/ai-profiles/{id}/provider-declarations":{"post":{"operationId":"declare_custom_provider","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeclareCustomProviderReq"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProviderDeclarationDto"}}},"description":"the profile already holds this provider at this address; nothing changed"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProviderDeclarationDto"}}},"description":"declared, waiting for its key"},"404":{"description":"no such live profile of the caller's"},"409":{"description":"the profile holds a custom provider of this name at another address or protocol"},"422":{"description":"a malformed name or address, an address that does not resolve to a public host, an unknown field (a key included), or a profile already holding 32 custom providers"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Declare a custom provider without its key. The harness registers it under `custom-<name>`.\nThe provider reads as waiting for its key (`key_set` false) until a person sets it at\n`key_link`; a profile whose custom provider has no key raises no machine. Models are listed\nwhen the provider serves its list without a key, and again when the key is set. Repeating\nthe same declaration changes nothing and answers `200`.","tags":["ai-profiles"]}},"/v3/agents/ai-profiles/{id}/providers":{"get":{"operationId":"list_custom_providers","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CustomProviderDto"},"type":"array"}}},"description":"the custom providers; X-Total-Count counts them all"},"400":{"description":"an unusable page window"},"404":{"description":"no such live profile of the caller's"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"The profile's custom providers, by name — a bare array with the total in `X-Total-Count`.","tags":["ai-profiles"]},"post":{"operationId":"create_custom_provider","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProviderReq"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProviderDto"}}},"description":"added, with its id"},"404":{"description":"no such live profile of the caller's"},"409":{"description":"the profile already has a custom provider of this name"},"422":{"description":"a malformed name or address, a blank key, a profile already holding 32 custom providers, or a provider that gave no model list — its address does not resolve to a public host, it did not answer, refused the key, has no `/models`, or listed nothing"},"502":{"description":"the key store did not take the key"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Add a custom provider. The harness registers it under `custom-<name>`; a model of it is\n`custom-<name>/<model>`. It is asked for its models — `GET {base_url}/models` with its key —\nand the list is stored with it; a provider that gives no list is refused and nothing is kept.","tags":["ai-profiles"]}},"/v3/agents/ai-profiles/{id}/providers/{provider_id}":{"get":{"operationId":"get_custom_provider","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"the custom provider's id","in":"path","name":"provider_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProviderDto"}}},"description":"the provider"},"404":{"description":"no such live profile of the caller's, or no such provider in it"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"One custom provider of the profile.","tags":["ai-profiles"]},"delete":{"operationId":"delete_custom_provider","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"the custom provider's id","in":"path","name":"provider_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"removed"},"404":{"description":"no such live profile of the caller's, or no provider with this id in it"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Remove a custom provider and its key. One the profile does not hold — an id removed already,\nor a segment that is not an id at all, such as the provider's name — is `404`, and nothing\nis removed.","tags":["ai-profiles"]},"patch":{"operationId":"patch_custom_provider","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"the custom provider's id","in":"path","name":"provider_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchCustomProviderReq"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProviderDto"}}},"description":"the provider as it is now"},"404":{"description":"no such live profile of the caller's, or no such provider in it"},"409":{"description":"the provider kept changing under concurrent writes while this one was written; repeat it"},"422":{"description":"a different name, a malformed address, a blank key, an unknown field, or a provider that gave no model list"},"502":{"description":"the key store did not take the key"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Change a custom provider's protocol, address or key: the fields sent, merged into the\nprovider as it stands when the change is written, so two changes of different fields both\nstand. Its name cannot change — a model of it\nis `custom-<name>/<model>` — so a different `name` is a 422. When the address, protocol or\nkey changes the provider is asked for its models again, as when it was added; no list is a\n422 and nothing is kept.","tags":["ai-profiles"]}},"/v3/agents/ai-profiles/{id}/subscriptions":{"get":{"operationId":"list_ai_subscriptions","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AiSubscriptionDto"},"type":"array"}}},"description":"one row per subscription, `selected` marking the one per provider the profile's machines run on; absent = none"},"400":{"description":"the identity presented has no tenant of its own"},"404":{"description":"no such live profile of the caller's"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"The profile's subscriptions and where each stands — never a value.","tags":["ai-subscriptions"]},"post":{"description":"Open `verification_uri`, type `user_code`; the orchestrator polls the provider until the\ncode is entered or expires, and `GET /v3/agents/ai-profiles/{id}/subscriptions` shows the outcome. A\nlogin does not change which subscription the machines run on — except that one turning\nactive while none of the provider is selected, or while the selected one needs a new login,\nbecomes the selected one. The selected one needing a new login hands over to the most\nrecently signed-in active one, if there is one.","operationId":"start_subscription","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartAiSubscriptionReq"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiLoginStartedDto"}}},"description":"the login is started; enter the code at the page"},"400":{"description":"the identity presented has no tenant of its own"},"404":{"description":"no such live profile of the caller's"},"409":{"description":"the orchestrator is busy with as many subscriptions as it takes at once right now (repeat shortly)"},"422":{"description":"not the id of a subscription provider in `GET /v3/agents/ai-providers`, one not yet supported (`claude`), one whose sign-in this deployment does not offer, or an unknown field"},"502":{"description":"the provider's auth service did not start the login, or the secret store did not keep it"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Start a device login into the profile: a NEW subscription with the provider named by its\ncatalog id, beside the ones the profile holds, its id in the answer.","tags":["ai-subscriptions"]}},"/v3/agents/ai-profiles/{id}/subscriptions/{subscription_id}":{"delete":{"description":"Nothing is delivered from it once the forget has begun; when it was the selected one, the\nmost recently signed-in active one left is selected instead — or none, and the machines lose\nthe provider. `202` while a login or a refresh of it is under way, the orchestrator is busy\nwith as many subscriptions as it takes at once, or the secret store has not removed it yet —\nthe orchestrator finishes it.","operationId":"delete_subscription","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"the subscription's id","in":"path","name":"subscription_id","required":true,"schema":{"type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSubscriptionForgetting"}}},"description":"begun, not finished; `detail` names what it waits on. The orchestrator finishes it"},"204":{"description":"gone (or never held)"},"400":{"description":"the identity presented has no tenant of its own"},"404":{"description":"no such live profile of the caller's"},"502":{"description":"the secret store did not answer"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Forget the profile's subscription `subscription_id`. Idempotent: forgetting what the\nprofile does not hold is `204` too.","tags":["ai-subscriptions"]},"patch":{"description":"`selected: true` — only an active one of the profile's own; selecting the selected one again\nchanges nothing. A selection is moved, never unset: `false` or `null` on the selected one is\nrefused, and on any other changes nothing. This is no exception to «`null` clears»: the\nper-provider routes could only select and forget, and this field adds no unset. To run the\nprovider on its key without forgetting the subscription, set the provider's source\npreference instead.","operationId":"patch_subscription","parameters":[{"description":"the profile's id or name","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"the subscription's id","in":"path","name":"subscription_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAiSubscriptionReq"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSubscriptionDto"}}},"description":"the subscription as it is now"},"400":{"description":"the identity presented has no tenant of its own"},"404":{"description":"no such live profile of the caller's, or the profile holds no subscription with this id"},"409":{"description":"the subscription is not active (pending, needing a new login, or being forgotten)"},"422":{"description":"`selected` false or null on the selected subscription — a selection is moved or forgotten, never unset — or an unknown field"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Select the subscription the profile's machines run on for its provider.","tags":["ai-subscriptions"]}},"/v3/agents/ai-providers":{"get":{"operationId":"list_ai_providers","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AiProviderDto"},"type":"array"}}},"description":"the catalog's providers"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"The catalog: every known provider and every subscription provider a login is offered for,\nwith ids that never change. A route that names such a provider takes the id or the name.","tags":["ai-profiles"]}},"/v3/agents/cloud-credentials":{"get":{"operationId":"list_cloud_credentials","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CloudCredentialPresence"},"type":"array"}}},"description":"one row per stored credential, with `forgetting_since_ms` while a forget of it is under way; absent = not stored"},"400":{"description":"the identity presented has no tenant of its own"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Which providers the caller holds a credential for, and since when — never a value.","tags":["cloud-credentials"]}},"/v3/agents/cloud-credentials/{provider}":{"put":{"operationId":"put_cloud_credential","parameters":[{"description":"the cloud provider, as `/v3/agents/provision` names it","in":"path","name":"provider","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutCloudCredentialReq"}}},"required":true},"responses":{"204":{"description":"stored; the token is never returned"},"400":{"description":"the identity presented has no tenant of its own"},"422":{"description":"a blank token, an unknown field, or a provider this deployment takes no tenant credential for (none, while tenant cloud accounts are off)"},"502":{"description":"the secret store did not take it"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Store the caller's API token for `provider`, replacing any earlier one. From the next\naccepted launch on, that tenant's machines on `provider` are created in the tenant's own\naccount; machines already standing stay where they were created. While a forget of this\ncredential is under way the token is replaced and the forget goes on with it — the way to\nlet a footing removal finish when the old key was revoked at the provider.","tags":["cloud-credentials"]},"delete":{"description":"Otherwise the forget begins: the credential is marked (shown with `forgetting_since_ms`, and\nno launch goes into the account), the network footing the orchestrator built there (VPC,\nsubnet, security group) is removed by means of the credential, and then the credential\nitself goes. A cloud takes a moment to finish its deletes, so the answer is often `202`:\nbegun, not finished, with `detail` naming what it waits on. The orchestrator finishes it on\nits own; a repeat answers `202` while it is under way and `204` once the credential — record\nand token — is really gone.","operationId":"forget_cloud_credential","parameters":[{"description":"the cloud provider, as `/v3/agents/provision` names it","in":"path","name":"provider","required":true,"schema":{"type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudCredentialForgetting"}}},"description":"the forget has begun and is not finished — the footing is still being removed, busy, a step failed, or a launch slipped in; `detail` names it. The orchestrator finishes it; no new launch goes into the account meanwhile"},"204":{"description":"gone — record and token (or never stored)"},"400":{"description":"the identity presented has no tenant of its own"},"409":{"description":"machines still stand in this account, or a launch frozen to it is still running — the message names each (a launch as `provision <id>`); end them first. Nothing was begun"},"422":{"description":"a provider that takes no stored credential — Fluence, whose accounts are reached by the caller's connection to this service"},"502":{"description":"the secret store did not remove it"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Forget the caller's credential for `provider`. Idempotent: forgetting what is not stored is\n`204` too. Later launches go back to the operator's fallback. Refused with `409` — and\nNOTHING is begun — while machines created in the tenant's account still stand, or a launch\nfrozen to that account is still running: the message names each; end them first, because\nwithout the credential nothing could end them there.","tags":["cloud-credentials"]}},"/v3/agents/cloud-credentials/{provider}/clusters":{"get":{"operationId":"list_cloud_clusters","parameters":[{"description":"the cloud provider, as `/v3/agents/provision` names it","in":"path","name":"provider","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CloudCluster"},"type":"array"}}},"description":"the clusters the cloud lists for the caller's credential"},"400":{"description":"the identity presented has no tenant of its own"},"409":{"description":"no credential is stored for this provider (or it is being forgotten) — store one with PUT first; or, for Fluence, this service is not connected to the caller's account — connect it in the Fluence console"},"422":{"description":"a provider this deployment takes no tenant credential for, or one that does not list clusters"},"502":{"description":"the cloud did not answer the credential, or refused it"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"The clusters the caller's account on `provider` can place machines in — the values an\nenvironment's `config.cluster` takes. Asked of the cloud with the caller's own stored\ncredential, or — on Fluence — through the caller's connection to this service, so it is\ntheir account's answer.","tags":["cloud-credentials"]}},"/v3/agents/environment-declarations":{"post":{"operationId":"declare_environment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeclareEnvironmentReq"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentDeclarationDto"}}},"description":"a live set of this name existed; the names are declared on it"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentDeclarationDto"}}},"description":"a new set was made, holding no secrets, with the names declared on it"},"409":{"description":"a concurrent call made a set of this name and then ended it before this one could use it; repeat"},"422":{"description":"a name this surface cannot address, a secret name it refuses, an unknown field (a value included), or more declared secrets than the per-set cap"},"502":{"description":"the store holding the set's secrets would not answer"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Declare an environment and the names of its secrets, with no value anywhere in the call.\nA set of this name that is live already keeps everything it holds and takes the names as\ndeclarations; repeating a call changes nothing and answers `200`. Each declared secret\nanswers whether its value is set and, while it is not and the console address is\nconfigured, the link where a person sets it.","tags":["environments"]}},"/v3/agents/environments":{"get":{"description":"Ended sets are not listed: a list is what a tenant may raise a machine from, and a\nheadstone is not. History is read by the id a machine row carries.","operationId":"list_environments","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EnvironmentDto"},"type":"array"}}},"description":"the tenant's live sets, oldest first; never a secret value"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"The tenant's live environments, oldest first — a bare JSON array.","tags":["environments"]},"post":{"description":"Editing an existing set's secrets is `PATCH /v3/agents/environments/{id}`; what a launch is built from\nis a preset's (`POST /v3/agents/presets`).\n\nThe set stands, with its secrets, until it is deleted (`DELETE /v3/agents/environments/{id}`):\nnothing ends it on its own, however long nothing has held it.","operationId":"create_environment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnvironmentReq"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentDto"}}},"description":"created at version 1; a preset names it to launch into it"},"409":{"description":"the tenant already holds a live set under this name"},"422":{"description":"a name this surface cannot address, a named secret this surface refuses, more than the per-set cap of named secrets, or a forge token the forge itself refused"},"502":{"description":"the store holding the new set's secrets would not take them"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Create a NEW environment: a name, and the credentials of its version 1.","tags":["environments"]}},"/v3/agents/environments/{id}":{"get":{"operationId":"get_environment","parameters":[{"description":"the set's id, or the name this tenant gave it","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentDto"}}},"description":"the set; never a secret value"},"404":{"description":"no such live set of this tenant's — absent, foreign and ended are one answer"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"One live environment of the tenant's, by id or by name.","tags":["environments"]},"delete":{"description":"Soft because a retired machine goes on naming the set it was born from: the row stays as\na headstone, off the list and off its name, and its SECRETS are destroyed.","operationId":"delete_environment","parameters":[{"description":"the set's id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"ended: off the list, off its name, its credentials destroyed. Machines already up are not touched (zero-SSH)"},"404":{"description":"no such set of this tenant's"},"409":{"description":"it still holds machines, a provision in flight or an agent — which the message names"},"502":{"description":"the store holding its secrets would not answer"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"End an environment — refused while it still holds live machines, and soft when it does\nnot.","tags":["environments"]},"patch":{"description":"**No standing machine moves** — a machine carries the (environment, version) it was raised\nunder, and this writes a new version beside the old ones rather than rewriting any. The\nanswer is the environment as it now stands, its `secrets` reading the new current version.","operationId":"patch_environment","parameters":[{"description":"the set's id, or the name this tenant gave it","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchEnvironmentReq"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentDto"}}},"description":"the new current version is minted; earlier versions are byte for byte what they were"},"404":{"description":"no such live set of this tenant's to edit"},"409":{"description":"the set ended, or another edit minted a version first, while this one was minted — re-read and retry. The version numbering is protected; that the new version's document is the winning edit's relies on a single orchestrator process (the deployment's one replica)"},"422":{"description":"an unknown field or forge kind, a named secret this surface refuses, or more than the per-set cap of named secrets once the edit is applied, or a forge token the forge itself refused"},"502":{"description":"the store holding the set's secrets would not answer"},"503":{"description":"the set still reads the tenant's secrets — the startup copy has not moved them onto its own path yet. Only the next orchestrator start retries that copy, and nothing else changes it: retrying the request before then gets the same answer"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Edit this environment's secrets, each by name: a value sets or replaces it, `null` removes\nit, one left out stays as it is. The edit mints the set's NEXT version and makes it\ncurrent — an empty body too.","tags":["environments"]}},"/v3/agents/environments/{id}/secret-declarations":{"get":{"operationId":"list_secret_declarations","parameters":[{"description":"the set's id, or the name this tenant gave it","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SecretDeclarationDto"},"type":"array"}}},"description":"the declared secrets; never a value"},"404":{"description":"no such live set of this tenant's"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"The secrets declared on an environment, by name, each with whether its value is set.","tags":["environments"]}},"/v3/agents/environments/{id}/secret-declarations/{name}":{"put":{"operationId":"declare_secret","parameters":[{"description":"the set's id, or the name this tenant gave it","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"the secret's name, `^[a-z0-9_]+$`","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretDeclarationDto"}}},"description":"already declared; nothing changed"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretDeclarationDto"}}},"description":"declared"},"404":{"description":"no such live set of this tenant's"},"422":{"description":"a secret name this surface refuses, or the set already declares the per-set cap"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Declare one secret on an environment by its name alone. Repeating it changes nothing and\nanswers `200`; a secret whose value is already set is declared all the same and reads as\nset.","tags":["environments"]},"delete":{"operationId":"withdraw_secret_declaration","parameters":[{"description":"the set's id, or the name this tenant gave it","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"the declared secret's name","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"withdrawn"},"404":{"description":"no such live set of this tenant's, or no such declaration on it"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Withdraw a declaration. A value already set under the name stays as it is: removing a\nsecret is an edit of the set (`PATCH /v3/agents/environments/{id}`).","tags":["environments"]}},"/v3/agents/environments/{id}/versions":{"get":{"description":"A bare JSON array in the window asked (optional\n`limit`/`offset`), the whole count in `X-Total-Count`. Every edit mints a version, so the\nlist grows without bound. Each version's names are read from that version's OWN secrets\ndocument — for the page only — so a standing machine's version reports what that machine\nwas raised with, not what the current one carries.","operationId":"list_environment_versions","parameters":[{"description":"the set's id, or the name this tenant gave it","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EnvironmentVersionDto"},"type":"array"}}},"description":"the set's versions in the window asked, ascending — a bare array, the total in X-Total-Count; names present, never a value"},"400":{"description":"a window with no correct reading: a limit under 1 or a negative offset"},"404":{"description":"no such live set of this tenant's"},"502":{"description":"the store holding the set's secrets would not answer"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"This environment's secret versions, ascending: each version number, whether it is\ncurrent, and the PRESENCE of the secret names that version holds — never a value.","tags":["environments"]}},"/v3/agents/instances":{"get":{"operationId":"instances","parameters":[{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"live_only","required":false,"schema":{"type":["boolean","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InstanceDto"},"type":"array"}}},"description":"the machines this identity may see — a bare array, the total in X-Total-Count"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"List the caller's machines.","tags":["fleet"]}},"/v3/agents/instances/{id}":{"get":{"operationId":"instance_detail","parameters":[{"description":"the instance, under the calling tenant","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstanceDetailDto"}}},"description":"the record, its entry points and the guest's live status"},"403":{"description":"a caller acting for a tenant that is not its own"},"404":{"description":"no such instance — another tenant's machine gets the same answer"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"One machine in detail: its record, its entry points and the guest's live status.\nReading it also asks the guest to run its best-effort self-repair (`heal`).","tags":["fleet"]},"delete":{"operationId":"teardown","parameters":[{"description":"the instance, under the calling tenant","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeardownAcceptedDto"}}},"description":"marked for retirement; reconcile destroys it and the caller polls the instance"},"403":{"description":"a caller acting for a tenant that is not its own"},"404":{"description":"no such instance under this tenant"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Retire a billed VM belonging to your tenant.","tags":["provisioning"],"description":"This tears down the tenant's billed machine; accrued charges still apply. After the 202 response, poll `GET /v3/agents/instances/{id}` until the instance is retired."}},"/v3/agents/models":{"get":{"description":"Informational: an agent naming a model absent here is not refused for that reason.\n\nOnly live machines offer models. A machine whose model resolution failed, or that has\nnot reported yet, contributes no rows; its detail (`GET /v3/agents/instances/{id}`) says why. Every\nmodel id listed here is one `POST /v3/agents/agents` accepts.","operationId":"models","parameters":[{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ModelEntryDto"},"type":"array"}}},"description":"what this tenant's live machines can run — a bare array, the total in X-Total-Count"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"The models an agent may be placed on, across the caller's live machines: one row per\nmodel per machine.","tags":["fleet"]}},"/v3/agents/presets":{"get":{"operationId":"list_presets","parameters":[{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PresetDto"},"type":"array"}}},"description":"the tenant's live presets, oldest first; X-Total-Count counts them all"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"The tenant's live presets, oldest first — a bare array with the total in `X-Total-Count`.","tags":["presets"]},"post":{"operationId":"create_preset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresetReq"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresetDto"}}},"description":"stored; a launch names it by id"},"404":{"description":"the environment or the AI profile named is not a live one of this tenant's"},"409":{"description":"the tenant already holds a live preset under this name"},"422":{"description":"a name, repo_url, prompt or config this surface refuses (an unpublished size class, a malformed MCP entry, more than 100 plugins, the same plugin twice, a binding conflict, a size class the preset's cluster does not sell — named with the ones it does); a `secret_ref` or plugin `secret_env` naming a secret the environment's current version does not hold, named in the message; a subagent whose role is out of shape or one of the coding agent's own (`build`, `plan`, `general`, `explore`, `default`), more than 16 subagents, or a subagent's description or prompt over its bound; or `model_not_available`: the default model or a subagent's model is not one the AI profile can run (a subagent's named `subagents.<role>`), or a subagent's model runs on a subscription"},"502":{"description":"the store holding the environment's secrets would not answer, or the cloud would not list the clusters"},"503":{"description":"the cloud would not list the machine shapes it sells, so whether the size class is sold is unknown; repeat later"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Store a new preset — whole, or refused with the reason.","tags":["presets"]}},"/v3/agents/presets/{id}":{"get":{"operationId":"get_preset","parameters":[{"description":"the preset's id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresetDto"}}},"description":"the preset"},"404":{"description":"no such live preset of this tenant's — absent, foreign and ended are one answer"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"One live preset of the tenant's.","tags":["presets"]},"delete":{"description":"The environment it names is not touched either, even when this was its last live preset: a\nset ends only by its own `DELETE`.","operationId":"delete_preset","parameters":[{"description":"the preset's id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"ended; the environment it named stands until its own DELETE"},"404":{"description":"no such live preset of this tenant's"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"End a live preset: off the list and its name free again. Soft — agents launched from it are\nnot touched.","tags":["presets"]},"patch":{"description":"Naming ANOTHER environment leaves the one the preset named before standing, as on a replace.","operationId":"patch_preset","parameters":[{"description":"the preset's id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchPresetReq"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresetDto"}}},"description":"the preset as it is now"},"404":{"description":"no such live preset of this tenant's; or the environment or AI profile the patched preset names — one the patch brings or one it keeps — is not a live one of theirs"},"409":{"description":"another live preset of the tenant's holds this name; or the preset was written again while this edit was being made — read it and repeat"},"422":{"description":"`name` or `environment` sent `null`, an unknown field, or — as on a replace — a record this surface refuses, whether the refused value came with the patch or was kept: a shape, a size class the preset's cluster does not sell, a secret the environment's current version does not hold, or `model_not_available`"},"502":{"description":"the store holding the environment's secrets would not answer, or the cloud would not list the clusters"},"503":{"description":"as on create: the cloud would not list the machine shapes it sells; repeat later"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Change what the body names of a live preset and leave the rest as stored: a field left out\nstays, `null` clears it, a value replaces it — a list whole, `config` field by field. The\nrecord this makes is judged whole, as on a replace, or refused and the preset left as it\nwas. Agents already launched from it are not touched.","tags":["presets"]}},"/v3/agents/provision":{"post":{"description":"**This spends money: it raises a billed machine** that runs until it is torn down\n(`DELETE /v3/agents/instances/{id}`) or retires itself after its idle timeout. Raise one only when\nyou mean to, and tear it down when you are done.","operationId":"provision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionReq"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionAcceptedDto"}}},"description":"accepted; the job is polled, the machine is not raised inline"},"403":{"description":"a caller acting for a tenant that is not its own"},"404":{"description":"no such live preset of this tenant's — absent, foreign and deleted are one answer"},"409":{"description":"a preset that no longer holds, named in the message — its environment or AI profile has ended, or a secret its MCP servers or plugins name is absent from the environment's current version, or a subagent's model is not available under its AI profile; or tenant state this launch cannot be raised from — an AI profile with a custom provider that holds no key, or an unusable plugin document, or no stored cloud credential for this provider where the operator refuses the fleet account"},"422":{"description":"an unknown provider, a size class this deployment does not publish, an idle timeout below its minimum, or a class the CHOSEN CLOUD does not sell — the catalogue is fleet-wide and a cloud's line is not, so the refusal names what that cloud does sell"},"502":{"description":"the chosen cloud would not say what it sells; the launch is refused rather than accepted into a job that may be unservable"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Start provisioning a machine for the caller's tenant. The work takes minutes (machine\ncreate, guest health, credential setup), so this only records a provision job and returns\n`202` with a `provision_id` to poll via `GET /v3/agents/provisions/{id}`.","tags":["provisioning"]}},"/v3/agents/provisions/{id}":{"get":{"operationId":"get_provision","parameters":[{"description":"the provision job's id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionDto"}}},"description":"the job's state"},"404":{"description":"no such job — the same answer a foreign one gets, so ids do not leak"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"Poll one provision job. 404 unless it belongs to a tenant this identity may see —\nabsent and foreign look the same, so job ids don't leak across tenants.","tags":["provisioning"]}},"/v3/agents/setup":{"get":{"operationId":"get_setup","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupDto"}}},"description":"the ordered steps and where each stands"},"502":{"description":"the platform or the store holding the secrets' presence would not answer; repeat later"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"What is set up for the caller and what is missing, in the order the steps are taken. Each\nstep is `done`, `todo` (the agent makes the call it names), `waits_for_human` (a person\nsets one field at its console link — the link is `null` when no console address is\nconfigured) or `rejected` with a reason. A value is never shown: a secret reads only as set\nor not. `ready` is true when every step before the launch check is done; the launch check\n(`POST /v3/agents/agents/check`) is then the next call.","tags":["setup"]}},"/v3/agents/vm-sizes":{"get":{"operationId":"vm_sizes","parameters":[{"description":"The cluster a launch would stand in, one of `GET /v3/agents/cloud-credentials/{provider}/clusters`.\nLeft out, the cluster a launch naming none would get: the provider's default, else the\nfirst one listed. Ignored where machines go to the fleet's own account.","in":"query","name":"cluster","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/VmSizeDto"},"type":"array"}}},"description":"the published classes that cluster sells, in the operator's order, each with its hourly price in this tenant's own price group — `null` when the cloud does not price it whole, and `null` for EVERY class when the price listing cannot be read or the machine would go to the fleet's account (never a partial set); `default` flags the class a config naming none gets, which may be absent when that cluster does not sell it"},"409":{"description":"no launch of this tenant's could be placed: no cloud credential or connection the operator requires, or no cluster to stand in — the message names what closes the gap"},"422":{"description":"`cluster` is not one of this tenant's clusters"},"502":{"description":"the cloud refused the account's credential, or would not list the clusters"},"503":{"description":"the cloud would not list the machine shapes it sells; repeat later — never answered as an empty list. Unreadable prices are not a 503: they answer `price: null`"}},"security":[{"ApiKey":[]},{"Bearer":[]}],"summary":"The size classes a tenant may choose between (`GET /v3/agents/vm-sizes`): the published classes the\ncloud SELLS in the cluster a launch of theirs would stand in, matched by vCPU and memory\nexactly as a launch is admitted. A class this deployment\npublishes but that cluster does not sell is not offered — choosing it could only end in a\nrefused launch. Without it a client would have to hard-code class names that only the\noperator's config actually defines.","tags":["config"]}},"/v3/agents/whoami":{"get":{"operationId":"whoami","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhoamiResp"}}},"description":"The authenticated user's tenant identity."}},"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":["meta"]}}},"openapi":"3.1.0","info":{"description":"The control plane's tenant HTTP surface: provisioning, agents, tenant configuration and access for the dark-vm fleet. Signed in with a Fluence API key (X-API-KEY) or a Fluence user's Rauthy access token (Authorization: Bearer) — one of them, not both. Secrets never cross this boundary.","title":"dark-orchestrator","version":"0.41.10"},"components":{"schemas":{"WhoamiResp":{"type":"object","required":["role","sub","tenant"],"properties":{"role":{"type":"string","enum":["user"]},"sub":{"type":"string"},"tenant":{"type":"string"}}},"VmSizeDto":{"description":"One published size class as the read API surfaces it. Memory and disk are in the units\nan operator publishes and a tenant reads (MiB/GiB), not the byte-denominated shape the\nadapters translate.","properties":{"cores":{"format":"int64","minimum":0,"type":"integer"},"default":{"description":"True for the class a tenant who never chose one is provisioned at.","type":"boolean"},"disk_gb":{"format":"int64","minimum":0,"type":"integer"},"memory_mb":{"format":"int64","minimum":0,"type":"integer"},"name":{"type":"string"},"price":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VmPriceDto","description":"What a machine of this class costs this tenant in that cluster, by the hour: the\ntenant's own price group, never another account's. `null` when the cloud does not\nprice it whole — a cloud that prices nothing, or one that prices the machine and not\nits disk; never a partial figure. `null` for every class of the answer when the price\nlisting cannot be read, or when this tenant's machines go to the fleet's account."}]}},"required":["name","cores","memory_mb","disk_gb","default"],"type":"object"},"VmPriceDto":{"description":"One machine's hourly price as its cloud states it. Every figure is a decimal string, exact:\n`amount` is `vm` plus `storage`, summed digit for digit.","properties":{"amount":{"description":"`vm` plus `storage`.","type":"string"},"currency":{"description":"The cloud's currency code, e.g. `USD`.","type":"string"},"per":{"description":"The period every amount is for: always `hour`.","type":"string"},"storage":{"description":"The price of the boot disk a machine of this class is created with: its size times\nits type's per-GB price.","type":"string"},"vm":{"description":"The price of the exact configuration a machine of this class is created as.","type":"string"}},"required":["amount","currency","per","vm","storage"],"type":"object"},"SetupDto":{"description":"`GET /v3/agents/setup`.","properties":{"ready":{"description":"Every step is done.","type":"boolean"},"steps":{"description":"In the order they are taken.","items":{"$ref":"#/components/schemas/SetupStepDto"},"type":"array"}},"required":["ready","steps"],"type":"object"},"SetupStepDto":{"description":"One step of the setup.","properties":{"call":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SetupCall","description":"Set when `state` is `todo`."}]},"link":{"description":"Set when `state` is `waits_for_human` and the console address is configured: opens the\none field, marked as coming from an agent. `null` when no console address is\nconfigured.","type":["string","null"]},"reason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SetupRejection","description":"Set when `state` is `rejected`."}]},"state":{"$ref":"#/components/schemas/SetupState"},"step":{"$ref":"#/components/schemas/SetupStepKind"},"subject":{"description":"What the step is about, when there are several of its kind: a profile, provider,\nenvironment, or secret name. `null` otherwise.","type":["string","null"]},"summary":{"description":"One sentence for the person reading along; never a value.","type":"string"}},"required":["step","state","summary"],"type":"object"},"SetupStepKind":{"description":"Which part of the path a step is.","enum":["service_connection","model_source","provider_key","environment","repository_access","secret_value","preset","launch_check"],"type":"string"},"SetupState":{"description":"Where a step stands.","enum":["done","todo","waits_for_human","rejected"],"type":"string"},"SetupRejection":{"description":"Why a step is rejected: a closed list.","enum":["models_not_listed","forge_token_unverified","earlier_step_open"],"type":"string"},"SetupCall":{"description":"A call the agent makes itself.","properties":{"method":{"type":"string"},"path":{"type":"string"}},"required":["method","path"],"type":"object"},"ProvisionDto":{"description":"A provision job as the read API surfaces it. `instance_id` appears as soon as the\ncloud assigns one; `result` is `{instance_id, address}` JSON on success or the\nerror reason on failure — never a secret.","properties":{"created_at_ms":{"format":"int64","type":"integer"},"idle_timeout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/IdleTimeoutDto","description":"The idle timeout this launch asked for, or `null` for the tenant's stored default.\n\nEchoed for the reason `vm_size` is: a setting that cannot be read back is a promise\nwith no answer. Here the answer arrives even later than a bill would — a machine that\nwas supposed to be `\"disabled\"` and was not is discovered by its absence."}]},"instance_id":{"type":["string","null"]},"provider":{"type":"string"},"provision_id":{"type":"string"},"result":{"type":["string","null"]},"status":{"type":"string"},"tenant":{"type":"string"},"updated_at_ms":{"format":"int64","type":"integer"},"vm_size":{"description":"The size class this launch asked for, or `null` for the tenant's stored default.","type":["string","null"]}},"required":["provision_id","tenant","provider","status","created_at_ms","updated_at_ms"],"type":"object"},"IdleTimeoutDto":{"description":"`idle_timeout` as a caller writes it: `3600`, or `\"disabled\"`.\n\nUntagged on purpose — the wire is the plain value (`\"idle_timeout\": 3600` /\n`\"idle_timeout\": \"disabled\"`), not a wrapper object. Anything that is neither a whole\nnumber of seconds nor that one word fails to deserialize, which is a `422` naming the\nfield rather than a silently defaulted timeout.","oneOf":[{"description":"Seconds of idleness after which the machine retires itself. `0` is refused with a\n`422` naming the field; responses never carry `0`.","format":"int32","minimum":0,"type":"integer"},{"$ref":"#/components/schemas/IdleTimeoutNever","description":"Never retire this machine for being idle."}]},"IdleTimeoutNever":{"description":"The one word the string form accepts: `disabled`. Any other string is refused with a `422`.","enum":["disabled"],"type":"string"},"ProvisionAcceptedDto":{"description":"The `202` body for a provision: the job id to poll (`GET /v3/agents/provisions/{id}`) and its\n(initial) status.","properties":{"provision_id":{"type":"string"},"status":{"type":"string"}},"required":["provision_id","status"],"type":"object"},"ProvisionReq":{"additionalProperties":false,"description":"Unknown fields are rejected for the reason the onboarding bodies reject them: a typo'd\nfield answered `202` would read as an honoured choice the VM never received.","properties":{"idle_timeout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/IdleTimeoutDto","description":"How long THIS machine may sit unused before it retires itself: a number of seconds,\nor `\"disabled\"` to say never. Omitted = the tenant's configured default, and failing\nthat the operator's — the same cascade `vm_size` walks, and never rewriting the\ntenant's own setting for the sake of one launch.\n\nA duration below the operator's published minimum is a 422 naming that minimum,\nexactly as an unpublished `vm_size` is refused: a floor silently rounded up is a\nmachine that outlives what its owner asked for, and that shows up on the bill.\n`\"disabled\"` is not a duration, so no floor applies to it."}]},"preset":{"description":"The launch form this machine is raised from, by id or by name\n(`GET /v3/agents/presets`). REQUIRED. The machine takes what an agent admitted from the same\npreset freezes: its config and plugins, its environment at that environment's CURRENT\nversion, and its AI profile (the tenant's default when it names none). Only agents of\nthe same environment version, AI profile and form seat on the machine.\n\nA preset that is not this tenant's, or has been deleted, is a 404. One that no longer\nholds is a 409 naming it: its environment or AI profile has ended, or the environment's\ncurrent version lacks a secret its MCP servers or plugins name.","type":"string"},"provider":{"description":"Which configured cloud provider to provision on (`yc`/`do`/…). Omitted =\nthe operator-configured default. An unknown name is a 400 naming the\nconfigured ones.","type":["string","null"]},"tenant":{"description":"Deprecated; omit it. The tenant comes from the caller's credential. When given it is\nstill honoured and logged, and may be removed in a later version.","type":["string","null"]},"vm_size":{"description":"Size class for THIS launch only (`small`, `large`, … — whatever `GET /v3/agents/vm-sizes`\npublishes). Omitted = the tenant's configured default, which naming a size here never\nrewrites.\n\nAn unpublished class is a 422 naming the published ones — never the nearest match.","type":["string","null"]}},"required":["preset"],"type":"object"},"PresetDto":{"description":"One live preset as the surface answers with it. Carries no secret value: MCP servers and\nplugins name secrets, never hold them.","properties":{"ai_profile":{"description":"The AI profile's id; `null` = the tenant's default profile at launch.","type":["string","null"]},"config":{"$ref":"#/components/schemas/TenantVmConfigDto"},"created_at_ms":{"format":"int64","type":"integer"},"default_model":{"type":["string","null"]},"environment":{"description":"The environment's id.","type":"string"},"id":{"description":"Ours. What a launch names.","type":"string"},"name":{"type":"string"},"plugins":{"items":{"$ref":"#/components/schemas/PluginDto"},"type":"array"},"preamble":{"description":"The preamble every launch from this preset opens its first message with; `null` = none.","type":["string","null"]},"prompt":{"type":["string","null"]},"repo_url":{"type":["string","null"]},"subagents":{"additionalProperties":{"$ref":"#/components/schemas/SubagentDto"},"description":"The subagents by role; absent when the preset has none.","propertyNames":{"type":"string"},"type":"object"},"updated_at_ms":{"format":"int64","type":"integer"}},"required":["id","name","environment","config","plugins","created_at_ms","updated_at_ms"],"type":"object"},"SubagentDto":{"additionalProperties":false,"description":"One subagent of a preset: the model its role runs on, and optionally how the role is\ndescribed to the primary agent and the system prompt it runs under.","properties":{"description":{"description":"At most 512 characters; when present, not blank.","type":["string","null"]},"model":{"description":"`provider/model`, one the preset's AI profile can run.","type":"string"},"prompt":{"description":"The role's system prompt, at most 16 KiB; when present, not blank.","type":["string","null"]}},"required":["model"],"type":"object"},"PluginDto":{"properties":{"env":{"additionalProperties":{"type":"string"},"description":"Non-secret environment literals returned exactly as configured.","propertyNames":{"type":"string"},"type":"object"},"id":{"deprecated":true,"description":"DEPRECATED — still sent as before, but no longer promised: do not build on it.\nStable, server-generated identifier, carried with the record onto a derived set.","type":"string"},"secret_env":{"additionalProperties":{"pattern":"^[a-z0-9_]+$","type":"string"},"description":"Environment variable to guest-secret name. Secret values are never returned.","propertyNames":{"type":"string"},"type":"object"},"specifier":{"description":"npm package with optional version/tag, an HTTPS .tgz URL, or\n`github:<owner>/<repo>[#<ref>]` of a public repository whose root package carries a\nbuilt plugin.","type":"string"}},"required":["id","specifier","env","secret_env"],"type":"object"},"TenantVmConfigDto":{"additionalProperties":false,"description":"A set's VM config: the skills repos to seed, the MCP servers to wire up and the VM size\nclass to provision at. Absent fields mean \"nothing configured\", not an error — configs\nstored before a field existed still read back.\n\n**A set carries nothing about models**: the endpoints and keys an agent reaches models\nwith are an AI profile's (`/v3/agents/ai-profiles`), named at launch. `llm_providers` is no longer\naccepted — a body that sends it is a 422 naming `/v3/agents/ai-profiles`. Unknown fields, including\nthe retired `llm_provider`, are refused with a `422`.","properties":{"cluster":{"description":"The provider's cluster this set's machines are placed in when they are created in the\ntenant's own cloud account — one of `GET /v3/agents/cloud-credentials/{provider}/clusters`.\n`None` = the provider's configured default; where the deployment configures none, a\nlaunch into the tenant's account is refused (409) naming `config.cluster`. A machine\nin the fleet's account ignores it.","type":["string","null"]},"idle_timeout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/IdleTimeoutDto","description":"How long this tenant's machines may sit unused before retiring themselves: a number\nof seconds, or `\"disabled\"` to say never. `None` = the operator's fleet-wide default.\n\nThe middle step of the same cascade `vm_size` walks — a launch may name its own, and\nnaming one there never rewrites this. Validated on write like a size class is, so a\nduration under the operator's minimum never reaches the store.\n\nAn agent's idleness counts from the last message the API gave it: work its session\ndoes on a turn no API message started — one begun by a channel frame — never extends\nit. Whoever drives agents by channel launches them with `\"disabled\"` and\nstops them when done."}]},"mcp_servers":{"items":{"$ref":"#/components/schemas/McpServerRefDto"},"type":"array"},"skills_repos":{"description":"The skills repos to seed: each URL is cloned into its own subdirectory on the\nmachine, so adding one never removes another. Empty = no skills.","items":{"type":"string"},"type":"array"},"vm_size":{"description":"The NAME of a size class the operator published (`GET /v3/agents/vm-sizes`) — never raw\ncores/memory. Absent = the operator's default class. An unpublished name is refused on\nwrite; a class *withdrawn* after the fact resolves back to the default at provision\ntime.","type":["string","null"]},"web_search":{"default":true,"description":"Whether an agent on these machines can search the web: `true` — its searches go to\nExa, with no key of the tenant's; `false` — it has no web search tool at all. Absent =\n`true`, and an answer carries it only when it is `false`. Machines differing in it are\nnot shared between agents.","type":"boolean"}},"type":"object"},"McpServerRefDto":{"description":"One MCP server an opencode session on the tenant VM should have available.","properties":{"name":{"description":"opencode server key, e.g. `\"nks\"`.","type":"string"},"secret_header":{"$ref":"#/components/schemas/SecretHeaderDto","description":"How the endpoint takes the secret: `bearer` (`Authorization: Bearer …`, the default)\nor `x-api-key` (`X-API-KEY: …`). Only with `secret_ref`."},"secret_ref":{"description":"The NAME of one of the environment's named secrets (e.g. `\"nks_pat\"`) — never a secret\nvalue.","pattern":"^[a-z0-9_]+$","type":["string","null"]},"url":{"description":"Remote MCP endpoint.","type":"string"}},"required":["name","url"],"type":"object"},"SecretHeaderDto":{"description":"The header an MCP server's secret is presented in.","enum":["bearer","x-api-key"],"type":"string"},"PatchPresetReq":{"additionalProperties":false,"description":"Body of `PATCH /v3/agents/presets/{id}` — only what changes. A field left out stays as stored;\n`null` clears it (an optional field back to none, a list back to empty); a value replaces\nit, a list whole. `name` and `environment` cannot be cleared.","properties":{"ai_profile":{"description":"The AI profile a launch uses, by id or name; `null` = the tenant's default at launch.","type":["string","null"]},"config":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PatchVmConfigReq","description":"The VM config, field by field: one left out of this object stays too. `null` resets\nthe whole config."}]},"default_model":{"description":"The model a launch gets when its request names none; `null` = none, so a launch\nmust name its own.","type":["string","null"]},"environment":{"description":"Another environment, by id or name. The one the preset named before stands until its\nown `DELETE`, as on a replace.","type":"string"},"name":{"description":"A new name, unique among the tenant's LIVE presets (409).","type":"string"},"plugins":{"description":"The WHOLE plugin list, each record minted anew; left out, the stored records stay as\nthey are.","items":{"$ref":"#/components/schemas/CreatePluginReq"},"type":["array","null"]},"preamble":{"description":"The preamble a launch opens its first message with, not blank; `null` = none.","type":["string","null"]},"prompt":{"description":"The prompt a launch starts with, not blank; `null` = none.","type":["string","null"]},"repo_url":{"description":"The repository a launch works on, HTTPS without credentials; `null` = none.","type":["string","null"]},"subagents":{"additionalProperties":{"$ref":"#/components/schemas/SubagentDto"},"description":"The WHOLE map of subagents; `null` = none.","propertyNames":{"type":"string"},"type":["object","null"]}},"type":"object"},"CreatePluginReq":{"additionalProperties":false,"properties":{"env":{"additionalProperties":{"type":"string"},"description":"Non-secret environment literals.","propertyNames":{"type":"string"},"type":"object"},"secret_env":{"additionalProperties":{"pattern":"^[a-z0-9_]+$","type":"string"},"description":"Environment variable to guest-secret name (`^[a-z0-9_]+$`). Secret values are never accepted here.","propertyNames":{"type":"string"},"type":"object"},"specifier":{"description":"npm package, HTTPS .tgz URL or `github:<owner>/<repo>[#<ref>]`; at most 2048 UTF-8\nbytes. At most 100 records per set.","type":"string"}},"required":["specifier"],"type":"object"},"PatchVmConfigReq":{"additionalProperties":false,"description":"The `config` of a `PATCH /v3/agents/presets/{id}`: the fields of the VM config, each on the same\nterms as the body's own — left out stays, `null` clears, a value replaces.","properties":{"cluster":{"description":"The provider's cluster machines are placed in; `null` = the provider's default.","type":["string","null"]},"idle_timeout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/IdleTimeoutDto","description":"Seconds of idleness before a machine retires itself, or `\"disabled\"`; `null` = the\noperator's fleet-wide default."}]},"mcp_servers":{"description":"The WHOLE list of MCP servers; `null` = none.","items":{"$ref":"#/components/schemas/McpServerRefDto"},"type":["array","null"]},"skills_repos":{"description":"The WHOLE list of skills repos; `null` = none.","items":{"type":"string"},"type":["array","null"]},"vm_size":{"description":"The name of a published size class; `null` = the operator's default class.","type":["string","null"]},"web_search":{"description":"Whether agents can search the web; `null` = back to on.","type":["boolean","null"]}},"type":"object"},"PresetReq":{"additionalProperties":false,"description":"The complete configuration for `POST /v3/agents/presets`.","properties":{"ai_profile":{"description":"The AI profile a launch uses — its id or name. Absent = the tenant's DEFAULT profile,\nresolved at each launch rather than frozen here. Another tenant's or an unknown one is a\n`404`.","type":["string","null"]},"config":{"$ref":"#/components/schemas/TenantVmConfigDto","description":"The VM config: size class, cluster, idle timeout, skills repos, MCP servers. Every\n`secret_ref` must name a secret the environment's current version holds."},"default_model":{"description":"The model an agent launched from this preset gets when its request names none. Judged\nagainst the preset's AI profile on every write (`422 model_not_available`).","type":["string","null"]},"environment":{"description":"The environment a launch from this preset enters — its id or the name the tenant gave\nit. Stored as the id. Another tenant's, an ended one and an unknown one are a `404`.","type":"string"},"name":{"description":"The tenant's own, unique among their LIVE presets (409).","type":"string"},"plugins":{"description":"The plugins, in the order the guest receives them, each minted as a new record with a\nserver-generated id on every write. Every `secret_env` value must name a secret the\nenvironment's current version holds.","items":{"$ref":"#/components/schemas/CreatePluginReq"},"type":"array"},"preamble":{"description":"A preamble every launch from this preset opens its first message with; when present, not\nblank. It comes before the launch text — the request's prompt, else the preset's `prompt`\n— so the part of a briefing that never changes from task to task need not be handed to\neach launch. A launch naming no prompt of its own takes this preset's `prompt`; a preset\nwith neither leaves the launch to name its own — a preamble alone is not a first message.","type":["string","null"]},"prompt":{"description":"The prompt a launch starts with; when present, not blank.","type":["string","null"]},"repo_url":{"description":"The repository a launch works on; HTTPS without credentials.","type":["string","null"]},"subagents":{"additionalProperties":{"$ref":"#/components/schemas/SubagentDto"},"description":"The subagents a launch's coding agent can hand work to, by role name\n(`^[a-z0-9][a-z0-9_-]{0,63}$`; `build`, `plan`, `general`, `explore` and `default` are\nthe coding agent's own and refused). At most 16. Every model is judged against the\npreset's AI profile on every write and at every launch (`422 model_not_available`).\nAbsent = none.","propertyNames":{"type":"string"},"type":"object"}},"required":["name","environment"],"type":"object"},"ModelEntryDto":{"description":"One model an agent may be placed on, and the machine that offers it.\n\nFLAT, one row per model per machine, with the source ON THE ROW rather than on an\nenvelope: a tenant with two machines can hold one that reported and one still standing on\nits declared list, and a single label over both would lie about one of them. A failed\nresolution contributes no rows at all — there is nothing to schedule — and says why on\nits machine's own detail.","properties":{"instance_id":{"type":"string"},"model":{"type":"string"},"source":{"$ref":"#/components/schemas/ModelsSourceDto"}},"required":["model","source","instance_id"],"type":"object"},"ModelsSourceDto":{"description":"Where a set came from, as `GET /v3/agents/models` labels every ROW. `reported` is the machine's own\nanswer; `declared` is the tenant's configured list standing in for a guest too old to\nreport. Only `reported` speaks for the machine.\n\nThere is no `unreadable` here on purpose: such a document offers no models, so no row of\nthat list can carry the label.","enum":["reported","declared"],"type":"string"},"TeardownAcceptedDto":{"description":"The `202` body for a teardown: the instance to watch (`GET /v3/agents/instances/{id}`\nreports `tearing_down` → `retired`).","properties":{"instance_id":{"type":"string"},"status":{"type":"string"},"tenant":{"type":"string"}},"required":["tenant","instance_id","status"],"type":"object"},"InstanceDetailDto":{"description":"Non-secret details about this VM: its registry record, entry-point URLs, and guest health.","properties":{"address":{"type":["string","null"]},"agent_reservation_count":{"format":"int64","type":["integer","null"]},"created_at_ms":{"format":"int64","type":"integer"},"environment":{"description":"The id of the environment this machine was raised from — the credentials it runs on, at\nthe version it was raised under; its config and plugins come from its preset. `null`\nfor an unbound spare, which is nobody's machine yet.","type":["string","null"]},"guest":{"$ref":"#/components/schemas/GuestView"},"instance_id":{"type":"string"},"live_agent_count":{"format":"int64","type":["integer","null"]},"models":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MachineModelsDto","description":"What this machine says it can run. ABSENT when nothing is known about it — a machine\nnot yet asked, or one raised before this field existed. Absent is not an empty set:\nit means \"not asked\", not \"serves nothing\"."}]},"raised_by":{"description":"Who asked for this machine, beside the tenant that owns it. Informational only: it\ndoes not restrict who may act on the machine.\n\nAbsent where there is no answer, which is not the same as nobody: a machine raised\nbefore this field existed, one taken from the warm pool, or one whose request record\nis gone.","type":["string","null"]},"retired_reason":{"description":"Why this machine was retired, when it was retired for a reason of its own rather than\nbecause the tenant asked. Absent on every live machine and on an ordinary teardown,\nso its presence is the whole signal.","type":["string","null"]},"status":{"type":"string"},"tenant":{"description":"`None` for an unbound spare — a bound row always serializes its tenant.","type":["string","null"]},"updated_at_ms":{"format":"int64","type":"integer"}},"required":["instance_id","status","created_at_ms","updated_at_ms","guest"],"type":"object"},"MachineModelsDto":{"description":"One machine's answer about the models it can run, PER ENDPOINT.\n\nEndpoints resolve independently — one can refuse while another answers — so this carries\na group per endpoint, each with its own models or its own failure reason.\n\n`unreadable` is a third answer, not a shade of failure: the machine's guest said something\nthis service could not read. It carries no endpoints and offers nothing.","oneOf":[{"description":"What the machine's own guest resolved.","properties":{"providers":{"items":{"$ref":"#/components/schemas/ProviderModelsDto"},"type":"array"},"source":{"enum":["reported"],"type":"string"}},"required":["providers","source"],"type":"object"},{"description":"The tenant's configured list standing in for a guest too old to report. Only\n`reported` speaks for the machine.","properties":{"providers":{"items":{"$ref":"#/components/schemas/ProviderModelsDto"},"type":"array"},"source":{"enum":["declared"],"type":"string"}},"required":["providers","source"],"type":"object"},{"description":"The guest answered and this service could not read it — our fault to look at, not the\ntenant's endpoint's.","properties":{"failure":{"$ref":"#/components/schemas/ModelsFailureDto"},"source":{"enum":["unreadable"],"type":"string"}},"required":["failure","source"],"type":"object"}]},"ModelsFailureDto":{"description":"Why a resolution failed: `reason` is the class, `detail` is prose and may be absent.","properties":{"detail":{"type":["string","null"]},"reason":{"type":"string"}},"required":["reason"],"type":"object"},"ProviderModelsDto":{"description":"One endpoint's answer, named by the provider key the tenant configured.","properties":{"declared":{"description":"`true` on a record the orchestrator added to a `reported` answer: a built-in provider the\nmachine runs on its key, which the guest's report does not name, shown with the models\nthe orchestrator's catalog lists for a key. Only the other records speak for the machine.","type":"boolean"},"failure":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ModelsFailureDto","description":"Present when the status is `failed`, and the reason a tenant acts on: an endpoint\nthat refused is a different problem from an endpoint that serves nothing."}]},"models":{"description":"Model ids as an agent would name them (`provider/model`).","items":{"type":"string"},"type":"array"},"name":{"description":"The provider key inside the guest's config — the same name the tenant sent.","type":"string"},"status":{"$ref":"#/components/schemas/ModelsResolutionDto"}},"required":["name","status","models","declared"],"type":"object"},"ModelsResolutionDto":{"description":"Whether ONE endpoint's models could be resolved at all.","enum":["resolved","failed"],"type":"string"},"GuestView":{"description":"The guest's live status, best-effort. `reachable=false` + `error` when the guest\ncan't be reached (e.g. still booting, or a private-only address).\n\n`health` and `heal` are the guest agent's own response bodies, relayed verbatim; their\nshape is the guest's and may gain fields.","properties":{"error":{"type":["string","null"]},"heal":{},"health":{},"reachable":{"type":"boolean"}},"required":["reachable"],"type":"object"},"InstanceDto":{"description":"One machine of the fleet, as the list returns it. Carries no secrets. `status` is the\nlifecycle state (`ready`/`retired`/…).","properties":{"address":{"type":["string","null"]},"agent_reservation_count":{"format":"int64","type":["integer","null"]},"created_at_ms":{"format":"int64","type":"integer"},"environment":{"description":"The id of the environment this machine was raised from — the credentials it runs on, at\nthe version it was raised under; its config and plugins come from its preset. `null`\nfor an unbound spare, which is nobody's machine yet.","type":["string","null"]},"instance_id":{"type":"string"},"live_agent_count":{"format":"int64","type":["integer","null"]},"provider":{"type":"string"},"retired_reason":{"description":"Why this machine was retired, when it was retired for a reason of its own rather than\nbecause the tenant asked. Absent on every live machine and on an ordinary teardown,\nso its presence is the whole signal.","type":["string","null"]},"status":{"type":"string"},"tenant":{"description":"`None` for an unbound spare — a bound row always serializes its tenant.","type":["string","null"]},"updated_at_ms":{"format":"int64","type":"integer"}},"required":["provider","instance_id","status","created_at_ms","updated_at_ms"],"type":"object"},"EnvironmentVersionDto":{"description":"One row of `GET /v3/agents/environments/{id}/versions`: a version number, whether it is the one new\nmachines are raised on now, and the PRESENCE of the secret names that version holds —\nnever a value. A version with no credentials at all answers with\nan empty `secrets` list, not an absent field.","properties":{"current":{"description":"Whether this is the environment's CURRENT version — the one a machine raised now is\nborn on. Exactly one row carries `true`.","type":"boolean"},"secrets":{"description":"Which of this version's credentials are set, and in which namespace — the same presence\nshape the set itself answers with, a name and a kind, never a value.","items":{"$ref":"#/components/schemas/EnvironmentSecretPresence"},"type":"array"},"version":{"description":"The version number, ascending across the list. Version 1 is the environment's first\nsecret document; each edit mints the next.","format":"int32","type":"integer"}},"required":["version","current","secrets"],"type":"object"},"EnvironmentSecretPresence":{"description":"One row of an environment's `secrets`: which credential, in which namespace, and when it\nwas last set — never a value.","properties":{"check":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ForgeCheckDto","description":"What the forge said of a `forge` row's token when it was written — `null` on a named\nsecret, and on a forge token written before tokens were checked."}]},"kind":{"$ref":"#/components/schemas/EnvironmentSecretKind","description":"Which namespace `name` is drawn from — see `EnvironmentSecretKind`. Read this\nFIRST: a `named` row called `github` is a tenant's own secret, not the forge of the\nsame name."},"name":{"type":"string"},"set_at_ms":{"description":"When this credential was set in this set — by the set's creation or by the edit that\nminted a version — and carried unchanged into every later version that kept it. A\ncredential set before the set recorded its own times shows the last time one of this\nNAME was set for the tenant, if that was recorded. `null` means time not recorded, not\n\"not set\", which the row's presence already answers.","format":"int64","type":["integer","null"]}},"required":["kind","name"],"type":"object"},"EnvironmentSecretKind":{"description":"The namespace a set's own credential is named in — what tells apart two rows that could\notherwise share a NAME: a tenant's own named secret and a forge credential.","enum":["forge","named"],"type":"string"},"ForgeCheckDto":{"description":"What a forge said of a token when the set took it. A token the forge refused is not here:\nthe write that brought it was refused.","properties":{"checked_at_ms":{"format":"int64","type":"integer"},"expires_at_ms":{"description":"When the token stops working, if the forge said so.","format":"int64","type":["integer","null"]},"owner":{"description":"The forge account the token belongs to, when verified.","type":["string","null"]},"reason":{"description":"Why the token could not be checked: `unreachable`, `not_https`, `bad_address`,\n`address_refused` (an address a check may not dial), `no_address`, `redirected`,\n`not_this_forge`, `unexpected_answer`, `proxy_hides_address` or `unsendable_token`.\n`null` when verified.","type":["string","null"]},"verified":{"description":"Whether the forge took the token. `false` = it could not be asked; `reason` says why.","type":"boolean"}},"required":["verified","checked_at_ms"],"type":"object"},"SecretDeclarationDto":{"description":"One declared secret of an environment: the name, and whether its value is held yet.","properties":{"declared_at_ms":{"format":"int64","type":"integer"},"is_set":{"description":"Whether the environment's current version holds a value under this name.","type":"boolean"},"link":{"description":"The console link to the secret's one field, while it is not set and the console address\nis configured; otherwise `null`.","type":["string","null"]},"name":{"type":"string"}},"required":["name","declared_at_ms","is_set"],"type":"object"},"EnvironmentDto":{"description":"One environment as the surface answers with it.\n\nA set stands, with its secrets, until its tenant deletes it (`DELETE /v3/agents/environments/{id}`):\nnothing ends it on its own, however long nothing has held it.","properties":{"created_at_ms":{"format":"int64","type":"integer"},"id":{"description":"Ours, a uuid. What every machine, provision job and agent of this set carries, and\nwhat addresses it after its name has been given up by an ending.","type":"string"},"name":{"description":"The tenant's own, unique among their LIVE sets. A name is what a caller says out\nloud — `POST /v3/agents/presets` and the environment routes take either this or the id.","type":"string"},"secrets":{"description":"Which of THIS set's own credentials are set, and when — forge credentials AND the\nset's own named secrets — a name and a time, never a value. `kind` is what lets a\nclient tell a named secret called `github` apart from the forge of the same NAME. A set\nwith no credentials at all answers with an empty list, not an absent field.","items":{"$ref":"#/components/schemas/EnvironmentSecretPresence"},"type":"array"},"version":{"description":"The set's CURRENT version — the one a machine raised now is born on, and the one\n`secrets` reads. Each secret edit mints the next.","format":"int32","type":"integer"}},"required":["id","name","secrets","version","created_at_ms"],"type":"object"},"PatchEnvironmentReq":{"additionalProperties":false,"description":"Body of `PATCH /v3/agents/environments/{id}` — the secrets this edit changes, each by name: a value\nsets or replaces it, `null` removes it, one left out stays as it is. Forges and named\nsecrets are separate namespaces, so a named secret called `github` and the `github` forge\nare never the same entry. The edit mints the next immutable version of the set and makes it\ncurrent; an empty body still does.","properties":{"forges":{"additionalProperties":{"additionalProperties":false,"properties":{"api_token":{"type":"string"},"base_url":{"description":"A self-hosted forge's base URL. Left out or `null`, the address the set already holds for this forge stays — the public instance for a forge set without one.","type":["string","null"]}},"required":["api_token"],"type":["object","null"]},"description":"Forge credentials by forge kind (`forgejo`, `github`, `gitlab`): a token sets or replaces that forge's credential, `null` removes it, a forge left out stays as it is.","propertyNames":{"enum":["forgejo","github","gitlab"],"type":"string"},"type":"object"},"named_secrets":{"additionalProperties":{"type":["string","null"]},"description":"The set's named secrets this edit changes, by name — each name `^[a-z0-9_]+$`: a value sets or replaces the secret, `null` removes it, a name left out stays as it is. Only the names the guest itself reserves are refused (422).","propertyNames":{"pattern":"^[a-z0-9_]+$","type":"string"},"type":"object"}},"type":"object"},"CreateEnvironmentReq":{"additionalProperties":false,"description":"Body of `POST /v3/agents/environments` — a name and the credentials of the set's first version.","properties":{"name":{"description":"What the tenant will say out loud. Must be free among their live sets (409).","type":"string"},"secrets":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PatchSecretsReq","description":"The credentials of the set's first version. Absent = a set with no credentials at\nall — which no machine will come up healthy from, and is still a legitimate thing to\ncreate and then give secrets with a version edit."}]}},"required":["name"],"type":"object"},"PatchSecretsReq":{"additionalProperties":false,"description":"The credentials a creation or a derive writes into the set it freezes, where an ABSENT\nfield means \"as the source has it\" (nothing, for a creation). Unknown fields are rejected\n(422) rather than ignored: a typo'd key would otherwise read as a successful write of a\ncredential the set does not carry.\n\nIt sets and replaces; it cannot express a removal — a derive's `drop_forges` and\n`drop_named` are how a credential is left out of the new set.","properties":{"forges":{"items":{"$ref":"#/components/schemas/OnboardForge"},"type":"array"},"named_secrets":{"additionalProperties":{"type":"string"},"description":"The set's own named secrets to upsert, by name — each name `^[a-z0-9_]+$`. Besides, only the names the guest itself reserves are refused (422).","propertyNames":{"pattern":"^[a-z0-9_]+$","type":"string"},"type":"object"}},"type":"object"},"OnboardForge":{"additionalProperties":false,"description":"One forge credential in a set's secrets body. Unknown fields are refused with a `422`.","properties":{"api_token":{"type":"string"},"base_url":{"type":["string","null"]},"kind":{"$ref":"#/components/schemas/ForgeKindDto"}},"required":["kind","api_token"],"type":"object"},"ForgeKindDto":{"description":"The forges a machine's agent can register with: `forgejo`, `github` or `gitlab`.","enum":["forgejo","github","gitlab"],"type":"string"},"EnvironmentDeclarationDto":{"description":"An environment with the secrets declared on it.","properties":{"declared_secrets":{"items":{"$ref":"#/components/schemas/SecretDeclarationDto"},"type":"array"},"id":{"type":"string"},"name":{"type":"string"},"version":{"format":"int32","type":"integer"}},"required":["id","name","version","declared_secrets"],"type":"object"},"DeclareEnvironmentReq":{"additionalProperties":false,"description":"`POST /v3/agents/environment-declarations`: an environment named without any secret value, and the\nnames of the secrets it will hold. Values are typed by a person at the console links the\nanswer carries. The body has no value field and refuses one.","properties":{"name":{"description":"What the tenant will say out loud. When a live set of this name exists, the call\ndeclares the names on it and changes nothing else.","type":"string"},"secret_names":{"description":"Named secrets to declare on the set, each `^[a-z0-9_]+$`: names only — a value is never accepted here. A name already declared stays declared.","items":{"pattern":"^[a-z0-9_]+$","type":"string"},"type":"array"}},"required":["name"],"type":"object"},"CloudCluster":{"description":"One cluster the caller's stored credential can place machines in — what an environment's\n`config.cluster` names. As the cloud names it.","properties":{"id":{"description":"The provider's cluster id: the value for `config.cluster`.","type":"string"},"location":{"description":"Where it stands, when the provider says (`Frankfurt, DE`).","type":["string","null"]},"name":{"description":"The provider's name for it.","type":"string"}},"required":["id","name"],"type":"object"},"CloudCredentialForgetting":{"description":"The body of a `202` from `DELETE /v3/agents/cloud-credentials/{provider}`: the forget has begun and\nis not finished, and `detail` says what it waits on. The orchestrator finishes it on its\nown; a repeated `DELETE` answers `202` until it is done and `204` after.","properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"},"PutCloudCredentialReq":{"additionalProperties":false,"description":"The body of `PUT /v3/agents/cloud-credentials/{provider}`: the token, and nothing else. An unknown\nfield is refused with a `422` that names the accepted one.","properties":{"token":{"description":"The provider's API token for the tenant's own account. Must not be blank.","type":"string"}},"required":["token"],"type":"object"},"CloudCredentialPresence":{"description":"One stored cloud credential, as the tenant is shown it: which provider, and since when.\n\nCarries nothing from which the token could be recovered or a guess about it confirmed — no\nfingerprint, no length.","properties":{"forgetting_since_ms":{"description":"When a `DELETE` of it began, while that forget is not finished — the network footing\nin the account is still being removed. Absent otherwise. No launch goes into the\naccount meanwhile; the orchestrator finishes the forget on its own.","format":"int64","type":["integer","null"]},"provider":{"description":"The provider the credential is for, as `/v3/agents/provision` names it (`fluence`, …).","type":"string"},"set_at_ms":{"description":"When it was last stored, in unix millis.","format":"int64","type":"integer"}},"required":["provider","set_at_ms"],"type":"object"},"AiProviderDto":{"description":"One provider of the catalog.","properties":{"harness_provider":{"description":"The provider of the harness a model reached through this entry is named under\n(`openai/<model>`). Two entries with one are two sources of one provider — a\nsubscription and a key; the profile chooses between them in `sources`.","type":"string"},"id":{"description":"Fixed by the orchestrator: never changes.","type":"string"},"kind":{"$ref":"#/components/schemas/AiProviderKind"},"name":{"type":"string"}},"required":["id","name","kind","harness_provider"],"type":"object"},"AiProviderKind":{"description":"How a catalog provider is reached from a profile.","enum":["known","subscription"],"type":"string"},"AiSubscriptionDto":{"description":"One subscription, as the tenant is shown it. Carries nothing from which a token could be\nrecovered or a guess about it confirmed.","properties":{"access_expires_at_ms":{"description":"When the current access token expires, unix millis (active only).","format":"int64","type":["integer","null"]},"created_at_ms":{"format":"int64","type":"integer"},"forgetting_since_ms":{"description":"When a `DELETE` of it began, while that is not finished.","format":"int64","type":["integer","null"]},"generation":{"description":"Moves on every newly issued access token of this subscription.","format":"int64","type":"integer"},"id":{"description":"The subscription's own id, made by the orchestrator at login.","type":"string"},"login_expires_at_ms":{"description":"When the pending login's code stops being good, unix millis (pending only).","format":"int64","type":["integer","null"]},"profile_id":{"description":"The profile that holds it.","type":"string"},"provider":{"description":"The provider (`chatgpt`).","type":"string"},"provider_id":{"description":"The provider's id in the catalog (`GET /v3/agents/ai-providers`).","type":"string"},"refreshed_at_ms":{"description":"When the current access token was issued, unix millis.","format":"int64","type":["integer","null"]},"selected":{"description":"Whether this is the one the profile's machines run on — at most one per provider.","type":"boolean"},"state":{"$ref":"#/components/schemas/AiSubscriptionState"},"updated_at_ms":{"format":"int64","type":"integer"}},"required":["id","profile_id","provider","provider_id","state","selected","generation","created_at_ms","updated_at_ms"],"type":"object"},"AiSubscriptionState":{"description":"Where a subscription stands.","enum":["pending","active","needs_login","forgetting"],"type":"string"},"PatchAiSubscriptionReq":{"additionalProperties":false,"description":"`PATCH /v3/agents/ai-profiles/{id}/subscriptions/{subscription_id}`.","properties":{"selected":{"description":"`true` makes this the subscription the profile's machines run on for its provider —\nonly an active one. A selection is not unset, only moved to another subscription or\nleft by forgetting this one: `false` or `null` on the selected one is refused; on any\nother they change nothing. Absent leaves it. This is no exception to «`null` clears»:\na subscription's selection has never had an unset, only select and forget, and this\nfield adds none. Running the provider on its key instead, without forgetting the\nsubscription, is the provider's source preference, not this field.","type":["boolean","null"]}},"type":"object"},"AiSubscriptionForgetting":{"description":"The `202` of a `DELETE` that has begun and not finished: what it waits on.","properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"},"AiLoginStartedDto":{"description":"Where to sign in and the device code to enter.","properties":{"expires_in":{"description":"How long the code stays good, in seconds. The orchestrator polls the provider until the\ntenant enters it or it expires; `GET /v3/agents/ai-profiles/{id}/subscriptions` shows the outcome.","format":"int64","minimum":0,"type":"integer"},"id":{"description":"The new subscription this login makes. It turns active when the code is entered, and\nis selected then only if no other of the provider is, or the selected one needs a new\nlogin.","type":"string"},"user_code":{"description":"The one-time code to type there.","type":"string"},"verification_uri":{"description":"The provider's page where the code is entered.","type":"string"}},"required":["id","verification_uri","user_code","expires_in"],"type":"object"},"StartAiSubscriptionReq":{"additionalProperties":false,"description":"`POST /v3/agents/ai-profiles/{id}/subscriptions`: start a device login into the profile, a new\nsubscription of this provider.","properties":{"provider_id":{"description":"The subscription provider's id in the catalog (`GET /v3/agents/ai-providers`).","type":"string"}},"required":["provider_id"],"type":"object"},"CustomProviderDto":{"description":"A custom provider as a read shows it.","properties":{"base_url":{"description":"Endpoint root, normalized: it always carries a `/v1` path segment and no trailing\nslash, so a read may differ from the write that set it.","type":"string"},"harness_key":{"description":"The key the harness registers this provider under, `custom-<name>`. A model of it is\naddressed `<harness_key>/<model>` — what an agent's `model` carries.","type":"string"},"id":{"description":"The provider's own id, made when it was added: `/v3/agents/ai-profiles/{id}/providers/{provider_id}`.\nA copy of the profile gives its providers new ones.","type":"string"},"key_set":{"description":"Whether the provider's key is held. A machine is not raised for a profile whose custom\nprovider has none.","type":"boolean"},"kind":{"$ref":"#/components/schemas/LlmProviderKindDto"},"models":{"description":"The models the provider listed at `{base_url}/models` when it was written — asked by the\norchestrator, never typed. What an agent's model of this provider is checked against.","items":{"type":"string"},"type":"array"},"name":{"description":"Fixed once the provider is made: a model of it is named by it.","type":"string"}},"required":["id","name","kind","base_url","models","harness_key","key_set"],"type":"object"},"LlmProviderKindDto":{"description":"The wire protocol a custom provider of an AI profile speaks: `openai` or `anthropic`\ncompatible.","enum":["openai","anthropic"],"type":"string"},"PatchCustomProviderReq":{"additionalProperties":false,"description":"`PATCH /v3/agents/ai-profiles/{id}/providers/{provider_id}`: what changes; absent leaves it. The\nprovider is asked for its models again when its address, protocol or key changes.","properties":{"api_key":{"description":"A new key. Stored, never returned.","type":["string","null"]},"base_url":{"type":["string","null"]},"kind":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LlmProviderKindDto"}]},"name":{"description":"Only the name the provider already has: a model of it is `custom-<name>/<model>`, so\nthe name cannot change.","type":["string","null"]}},"type":"object"},"CustomProviderReq":{"additionalProperties":false,"description":"One custom provider a write brings: an entry of the whole-list `PUT`, or the body of\n`POST /v3/agents/ai-profiles/{id}/providers`.","properties":{"api_key":{"description":"The provider's key. Absent keeps the key already held under this name; a provider new\nto the profile has none until one is sent. Stored, never returned.","type":["string","null"]},"base_url":{"type":"string"},"kind":{"$ref":"#/components/schemas/LlmProviderKindDto"},"name":{"description":"`^[a-z0-9][a-z0-9-]*$`, at most 48 bytes: the tenant's name for it, unique in the\nprofile. The harness sees it as `custom-<name>`.","type":"string"}},"required":["name","kind","base_url"],"type":"object"},"CustomProviderDeclarationDto":{"description":"A declared custom provider, and where its key is set.","properties":{"key_link":{"description":"The console link to the provider's one key field, while `provider.key_set` is false and\nthe console address is configured; otherwise `null`.","type":["string","null"]},"provider":{"$ref":"#/components/schemas/CustomProviderDto"}},"required":["provider"],"type":"object"},"DeclareCustomProviderReq":{"additionalProperties":false,"description":"`POST /v3/agents/ai-profiles/{id}/provider-declarations`: a custom provider named without its key.\nThe body has no key field and refuses one: the key is typed by a person at the console\nlink the answer carries.","properties":{"base_url":{"type":"string"},"kind":{"$ref":"#/components/schemas/LlmProviderKindDto"},"name":{"description":"`^[a-z0-9][a-z0-9-]*$`, at most 48 bytes, unique in the profile.","type":"string"}},"required":["name","kind","base_url"],"type":"object"},"AiProfileModelDto":{"description":"One model an agent or a preset of this profile can name — `GET /v3/agents/ai-profiles/{id}/models`.\nExactly the models the model check accepts for the profile: catalog models of\nthe providers its subscriptions and keys carry, and the listed models of its keyed custom\nproviders. A `subscription` model also needs that subscription active when an agent is\nlaunched on it: a selected one that is not is a 409 there.","properties":{"model":{"description":"`provider/model`, as an agent or a preset names it.","type":"string"},"provider":{"description":"The provider as the harness names it (`openai`, `custom-acme`).","type":"string"},"provider_id":{"description":"The id of what carries the model in the profile: the catalog's (`GET /v3/agents/ai-providers`) for\na subscription's provider (`chatgpt` for an `openai` model) or a known provider's key,\nthe custom provider's own for a custom one.","type":["string","null"]},"source":{"$ref":"#/components/schemas/AiProfileModelSource"}},"required":["model","provider","source"],"type":"object"},"AiProfileModelSource":{"description":"What carries a model in an AI profile.","enum":["subscription","key","custom"],"type":"string"},"SetProfileKeyReq":{"additionalProperties":false,"description":"`PUT /v3/agents/ai-profiles/{id}/keys/{provider}`: the key of a known provider.","properties":{"api_key":{"description":"The provider's API key. Stored, never returned.","type":"string"}},"required":["api_key"],"type":"object"},"AiProfileDto":{"description":"An AI profile with what it holds.","properties":{"created_at_ms":{"format":"int64","type":"integer"},"default":{"description":"The profile an agent launch uses when it names none. Exactly one per tenant.","type":"boolean"},"id":{"type":"string"},"keys":{"items":{"$ref":"#/components/schemas/AiProfileKeyDto"},"type":"array"},"name":{"type":"string"},"providers":{"items":{"$ref":"#/components/schemas/CustomProviderDto"},"type":"array"},"sources":{"description":"Every provider reached two ways — a subscription and a key under one harness provider\n(today `openai`): the source chosen and the one it runs on now.","items":{"$ref":"#/components/schemas/AiProfileSourceDto"},"type":"array"},"updated_at_ms":{"format":"int64","type":"integer"}},"required":["id","name","default","providers","keys","sources","created_at_ms","updated_at_ms"],"type":"object"},"AiProfileSourceDto":{"description":"The source of a provider reached two ways.","properties":{"chosen":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AiProviderSource","description":"The source chosen. A preference: while it is not held, the other one runs. `null` —\nnone chosen: the subscription runs before the key."}]},"effective":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AiProviderSource","description":"The source the provider runs on now: what its models are listed from and what the\nprofile's machines are given. `null` — the profile holds neither."}]},"provider":{"description":"The harness provider, as `harness_provider` in `GET /v3/agents/ai-providers` names it.","type":"string"}},"required":["provider"],"type":"object"},"AiProviderSource":{"description":"One of the two sources of a provider reached two ways.","enum":["subscription","key"],"type":"string"},"AiProfileKeyDto":{"description":"One key a profile holds — presence only.","properties":{"name":{"description":"The known provider's name, or the custom provider's own.","type":"string"},"provider_id":{"description":"The provider's id: the catalog's (`GET /v3/agents/ai-providers`) for a known one, the custom\nprovider's own for a custom one. `null` only for a key whose provider is no longer known.","type":["string","null"]},"scope":{"$ref":"#/components/schemas/AiProfileKeyScope"},"set_at_ms":{"format":"int64","type":"integer"}},"required":["scope","name","set_at_ms"],"type":"object"},"AiProfileKeyScope":{"description":"Which kind of key a profile holds.","enum":["known","custom"],"type":"string"},"CopyAiProfileReq":{"additionalProperties":false,"description":"`POST /v3/agents/ai-profiles/{id}/copy`: a new profile with the source's custom providers and every\nkey — copied server-side, never through the API — and none of its subscriptions.","properties":{"name":{"type":"string"}},"required":["name"],"type":"object"},"PatchAiProfileReq":{"additionalProperties":false,"description":"`PATCH /v3/agents/ai-profiles/{id}`.","properties":{"default":{"description":"`true` makes this the tenant's default profile, taking it from the one that held it.\nA tenant always has one: `false` or `null` on the default is refused — make another\nprofile the default instead; on any other profile they change nothing. Absent leaves it.","type":["boolean","null"]},"name":{"description":"The new name. Absent leaves it.","type":["string","null"]},"sources":{"additionalProperties":{"enum":["subscription","key",null],"type":["string","null"]},"description":"The source to choose per provider reached two ways, by its harness provider (`harness_provider` in `GET /v3/agents/ai-providers`, today `openai`): `subscription` or `key`, or `null` to choose none. A provider left out keeps its choice. A change reaches the profile's machines raised from then on; one raised before takes no new agent.","type":"object"}},"type":"object"},"CreateAiProfileReq":{"additionalProperties":false,"description":"`POST /v3/agents/ai-profiles`.","properties":{"name":{"description":"`^[a-z0-9][a-z0-9_-]*$`, at most 63 bytes, unique among the tenant's live profiles.","type":"string"}},"required":["name"],"type":"object"},"AgentAcceptedDto":{"properties":{"agent_id":{"type":"string"},"state":{"type":"string"}},"required":["agent_id","state"],"type":"object"},"AgentStopReq":{"additionalProperties":false,"type":"object"},"AgentMessageDto":{"properties":{"created_at_ms":{"format":"int64","type":"integer"},"delivery":{"$ref":"#/components/schemas/AgentDelivery"},"delivery_state":{"type":"string"},"failure":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentFailureDto"}]},"guest_message_id":{"type":["string","null"]},"message_id":{"type":"string"},"sequence":{"format":"int64","type":"integer"},"text":{"type":"string"},"updated_at_ms":{"format":"int64","type":"integer"}},"required":["message_id","sequence","text","delivery","delivery_state","created_at_ms","updated_at_ms"],"type":"object"},"AgentFailureDto":{"additionalProperties":false,"properties":{"code":{"type":"string"},"detail":{"type":"string"}},"required":["code","detail"],"type":"object"},"AgentDelivery":{"description":"How a message meets a turn that is already running. `steer` enters that turn at its next step boundary; `queue` waits until the turn ends, so the agent reads the message only then and a `delivered` message under `queue` has not been read. A `steer` message that never ran when its turn was cut is recorded `failed` with code `not_executed`; when the agent is stopped, nothing that has not run runs. To an idle agent both start a new turn at once.","enum":["steer","queue"],"type":"string"},"AgentMessageAcceptedDto":{"properties":{"delivery_state":{"type":"string"},"message_id":{"type":"string"}},"required":["message_id","delivery_state"],"type":"object"},"AgentMessageReq":{"additionalProperties":false,"properties":{"budget_seconds":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BudgetField","description":"A time budget for the turn this message starts. It applies only when the message\nstarts a turn of its own — a `steer` into a running turn keeps that turn's budget;\nto an idle agent, and to a `queue` message, this is the turn's own bound. Omitted\nor null runs the turn on the agent's own `budget_seconds`. A number binds only the\nturn this message starts; the word forms are refused here — one message cannot\nlift the bound the agent itself runs under."}]},"delivery":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentDelivery","description":"How the message meets a turn already running. Omitted or null is `steer`, which enters the running turn; `queue` waits for that turn to end and the agent reads the message only after it, so `delivered` under `queue` is not read yet. A `steer` message that never ran when its turn was cut is recorded `failed` with code `not_executed`, and a stopped agent runs nothing that has not run."}]},"text":{"type":"string"}},"required":["text"],"type":"object"},"BudgetField":{"description":"An agent's per-turn time budget: a number of seconds, or a word such as `unlimited`.\n\nThe accepted range and words are published by `GET /v3/agents/agent-defaults`; anything outside them\nis refused with a `422` that names what is allowed.","oneOf":[{"format":"int64","minimum":0,"type":"integer"},{"type":"string"}]},"AgentLogEntryDto":{"description":"One phase entry of an agent's log. `phase` is the step\n(`provision`/`register`/…/`outcome`), `status` is `started`/`ok`/`error`, `detail` carries\nthe failure reason on `error` — never a secret or the prompt.\n\nWhile a machine is raised for the agent, `provision`/`started` entries name its stages in\n`detail`, one word each: `creating`, `created`, `spare_taken`, `guest_answering`,\n`initializing`, `ready`, and `retrying:<cause>` per failed attempt, the cause one of\n`cloud`, `image`, `footing`, `timeout`, `internal`. The list only grows: a word is added,\nnever renamed.","properties":{"at_ms":{"format":"int64","type":"integer"},"detail":{"type":["string","null"]},"phase":{"type":"string"},"status":{"type":"string"}},"required":["phase","status","at_ms"],"type":"object"},"AgentInterruptDto":{"properties":{"agent_id":{"type":"string"},"outcome":{"$ref":"#/components/schemas/AgentInterruptOutcome"},"state":{"type":"string"}},"required":["agent_id","state","outcome"],"type":"object"},"AgentInterruptOutcome":{"description":"What `POST /v3/agents/agents/{agent_id}/interrupt` found.","enum":["nothing_to_interrupt","interrupting"],"type":"string"},"AgentInterruptReq":{"additionalProperties":false,"type":"object"},"AgentStreamFrame":{"description":"One SSE event of `GET /v3/agents/agents/{agent_id}/events` as a stream: a kept event (its SSE `id` is\nits `number`), or a `text_delta` piece of text with no `id`.","oneOf":[{"$ref":"#/components/schemas/AgentEventDto"},{"$ref":"#/components/schemas/AgentTextDeltaDto"}]},"AgentTextDeltaDto":{"description":"A piece of an agent's text as it is being written: the `data` of a `text_delta`\nSSE event, which carries no `id`. Not kept and not numbered; the part arrives whole as an\n`agent_text` event once it is done, and replaces its pieces.","properties":{"part":{"description":"Which part the piece belongs to, opaque: the same for every piece of one part.","type":"string"},"text":{"description":"The next piece of the part's text.","type":"string"}},"required":["part","text"],"type":"object"},"AgentEventDto":{"description":"One event of an agent's turn, as `GET /v3/agents/agents/{agent_id}/events` returns it.","properties":{"at_ms":{"description":"When the harness says it happened, milliseconds.","format":"int64","type":"integer"},"call_id":{"type":["string","null"]},"class":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentFailureClass","description":"`turn_ended` with `outcome` `failed` that this control plane wrote because the harness\nnever will — a turn the harness dropped when it was restarted mid-turn: why\nit failed, `harness_restarted`, or the class of a budget or silence cut already under way\nwhen it was dropped. Null on every event the harness reported; the agent's\n`last_turn.cause` says why any turn failed."}]},"kind":{"$ref":"#/components/schemas/AgentEventKind"},"message_id":{"description":"The message that started the turn or last steered it.","type":["string","null"]},"number":{"description":"The cursor: numbered per agent from 1 with no gaps. Pass the last one back as `after`.","format":"int64","type":"integer"},"outcome":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentEventOutcome","description":"`turn_ended`: how the turn ended (`AgentTurnOutcome`); `tool_returned`: how the call\nended (`AgentToolOutcome`, a failure's message in `text`). Absent on other kinds."}]},"subject":{"description":"`tool_called`: the call's one salient argument, cut at 200 bytes — a command, a search\npattern, a file path, an address, a query, a description or the first line of the code\na code-mode call runs. Absent when the call has none of them, as an MCP tool's call does.","type":["string","null"]},"text":{"description":"`agent_text`: the text; `tool_returned`: the output.","type":["string","null"]},"tool":{"type":["string","null"]},"truncated":{"description":"`agent_text`, `tool_returned`: the text was too long and its middle was cut out, saying\nhow much; `tool_called`: the subject is not the whole argument — its end was cut, or the\ncode's lines after the first left out — and ends in `…`.","type":"boolean"},"turn":{"description":"The turn it belongs to, numbered per agent from 1; 0 for anything before the agent's first\nturn.","format":"int64","type":"integer"},"turn_usage":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentUsageDto","description":"`turn_ended`: the token usage scoped to this turn alone — the steps since it began.\nNull on a turn whose usage could not be scoped to it, and on every event the control\nplane wrote. The agent's `usage` holds the totals over all turns, kept independently\nof these events."}]}},"required":["number","at_ms","kind","turn","truncated"],"type":"object"},"AgentUsageDto":{"additionalProperties":false,"description":"The token usage an agent's provider reported for its model requests: the five counters\nover the completed steps the provider charged, each model's share among them, and how many\nsteps it reported nothing for. A step the provider gave no counters for — or whose counters\ndo not read whole — is never measured as zero: it counts as unreported only.","properties":{"by_model":{"additionalProperties":{"$ref":"#/components/schemas/AgentModelUsageDto"},"description":"Each model's share, by `providerID/id` as the session names it; a step whose session\nnames no model reads as `unknown`.","propertyNames":{"type":"string"},"type":"object"},"cache_read_tokens":{"format":"int64","minimum":0,"type":"integer"},"cache_write_tokens":{"format":"int64","minimum":0,"type":"integer"},"input_tokens":{"description":"The input the steps charged, together with what the provider read from and wrote to\nits cache — what the model's context was billed with.","format":"int64","minimum":0,"type":"integer"},"output_tokens":{"format":"int64","minimum":0,"type":"integer"},"reasoning_tokens":{"format":"int64","minimum":0,"type":"integer"},"unreported_steps":{"description":"Completed steps the provider reported no counters for; they add nothing to the totals.","format":"int64","minimum":0,"type":"integer"}},"required":["input_tokens","output_tokens","reasoning_tokens","cache_read_tokens","cache_write_tokens","unreported_steps","by_model"],"type":"object"},"AgentModelUsageDto":{"additionalProperties":false,"description":"One model's share of an agent's token usage.","properties":{"cache_read_tokens":{"format":"int64","minimum":0,"type":"integer"},"cache_write_tokens":{"format":"int64","minimum":0,"type":"integer"},"input_tokens":{"format":"int64","minimum":0,"type":"integer"},"output_tokens":{"format":"int64","minimum":0,"type":"integer"},"reasoning_tokens":{"format":"int64","minimum":0,"type":"integer"},"steps":{"description":"How many steps of this model the usage holds.","format":"int64","minimum":0,"type":"integer"}},"required":["input_tokens","output_tokens","reasoning_tokens","cache_read_tokens","cache_write_tokens","steps"],"type":"object"},"AgentEventOutcome":{"description":"How an event ended — by its `kind`, one of two closed sets.","oneOf":[{"$ref":"#/components/schemas/AgentTurnOutcome","description":"On `turn_ended`."},{"$ref":"#/components/schemas/AgentToolOutcome","description":"On `tool_returned`."}]},"AgentToolOutcome":{"description":"How a tool call ended. Only `completed` is a success.","enum":["completed","error","failed","aborted","cancelled","unknown"],"type":"string"},"AgentTurnOutcome":{"description":"How a turn ended.","enum":["succeeded","failed","interrupted","unknown"],"type":"string"},"AgentEventKind":{"description":"What a turn event is: a closed set, the same whichever harness ran the turn.","enum":["turn_started","agent_text","tool_called","tool_returned","turn_continued","turn_ended","ci_loop_exhausted"],"type":"string"},"AgentFailureClass":{"description":"Why a turn or a model request went wrong, in a closed vocabulary. Read from the harness's\ndeclared error type, then its HTTP status, then its words — which are read and dropped,\nnever shown. What cannot be told apart is `unknown`, never raw text.","enum":["model_auth","model_rate_limited","model_quota_exhausted","model_timeout","model_unavailable","model_unsupported","model_request_rejected","context_overflow","tool_failed","interrupted","budget_exceeded","token_budget_exceeded","turn_stalled","prompt_rejected","harness_restarted","unknown"],"type":"string"},"AgentContextDto":{"additionalProperties":false,"properties":{"compaction_threshold_tokens":{"format":"int64","minimum":0,"type":["integer","null"]},"context_limit_tokens":{"format":"int64","minimum":0,"type":["integer","null"]},"input_tokens":{"format":"int64","minimum":0,"type":["integer","null"]},"measurement":{"type":["string","null"]},"observed_at_ms":{"format":"int64","type":["integer","null"]},"reason":{"type":["string","null"]},"source_message_id":{"type":["string","null"]},"status":{"type":"string"}},"required":["status"],"type":"object"},"AgentDto":{"properties":{"agent_id":{"type":"string"},"budget_seconds":{"description":"Granted per-turn seconds; null means explicitly unlimited.","format":"int64","type":["integer","null"]},"cluster":{"description":"The cloud's cluster the agent's machine stands in: the one its machine was raised in\nwhere that is recorded, else the one its launch form names. Null when neither says —\na form leaving it to the provider's default on an agent with no machine yet — and for\na machine in the fleet's account, which stands in no cluster of the tenant's.","type":["string","null"]},"created_at_ms":{"format":"int64","type":"integer"},"current_message_id":{"type":["string","null"]},"environment":{"description":"The id of the environment this agent was admitted into, at the version frozen at\nadmission. An id rather than a name, because an ended environment gives up its name.","type":"string"},"environment_version":{"description":"The version of `environment` frozen at admission: the secrets its machines are raised\nwith.","format":"int32","type":"integer"},"failure":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentFailureDto"}]},"idle_timeout":{"description":"The agent's own `idle_timeout` answer; null defers to its launch form and the\noperator's default.","type":["string","null"]},"instance_id":{"type":["string","null"]},"labels":{"additionalProperties":{"type":"string"},"description":"The labels the launch gave the agent; empty when it gave none.","propertyNames":{"type":"string"},"type":"object"},"last_turn":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentLastTurnDto"}]},"launch":{"$ref":"#/components/schemas/AgentLaunchDto","description":"What the agent was launched with."},"max_total_tokens":{"description":"The most tokens the agent may spend over its whole life; null is no cap.","format":"int64","type":["integer","null"]},"max_turn_tokens":{"description":"The most tokens one turn may spend; null is no cap.","format":"int64","type":["integer","null"]},"model":{"type":"string"},"model_retry":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentModelRetryDto","description":"The model request the running turn is waiting to retry: as last read off the guest —\nor, when the turn ended on a provider rate limit this control plane is retrying on\nits own timer, the wait it scheduled. While the machine's event stream is followed, a\nretry is read at the turn's edges and at the stream's backstop interval, so it may\nlag by up to that interval. Null when the agent is not `active`, or the last reading\nshowed no retry waiting or could not be made."}]},"name":{"description":"The name the launch gave the agent; null when it gave none.","type":["string","null"]},"on_stall":{"$ref":"#/components/schemas/AgentOnStall","description":"What a stalled turn does."},"price":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VmPriceDto","description":"Hourly price for this tenant's VM size and cluster, when available."}]},"profile":{"description":"The id of the AI profile this agent runs under.","type":"string"},"repo_url":{"description":"The repository this agent was started on, the request's or the preset's; null for an\nagent started without one, whose session runs in an empty working directory.","type":["string","null"]},"session_working":{"description":"Whether the agent's session was seen working on the last read of it — also by a turn\nno API message started, such as one a channel frame began on an `idle` agent. An\nobservation, not a promise: it lags by up to one control pass. It changes nothing\nelse: such work leaves the agent `idle`, never extends its idle timeout and is not\nbounded by its budget. Null when the session could not be read — unknown, not free —\nand on an agent that is not `active` or `idle`.","type":["boolean","null"]},"stall_timeout_seconds":{"description":"How long a running turn may show no progress before it is cut; null is no window.","format":"int64","type":["integer","null"]},"state":{"description":"`pending`, `preparing`, `active`, `idle`, `stopping`, `ended` or `failed`. An `idle`\nagent with no turn for its machine's idle timeout is stopped as if asked to.","type":"string"},"tenant":{"type":"string"},"turn_stop":{"description":"Why the running turn is being stopped — `interrupted`, or the budget or silence limit\nit crossed — while the guest has not yet confirmed that it stopped. Null otherwise.","type":["string","null"]},"updated_at_ms":{"format":"int64","type":"integer"},"usage":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentUsageDto","description":"The token usage the agent's provider has reported over the agent's whole life, kept\nper completed step — a session read whole never counts one twice. Null on the agent\nlists: read it on the agent itself. Null while no completed step has been kept yet."}]},"vm_size":{"description":"The size class of the agent's machine: the one its launch form names, else the one\nits machine was built at. Null when neither says — a form naming none on an agent\nwith no machine yet.","type":["string","null"]}},"required":["agent_id","tenant","labels","state","environment","environment_version","profile","launch","model","on_stall","created_at_ms","updated_at_ms"],"type":"object"},"AgentOnStall":{"description":"What a turn that has stalled — shown no progress for its `stall_timeout_seconds` — does.","enum":["interrupt","stop"],"type":"string"},"AgentModelRetryDto":{"additionalProperties":false,"description":"The model request an `active` agent's harness is waiting to retry — or, when the turn\nended on a provider rate limit and this control plane took the retry onto its own timer,\nthe wait it scheduled: `attempt` is the attempt coming, `next_at_ms` when the turn will\nbe resumed, and `observed_at_ms` when that wait was last written. The wait doubles from\n15s up to 120s with jitter, for at most some twenty minutes of one turn.","properties":{"attempt":{"description":"Which attempt is coming: as the harness counts them, or as the control plane's own\nwait counts them when it scheduled the retry.","format":"int32","minimum":0,"type":"integer"},"next_at_ms":{"description":"When the next attempt goes out — on the control plane's clock, accurate to about a\nsecond (the guest's clock is placed by the date it sends); for the control plane's\nown wait, exactly when the turn will be resumed. Null when the guest's clock could\nnot be placed against it.","format":"int64","type":["integer","null"]},"observed_at_ms":{"description":"When the control plane read this off the guest, or last wrote its own scheduled wait.","format":"int64","type":"integer"},"reason":{"$ref":"#/components/schemas/AgentFailureClass","description":"Why the request failed, in the same vocabulary as `last_turn.cause.class`."}},"required":["reason","attempt","observed_at_ms"],"type":"object"},"AgentLaunchDto":{"description":"What an agent was launched with, as frozen at its admission: a later edit or delete of the\npreset it came from changes none of it. Secret values are never part of it — MCP servers\nand plugins name their secrets, as on the preset.","properties":{"config":{"$ref":"#/components/schemas/TenantVmConfigDto","description":"The machine configuration, the request's overrides applied."},"plugins":{"description":"The plugin records, in the order the machine receives them.","items":{"$ref":"#/components/schemas/PluginDto"},"type":"array"},"preamble":{"description":"The preset's preamble the first message opened with, when it had one; null for an agent\nlaunched from a preset without one, and for an agent admitted before presets carried\nthem. Only on `GET /v3/agents/agents/{agent_id}`, like `prompt`: a list carries no task texts.","type":["string","null"]},"preset":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentPresetOriginDto","description":"The preset the form was taken from, as it was at the launch — a record of origin, not\na reference: that preset may since have been edited, renamed or deleted. Null for an\nagent admitted before presets, whose form was carried over from its environment."}]},"prompt":{"description":"The launch text the first message carried after the `preamble` — the request's `prompt`, else the preset's. Present only on `GET /v3/agents/agents/{agent_id}`, not on lists.","type":["string","null"]},"subagents":{"additionalProperties":{"$ref":"#/components/schemas/SubagentDto"},"description":"The subagents the machine's coding agent was configured with, by role; absent when none were configured. A role's `description` and `prompt` are present only on `GET /v3/agents/agents/{agent_id}`, not on lists (lists carry `model` alone).","propertyNames":{"type":"string"},"type":"object"}},"required":["config","plugins"],"type":"object"},"AgentPresetOriginDto":{"description":"The preset an agent's launch form was taken from.","properties":{"id":{"type":"string"},"name":{"description":"Its name at the launch.","type":"string"}},"required":["id","name"],"type":"object"},"AgentLastTurnDto":{"additionalProperties":false,"properties":{"cause":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentFailureCauseDto","description":"What the bad ending comes down to and what a caller can do about it. Null on a good\nturn."}]},"completed_at_ms":{"format":"int64","type":"integer"},"detail":{"description":"A short code for why the turn went badly, from a closed set: an error type the harness\ndeclares, or the limit or interrupt that cut it; `unknown` for anything else. Never the\nprovider's or the guest's words. Null on a good turn.","type":["string","null"]},"ended_by":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentTurnEndedBy","description":"What ended a good turn other than its own end; null when the turn simply ended, and on\na bad turn."}]},"ok":{"type":"boolean"}},"required":["ok","completed_at_ms"],"type":"object"},"AgentTurnEndedBy":{"description":"What ended a good turn other than its own end, in a closed vocabulary that only grows.","enum":["suspension_expired"],"type":"string"},"AgentFailureCauseDto":{"additionalProperties":false,"description":"A failure's class with what follows from it, and the provider's own answer to check it\nagainst.","properties":{"action":{"$ref":"#/components/schemas/AgentRecoveryAction"},"class":{"$ref":"#/components/schemas/AgentFailureClass"},"provider_code":{"description":"The PROVIDER's error code, when its answer named one this release knows by name\n(`insufficient_quota` and its kin). Null for anything else — an unknown code is not\nrepeated, and the provider's own words never appear here.","type":["string","null"]},"provider_status":{"description":"The HTTP status the PROVIDER answered with, when the harness named one — the ground\nunder `action`: 402 is \"pay\", 403 \"this key may not\", 404 \"wrong model or path\". Null\nwhen the harness named none; never this control plane's own status, and never\ninvented. A class that disagrees with it is left to disagree: the two judge different\nthings, and the harness reads the class from the body or the status, not from both.","format":"int32","minimum":0,"type":["integer","null"]},"retryable":{"description":"The cause is passing: the same request, unchanged, may succeed later.","type":"boolean"}},"required":["class","retryable","action"],"type":"object"},"AgentRecoveryAction":{"description":"What a caller can do about a failure.","enum":["wait","resend","fix_access","change_model","revise_request","start_new_agent","investigate"],"type":"string"},"LaunchCheckDto":{"description":"What `POST /v3/agents/agents/check` found that would stop a launch of this body once its machine is up.\nAdvice, not admission: an empty list does not promise the launch succeeds, and a finding\ndoes not stop `POST /v3/agents/agents` from taking it.","properties":{"findings":{"items":{"$ref":"#/components/schemas/LaunchFindingDto"},"type":"array"}},"required":["findings"],"type":"object"},"LaunchFindingDto":{"description":"One thing a launch would stumble on.","properties":{"code":{"description":"`repo_credentials_missing` (the repository wants a token the environment does not hold\nfor its forge), `repo_access_denied` (the stored token is refused), `repo_not_found` (no\nsuch repository, or none the token can see), `forge_unreachable` (the repository's host\ncould not be asked — not a verdict on the token),\n`size_not_sold` (the cluster does not sell the size class), or `size_unknown` (the cloud\nwould not say what it sells).","type":"string"},"detail":{"description":"What it means and what would mend it, in our words — never a secret.","type":"string"}},"required":["code","detail"],"type":"object"},"AgentReq":{"additionalProperties":false,"properties":{"budget_seconds":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BudgetField","description":"Omitted or null selects the published default; \"unlimited\" removes the turn time bound."}]},"labels":{"additionalProperties":{"type":"string"},"description":"Labels for the agent, read back as its `labels` and matched by `GET /v3/agents/agents?label=`;\nset once here and never changed. At most 16; a key is 1 to 63 characters of `a-z`,\n`0-9`, `.`, `_` and `-`, starting with a letter or digit; a value is 1 to 63 characters\nof `A-Z`, `a-z`, `0-9`, `.`, `_` and `-`. Anything else is a `422`. A replay under the\nsame key with other labels is a `409`.","propertyNames":{"type":"string"},"type":["object","null"]},"max_total_tokens":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BudgetField","description":"The most tokens the agent may spend over its whole life. A turn that would push the\ntotal past the cap is cut (`token_budget_exceeded`), and further messages are\nrefused with a `409` until the cap is raised above what has been spent. Omitted,\nnull or \"unlimited\" sets no cap."}]},"max_turn_tokens":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BudgetField","description":"The most tokens one turn may spend. Omitted, null or \"unlimited\" sets no cap."}]},"model":{"description":"Which model this agent runs on; omitted or null takes the preset's `default_model`. One\nof the two must be there: nothing downstream may pick a model on a tenant's behalf.","type":["string","null"]},"name":{"description":"A name for the agent, read back as its `name`; set once here and never changed. At\nmost 128 bytes of UTF-8 with no control characters, not blank. Omitted or null leaves\nthe agent unnamed — nothing derives a name from the repository or the prompt. A replay\nunder the same key naming another name is a `409`.","type":["string","null"]},"on_stall":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AgentOnStall","description":"What a stalled turn does: `interrupt` (the default) cuts the turn and the agent\ngoes `idle`, where its `idle_timeout` applies; `stop` stops the agent and its\nmachine, the way a tenant's stop does. A replay under the same key naming another\nanswer is a `409`."}]},"preset":{"description":"The launch form this agent starts from, by id or by name (`GET /v3/agents/presets`).\nREQUIRED. The agent freezes a snapshot of it — its fields with this request's overrides\napplied, its environment at that environment's current version, and its AI profile\n(the tenant's default when it names none) — so a later edit or delete of the preset\nnever touches the agent. A preset that is not this tenant's, or has been deleted, is a\n404.","type":"string"},"prompt":{"description":"The first message; omitted or null takes the preset's `prompt`. One of the two must be\nthere.","type":["string","null"]},"repo_url":{"description":"The repository, HTTPS without credentials; omitted or null takes the preset's\n`repo_url`. When neither names one, the agent runs without a repository.","type":["string","null"]},"stall_timeout_seconds":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BudgetField","description":"How long a running turn may show no progress before it is cut (`stalled`). Omitted\nor null takes the published default; the word \"disabled\" removes the window. A\nreplay under the same key naming another window is a `409`."}]},"without_repo":{"description":"`true` launches the agent without a repository even when the preset names one: its\nsession opens in an empty working directory, with nothing cloned. Not together with\n`repo_url` — that is a `422`. Omitted, null or `false` changes nothing. A replay under\nthe same key that differs in it is a `409`.","type":["boolean","null"]}},"required":["preset"],"type":"object"},"AgentDefaultsDto":{"description":"The bounds this deployment accepts for an agent's budget, published so a client does not\nhave to hold its own copy of them. A value outside them is refused with a `422`.","properties":{"budget_seconds_default":{"description":"What `budget_seconds` resolves to when the caller names nothing. Omitting the field is\nNOT the same as asking for `unlimited` — it buys this.","format":"int64","minimum":0,"type":"integer"},"budget_seconds_max":{"description":"Most seconds `budget_seconds` accepts.","format":"int64","minimum":0,"type":"integer"},"budget_seconds_min":{"description":"Fewest seconds `budget_seconds` accepts.","format":"int64","minimum":0,"type":"integer"},"idle_timeout_min_secs":{"description":"Fewest seconds an agent's own `idle_timeout` may carry — the operator's floor; the\nword form bypasses it.","format":"int64","minimum":0,"type":"integer"},"idle_timeout_words":{"description":"The words an agent's `idle_timeout` accepts instead of a number.","items":{"type":"string"},"type":"array"},"on_stall_values":{"description":"The values `on_stall` accepts.","items":{"type":"string"},"type":"array"},"stall_disabled_words":{"description":"The words `stall_timeout_seconds` accepts instead of a number.","items":{"type":"string"},"type":"array"},"stall_timeout_seconds_default":{"description":"What `stall_timeout_seconds` resolves to when the caller names nothing.","format":"int64","minimum":0,"type":"integer"},"stall_timeout_seconds_max":{"description":"Most seconds `stall_timeout_seconds` accepts.","format":"int64","minimum":0,"type":"integer"},"stall_timeout_seconds_min":{"description":"Fewest seconds `stall_timeout_seconds` accepts.","format":"int64","minimum":0,"type":"integer"},"token_unlimited_words":{"description":"The words `max_turn_tokens` and `max_total_tokens` accept instead of a number.","items":{"type":"string"},"type":"array"},"unlimited_words":{"description":"The words the field accepts instead of a number.","items":{"type":"string"},"type":"array"}},"required":["budget_seconds_min","budget_seconds_max","budget_seconds_default","unlimited_words","stall_timeout_seconds_min","stall_timeout_seconds_max","stall_timeout_seconds_default","stall_disabled_words","on_stall_values","token_unlimited_words","idle_timeout_min_secs","idle_timeout_words"],"type":"object"}},"securitySchemes":{"Bearer":{"bearerFormat":"JWT","description":"A Fluence user's Rauthy access token (a console session). The same user's token and API key act as the same tenant. Send one credential, never both. Accepted only where the deployment names the platform's public API.","scheme":"bearer","type":"http"},"ApiKey":{"description":"A Fluence API key (`fl_v1_…`); its user's tenant is `fluence:<user id>`.","in":"header","name":"X-API-KEY","type":"apiKey"}}}}