---
title: "Update Agent"
method: PUT
path: "/v1/agents/{agent_slug}"
tags: ["Agents"]
---

# Update Agent

`PUT /v1/agents/{agent_slug}`

Update an existing agent.

## Path parameters

- `agent_slug` string, required

## Headers

- `authorization` string, nullable

## Request body

- AgentUpdate — Schema for updating an existing agent.
  - `name` string, nullable
  - `description` string, nullable
  - `model` string, nullable
  - `systemPrompt` string, nullable
  - `temperature` number, nullable
  - `maxContextChunks` integer, nullable
  - `status` string, nullable
  - `useContext` boolean, nullable
  - `knowledge` string, nullable
  - `metadata` object, nullable

## Response `200`

Successful Response

- AgentResponse — Schema for single agent response (wrapped in { agent: {...} }).
  - `agent` AgentDetail, required — Schema for agent detail (unwrapped).
    - `name` string, required — Agent name
    - `description` string, nullable — Agent description
    - `model` string — LLM model to use
    - `systemPrompt` string, nullable — System prompt for the agent
    - `temperature` number, nullable — Temperature for generation
    - `maxContextChunks` integer, nullable — Maximum number of context chunks
    - `status` string, nullable — Agent status
    - `useContext` boolean — Whether to use knowledge base context
    - `knowledge` string, nullable — Knowledge base slug to use
    - `metadata` object, nullable — Additional metadata
    - `deepresearch` boolean, nullable — Whether deep research is enabled
    - `id` string, required — Agent ID
    - `slug` string, required — Agent slug
    - `organizationSlug` string, required — Organization slug
    - `createdAt` string, date-time, required — Creation timestamp
    - `updatedAt` string, date-time, nullable — Last update timestamp

## Other responses

- `422` — Validation Error

---

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