---
title: "Update Agent"
method: PATCH
path: "/api/v1/agents/{agent_id}"
tags: ["agents"]
---

# Update Agent

`PATCH /api/v1/agents/{agent_id}`

## Request

- Base URL: `https://memory.kagura-ai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://memory.kagura-ai.com/api/v1/agents/{agent_id}`
- Auth: none declared

Partially update an agent, including status / enforcement transitions.

## Path parameters

- `agent_id` string, uuid, required

## Headers

- `authorization` string, nullable

## Request body

- AgentUpdate: Request model for a partial agent update. Only fields explicitly present in the request body are applied (``exclude_unset``), so ``null`` clears a metadata field while an absent key leaves it untouched.
  - `name` string, nullable
  - `description` string, nullable
  - `framework` string, nullable
  - `environment` string, nullable
  - `version` string, nullable
  - `status` 'active' | 'suspended' | 'retired', nullable: Lifecycle kill switch (fail-closed for bound keys, P0-2)
  - `enforcement_mode` 'shadow' | 'enforce', nullable: Binding enforcement ramp; enforce→shadow is audited as widening

## Response `200`

Successful Response

- AgentResponse: Response model for one registry row.
  - `id` unknown, required
  - `workspace_id` unknown, required
  - `name` unknown, required
  - `description` unknown
  - `owner_user_id` unknown, required
  - `framework` unknown
  - `environment` unknown
  - `version` unknown
  - `status` unknown, required
  - `enforcement_mode` unknown, required
  - `last_seen_at` unknown
  - `created_at` unknown, required
  - `updated_at` unknown, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud.md) · [All operations](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/revisions/aa9df1a21db9?raw)
