Skip to content

Write the pool policy

PUT
/katara/v1/orgs/{org_id}/environments/{environment_id}/plexus/policy
curl --request PUT \
--url https://api.katara.com/katara/v1/orgs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/environments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/plexus/policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: example' \
--header 'X-Katara-CSRF: 1' \
--data '{ "expected_version": 1, "mode": "strict", "classifier": "hosted", "pictures": true, "tier": "light", "access": { "teams": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "projects": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }, "shares": [ { "kind": "team", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "percent": 1 } ], "tiers": { "light": "example", "standard": "example", "deep": "example" }, "named_models_api": true, "show_in_chat": true }'

Owner or admin in a signed-in session only; requires org:plexus:write. Writes the next version when expected_version is the version in force, and refuses with a conflict otherwise. Settings left out take the default for the mode; access left out opens the pool to the whole organization. A tier names a model of this environment.

org_id
required
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
environment_id
required
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
Idempotency-Key
required
string
/^[A-Za-z0-9._:-]{8,128}$/
X-Katara-CSRF
Allowed value: 1

Browser cookie mutations require value 1 and an allowed Origin. Session bearer clients may omit this header.

X-Katara-Account-ID
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/

Required for cookie-authenticated changes. Use the UUID of the account that loaded the application. A different current cookie account returns account_changed before the handler runs. Session bearer and API key clients do not require this header.

Media typeapplication/json

The next version of the pool policy. Conversation compaction is not a setting: it always runs on the organization’s own model.

object
expected_version
required

The version in force, 0 before the first write.

integer
<= 9007199254740991
mode
required

Strict serves the organization’s requests on its own endpoints or refuses them; fallback answers on Katara’s own models when its endpoints cannot.

Allowed values: strict fallback
classifier

Hosted lets Katara’s classifier pick the tier for each request; none runs every request at the tier set here. Defaults to hosted in fallback and none in strict.

Allowed values: hosted none
pictures

Whether pictures may be described by Katara’s own vision model. Defaults to true in fallback and false in strict.

boolean
tier

With classifier none, the tier every request runs at. Defaults to standard.

Allowed values: light standard deep
access

Who the pool serves. With both lists empty, the whole organization. A member in none of the teams, and work in none of the projects, is routed as if the organization had no pool: to Katara’s own models in fallback, refused with no_capacity in strict. A service account’s key is admitted through a project only.

object
teams
required

Teams whose members may use the pool.

Array<string>
<= 100 items unique items
projects
required

Projects whose keys and agent runs may use the pool.

Array<string>
<= 100 items unique items
shares

Shares add up to at most 100. With none the pool is first come, first served.

Array<object>
<= 50 items

A part of the pool’s concurrent requests reserved for one team or project. A caller within its share is served first; one over it, or with none, takes only what no share reserved, so it never takes a slot reserved for another team. When none is free, a strict pool answers a retryable no_capacity and a fallback pool hands the request to Katara’s own models.

object
kind
required
Allowed values: team project
id
required
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
percent
required
integer
>= 1 <= 100
tiers

The organization’s model for each Cortex tier. A tier left empty goes to Katara’s own tier in fallback and is refused in strict.

object
light
Any of:
string
/^[a-z][a-z0-9-]{1,30}[a-z0-9]/[a-z0-9][a-z0-9._-]{0,63}$/
standard
Any of:
string
/^[a-z][a-z0-9-]{1,30}[a-z0-9]/[a-z0-9][a-z0-9._-]{0,63}$/
deep
Any of:
string
/^[a-z][a-z0-9-]{1,30}[a-z0-9]/[a-z0-9][a-z0-9._-]{0,63}$/
named_models_api

Whether callers bound to the organization may name its models on the API. Defaults to true.

boolean
show_in_chat

Whether the web chat lists the organization’s models to its members. Defaults to false.

boolean

Successful request

Media typeapplication/json

The pool policy in force. Version 0 is the defaults: fallback, Katara’s hosted classifier, pictures allowed.

object
operation_id
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
version
required
integer
<= 9007199254740991
mode
required
Allowed values: strict fallback
classifier
required
Allowed values: hosted none
pictures
required
boolean
default_bundle
required
Any of:
string
/^katara/[a-z0-9][a-z0-9._-]{0,127}@[1-9][0-9]{0,8}$/
tier
required
Any of:
Allowed values: light standard deep
changed_by
required
Any of:
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
changed_at
required
Any of:
string format: date-time
access
required

Who the pool serves. With both lists empty, the whole organization. A member in none of the teams, and work in none of the projects, is routed as if the organization had no pool: to Katara’s own models in fallback, refused with no_capacity in strict. A service account’s key is admitted through a project only.

object
teams
required

Teams whose members may use the pool.

Array<string>
<= 100 items unique items
projects
required

Projects whose keys and agent runs may use the pool.

Array<string>
<= 100 items unique items
shares
required

Shares add up to at most 100. With none the pool is first come, first served.

Array<object>
<= 50 items

A part of the pool’s concurrent requests reserved for one team or project. A caller within its share is served first; one over it, or with none, takes only what no share reserved, so it never takes a slot reserved for another team. When none is free, a strict pool answers a retryable no_capacity and a fallback pool hands the request to Katara’s own models.

object
kind
required
Allowed values: team project
id
required
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
percent
required
integer
>= 1 <= 100
tiers
required

The organization’s model for each Cortex tier. A tier left empty goes to Katara’s own tier in fallback and is refused in strict.

object
light
Any of:
string
/^[a-z][a-z0-9-]{1,30}[a-z0-9]/[a-z0-9][a-z0-9._-]{0,63}$/
standard
Any of:
string
/^[a-z][a-z0-9-]{1,30}[a-z0-9]/[a-z0-9][a-z0-9._-]{0,63}$/
deep
Any of:
string
/^[a-z][a-z0-9-]{1,30}[a-z0-9]/[a-z0-9][a-z0-9._-]{0,63}$/
named_models_api
required
boolean
show_in_chat
required
boolean
Example
{
"mode": "strict",
"classifier": "hosted",
"tier": "light",
"shares": [
{
"kind": "team"
}
]
}

Account_changed: reload and review with the signed-in account.

Request error

Media typeapplication/json
object
error
required
object
message
required
string
>= 1 characters <= 500 characters
type
required
string
>= 1 characters <= 100 characters
code
required

Stable; branch on it. Any operation can answer invalid_request, with param naming the refused field when there is one; human_session_required, when an API key, service account or workload calls an operation only a signed-in person may perform; reauthentication_required, when a person’s sign-in is too old for the operation; permission_denied; route_not_found and method_not_allowed, when no operation matches the path or method; and feature_unavailable, when the operation’s service is not enabled on this deployment.

string
>= 1 characters <= 100 characters
param
required

The request field a refusal is about, such as the agent_id or run_id query parameter; null when the refusal is not about one field.

string | null
request_id
required
string
>= 1 characters <= 100 characters
upstream_status
required
integer | null
action
Allowed values: sign_in reauthenticate request_access review fund retry reconcile refresh support
operation_id
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
snapshot_ref
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
Example
{
"error": {
"action": "sign_in"
}
}