Hosted compute settings
Read and change a workspace's hosted agent compute opt-in and budgets.
Hosted compute settings decide whether a workspace lets nima run agent operations on nima-hosted VMs, and how much those runs may spend. The two operations below read and change that one settings object. Starting and controlling the operations themselves is on the operations page, and what a hosted VM is lives in hosted VMs.
Enabled by the nima team on request. A workspace needs a plan that includes
agent compute and nima-configured compute and model prices before
enabled: true is accepted, and only the nima team sets those. Until then
the PATCH fails with 403 or 409 (see Errors),
and operations run only as a handoff to your own coding agent.
Hosted compute settings routes and scopes
The two hosted compute settings routes below read and change one settings object.
| Method | Path | Scope | MCP tool |
|---|---|---|---|
GET | /v1/agent-compute | integrations:write | get_agent_compute_settings |
PATCH | /v1/agent-compute | integrations:write | update_agent_compute_settings |
Paths are relative to https://api.getnima.io. Both calls carry
Authorization: Bearer <your key>, need the scope above, and are refused unless
the caller is a workspace owner or admin (403 INSUFFICIENT_PERMISSIONS).
integrations:write cannot be picked when you create a key in Settings or on
the OAuth consent screen. It comes only from a private Slack confirmation: an
owner or admin runs /nima mcp-key integrations (or messages @nima
mcp-key integrations) and confirms, and
nima returns a 30-day key that carries that one scope. That key cannot start
operations, which needs a separate mcp-key operations key. See
Scopes and permissions.
If the platform's agent operations are not switched on, every route here answers
404. They are on in production today.
Read hosted compute settings
/v1/agent-computeintegrations:writeMCP toolget_agent_compute_settingsGET /v1/agent-compute returns the workspace's hosted compute settings object.
It takes no parameters and no body. It is readable even when the workspace plan
lacks agent compute, so you can read the defaults before anything is enabled. A
workspace that never changed anything gets the defaults below.
curl https://api.getnima.io/v1/agent-compute \
-H "Authorization: Bearer $NIMA_KEY"{
"enabled": false,
"defaultTarget": "own_harness",
"allowedKinds": [
"implement_spec",
"fix_ci",
"reproduce_issue",
"run_checks",
"browser_check"
],
"maxConcurrentOperations": 3,
"maxOperationsPerDay": 10,
"monthlyComputeBudgetUsd": 25,
"monthlyAiBudgetUsd": 100,
"defaultOperationBudget": { "aiUsd": 5, "activeMinutes": 60, "maxSessions": 10 },
"maxOperationBudget": { "aiUsd": 25, "activeMinutes": 120, "maxSessions": 20 },
"allowOperatorExec": false,
"alertThresholdsPercent": [50, 80, 100]
}Settings fields and defaults
The settings object has these fields. A stored value outside its range is
clamped when read, and money values round to cents. allowedKinds and
alertThresholdsPercent are de-duplicated, and thresholds are sorted ascending
(a threshold outside 1 to 100 is dropped).
| Field | Type and range | Default |
|---|---|---|
enabled | boolean | false |
defaultTarget | own_harness or nima_vm | own_harness |
allowedKinds | array of operation kinds, at most 6 | every kind except task |
maxConcurrentOperations | integer 1 to 100 | 3 |
maxOperationsPerDay | integer 1 to 1000 | 10 |
monthlyComputeBudgetUsd | number 0 to 1,000,000 | 25 |
monthlyAiBudgetUsd | number 0 to 1,000,000 | 100 |
defaultOperationBudget | object: aiUsd 0.01 to 10000, activeMinutes integer 1 to 1440, maxSessions integer 1 to 200 | aiUsd 5, activeMinutes 60, maxSessions 10 |
maxOperationBudget | same shape | aiUsd 25, activeMinutes 120, maxSessions 20 |
allowOperatorExec | boolean | false |
alertThresholdsPercent | up to 5 integers, each 1 to 100 | [50, 80, 100] |
Operation kinds are implement_spec, fix_ci, reproduce_issue,
run_checks, browser_check and task. task is left out of the default
allowedKinds: an admin opts in by adding it to the list.
What the fields do:
enabledis the opt-in. While it isfalse, a request for thenima_vmtarget is refused and onlyimplement_speccan run, as a handoff to your own coding agent.defaultTargetis used only forimplement_specwhen the request names no target and hosted compute is enabled. Every other kind runs on a VM.maxConcurrentOperationsandmaxOperationsPerDaycap hosted operations. Hitting either fails the new operation instead of queueing it. The day is the UTC day. nima also applies its own per-workspace concurrency ceiling, and the lower of the two limits applies.monthlyComputeBudgetUsdandmonthlyAiBudgetUsdare per UTC calendar month.defaultOperationBudgetis what an operation gets when its requester names no budget.maxOperationBudgetis the most a member can give one operation.allowOperatorExeclets the nima team run break-glass commands in your operations' containers. It stays off unless you turn it on.alertThresholdsPercentare the budget shares at which nima records a threshold event. nima does not deliver that event to a person today, so do not rely on it as an alert.
Update hosted compute settings
/v1/agent-computeintegrations:writeMCP toolupdate_agent_compute_settingsPATCH /v1/agent-compute changes the settings and returns
{ settings, cancelledOperations }. Send only the fields you want to change.
Each field you send replaces the stored one; allowedKinds and
alertThresholdsPercent are replaced as whole lists, not merged.
enabledbooleanOpt the workspace in or out of hosted compute.
defaultTargetenumown_harness or nima_vm.
allowedKindsstring[]Operation kinds hosted operations may use. At most 6 entries.
maxConcurrentOperationsinteger1 to 100.
maxOperationsPerDayinteger1 to 1000.
monthlyComputeBudgetUsdnumber0 to 1,000,000.
monthlyAiBudgetUsdnumber0 to 1,000,000.
defaultOperationBudgetobjectaiUsd (0.01 to 10000), activeMinutes (integer 1 to 1440) and maxSessions
(integer 1 to 200), all three required when you send the object. It replaces
the whole stored budget.
maxOperationBudgetobjectSame shape as defaultOperationBudget.
allowOperatorExecbooleanAllow the nima team to run break-glass commands in your operation containers.
alertThresholdsPercentinteger[]Up to 5 integers, each 1 to 100.
The body is strict. An unknown key, a wrong type or an out-of-range value is a
400 with the message Invalid agent compute settings, and nothing is saved.
The check that the default budget stays within the maximum runs on the merged
result, so lowering maxOperationBudget below the stored default fails unless
you lower the default in the same call.
curl -X PATCH https://api.getnima.io/v1/agent-compute \
-H "Authorization: Bearer $NIMA_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"allowedKinds": ["run_checks", "browser_check", "task"],
"monthlyAiBudgetUsd": 50
}'{
"settings": {
"enabled": true,
"defaultTarget": "own_harness",
"allowedKinds": ["run_checks", "browser_check", "task"],
"maxConcurrentOperations": 3,
"maxOperationsPerDay": 10,
"monthlyComputeBudgetUsd": 25,
"monthlyAiBudgetUsd": 50,
"defaultOperationBudget": { "aiUsd": 5, "activeMinutes": 60, "maxSessions": 10 },
"maxOperationBudget": { "aiUsd": 25, "activeMinutes": 120, "maxSessions": 20 },
"allowOperatorExec": false,
"alertThresholdsPercent": [50, 80, 100]
},
"cancelledOperations": 0
}What enabling hosted compute checks
Sending enabled: true first checks the workspace plan, then the prices. If the
plan does not include agent compute the call is a 403. If nima has not
configured an agent model and harness, the model does not fit its harness, or
compute and model prices are missing, the call is a 409. Nothing is saved when a check fails. Enabling grants no GitHub
publishing permission: that is a separate consent, covered on the
writers page.
What disabling hosted compute cancels
Any PATCH that leaves hosted compute off, including one that sends
enabled: false, cancels every unfinished hosted (nima_vm) operation in the
workspace with the end reason compute_disabled, and denies new budget
leases and run tokens. cancelledOperations in the response is how many
operations were cancelled. "Unfinished" means any state other than published,
reported, failed, cancelled or expired, so parked operations are
cancelled too. Handoffs to your own coding agent are not touched. Disabling does
not revoke GitHub publishing consent and does not undo commits an operation
already made.
Errors from hosted compute settings
Both operations return the standard error envelope. These are the cases specific to this resource.
| Status | error | When |
|---|---|---|
400 | VALIDATION_ERROR | PATCH body has an unknown key, a wrong type or an out-of-range value (Invalid agent compute settings). |
400 | VALIDATION_ERROR | The merged default budget is above the maximum on any of aiUsd, activeMinutes or maxSessions (Default operation budget exceeds maximum). |
401 | TOKEN_INVALID | Missing, malformed, revoked or expired key. |
403 | INSUFFICIENT_PERMISSIONS | The key lacks integrations:write, the caller is not an owner or admin, or the caller is not a member of the workspace. |
403 | INSUFFICIENT_PERMISSIONS | PATCH with enabled: true and a workspace plan that does not include agent compute (The organization plan does not include agent compute). |
404 | RESOURCE_NOT_FOUND | Agent operations are not available on the platform (Agent operations are not available). |
409 | CONFLICT | PATCH with enabled: true while nima has no agent model or harness configured (Agent model and harness must be configured). |
409 | CONFLICT | PATCH with enabled: true and no configured compute and model prices (Agent compute and model pricing must be configured before dispatch). |
409 | CONFLICT | PATCH with enabled: true and a model that does not fit the harness. details.reason is unsupported_model_harness. |