---
title: "Update an agent budget in EUR"
method: PATCH
path: "/billing/v1/ai-models-included/agents/{agentId}"
tags: ["Agents"]
---

# Update an agent budget in EUR

`PATCH /billing/v1/ai-models-included/agents/{agentId}`

## Request

- Base URL: `https://api.langdock.com`
- URL: `https://api.langdock.com/billing/v1/ai-models-included/agents/{agentId}`
- Auth: HTTP bearer

At least one field is required. none removes the separate agent budget; unlimited keeps it active without a numeric cap. Private agents return 404 when user-level usage is hidden. budgetPeriodSpend is always null in the mutation response.

## Request body

- AgentPatch
  - `budget` union: Monthly budget in the mode currency. none follows workspace/member limits; unlimited keeps a separate budget without a numeric cap.
    - object
      - `type` 'limited', required
      - `amount` number, required
    - object
      - `type` 'unlimited', required
    - object
      - `type` 'none', required
  - `budgetMode` 'always' | 'on_limit_hit'

## Response `200`

Updated resource. Spending is null; GET retrieves spending.

- Agent: Monthly budget in mode currency, subject to workspace enforcement. always uses agent allowance; on_limit_hit uses it after the member allowance. Spend is null when user-level usage is hidden and always null on PATCH.
  - `id` string, uuid, required
  - `name` string, nullable, required
  - `budget` union, required: Monthly budget in the mode currency. none follows workspace/member limits; unlimited keeps a separate budget without a numeric cap.
    - object
      - `type` 'limited', required
      - `amount` number, required
    - object
      - `type` 'unlimited', required
    - object
      - `type` 'none', required
  - `budgetMode` 'always' | 'on_limit_hit', required
  - `budgetPeriodSpend` number, nullable, required

## Other responses

- `400`: Invalid body/query, unknown fields, empty PATCH, invalid limit, invalid bulk member IDs, or a cursor outside this workspace (INVALID_CURSOR).
- `401`: Missing or invalid authentication.
- `403`: Missing Billing scope, personal key, unavailable feature, missing active service-account Admin authority, or email filter without the USER_MANAGEMENT_API scope.
- `404`: Resource not in this workspace, inactive/non-human user, privacy-hidden agent, usage request not found for that member, or endpoint unavailable in this mode.
- `405`: Unsupported HTTP method.
- `409`: Workspace mode differs from the requested mode. details.mode identifies the workspace mode.
- `429`: API rate limit exceeded.

## Changes

- **2026-11-03** `c62bf90b4013`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/langdock/apis/langdock-api/changes/billing/v1/ai-models-included/agents/:agentId/patch.md)

---

[API](https://skmtc.dev/langdock/apis/langdock-api.md) - [All operations](https://skmtc.dev/langdock/apis/langdock-api/llms.txt) - [OpenAPI document](https://skmtc.dev/langdock/apis/langdock-api/revisions/c62bf90b4013?raw)
