---
title: "Update an agent's runtime harness and default model"
method: PATCH
path: "/api/agents/{id}/runtime"
tags: ["Agents"]
---

# Update an agent's runtime harness and default model

`PATCH /api/agents/{id}/runtime`

Updates `agents.harness_provider` and upserts agent-scoped `swarm_config` rows for HARNESS_PROVIDER, MODEL_OVERRIDE, and REASONING_EFFORT_OVERRIDE. The settings apply to future provider sessions. For `model` and `reasoning_effort`: omit the field to leave it unchanged, send `null` to clear the corresponding override, or send a value to set it.

## Path parameters

- `id` string, required

## Request body

- object
  - `harness_provider` 'claude' | 'codex' | 'pi' | 'opencode', required
  - `model` string, nullable
  - `allow_custom_model` boolean
  - `reasoning_effort` 'off' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'null', nullable

## Response `200`

Updated agent row

## Other responses

- `400` — Validation error
- `404` — Agent not found

## Changes

- **2026-07-10** `5b7df66bb887` — 1 info
  - added the new `max` enum value to the request property `reasoning_effort`
- **2026-07-02** `0c910612f9ac` — 1 breaking
  - removed the enum value `max` of the request property `reasoning_effort`

[Change history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/agents/:id/runtime/patch.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/revisions/92a1dcbd2fc7/schema)
