---
title: "Disable or re-enable an agent"
method: PATCH
path: "/governance/v1/agents/{agentId}/disable"
tags: ["Governance"]
---

# Disable or re-enable an agent

`PATCH /governance/v1/agents/{agentId}/disable`

## Request

- Base URL: `https://api.langdock.com`
- URL: `https://api.langdock.com/governance/v1/agents/{agentId}/disable`
- Auth: HTTP bearer

Turns an agent off or back on as a governance action.
disabledReason is stored while the agent is off and cleared when it is turned back on,
even if the request still sends a reason.
A disabled agent cannot be used until it is turned back on.
Returns the updated agent.

## Path parameters

- `agentId` string, uuid, required

## Request body

- GovernanceDisableAgentRequest (unresolved $ref)

## Response `200`

The updated agent

- GovernanceAgentResponse (unresolved $ref)

## Other responses

- `400`: Invalid body, including a missing disabled flag or a reason longer than 500 characters
- `401`: Missing or invalid API key
- `403`: Key lacks GOVERNANCE_API, or Governance is not enabled
- `404`: Agent not found
- `429`: Rate limit exceeded (500 requests per minute per workspace and API key)
- `500`: Internal server error

## Changes

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

[Operation history](https://skmtc.dev/langdock/apis/langdock-api/changes/governance/v1/agents/:agentId/disable/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)
