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

# Update Agent

`PUT /api/v1/agents/{agent_id_or_identifier}`

## Request

- Base URL: `https://api.gnosari.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gnosari.com/api/v1/agents/{agent_id_or_identifier}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-AUTH-TOKEN`

Update an agent.
Supports both numeric IDs and string identifiers for the agent.
Also supports both IDs and identifiers for traits, knowledge sources, and tools.

## Path parameters

- `agent_id_or_identifier` string, required

## Request body

- AgentUpdate: Schema for updating an existing agent. Supports both new entity_type_configs (with collection modes) and legacy entity_type_ids (auto-converted to passive mode configs).
  - `name` string, nullable
  - `description` string, nullable
  - `instructions` string, nullable
  - `identifier` string, nullable
  - `image_url` string, nullable
  - `configuration` object, nullable
  - `model` string, nullable
  - `temperature` number
  - `reasoning_effort` string
  - `orchestrator` boolean
  - `memory` string, nullable
  - `interactive_buttons_enabled` boolean
  - `interactive_buttons_behavior` string, nullable: Optional guidance on WHEN the agent should render interactive choice buttons. NULL uses the canonical default behavior.
  - `access_level` 'PRIVATE' | 'PASSWORD_PROTECTED' | 'PUBLIC'
  - `access_password` string, nullable
  - `chat_theme_id` integer, nullable
  - `uri` string, nullable
  - `domain_id` integer, nullable
  - `knowledge_ids` integer[], nullable
  - `tool_ids` union[], nullable
    - union
      - integer
      - string
  - `trait_ids` union[], nullable
    - union
      - integer
      - string
  - `entity_type_configs` AgentEntityTypeConfig[], nullable
    - `entity_type_id` integer, required
    - `collection_mode` 'passive' | 'opportunistic' | 'active' | 'guided': Data collection mode for entity types assigned to agents.
    - `custom_prompt` string, nullable
  - `entity_type_ids` integer[], nullable
  - `connections` AgentConnectionUpdate[], nullable
    - `connection_type` 'ai_delegation' | 'handoff'
    - `target_agent_id` integer, nullable
    - `target_team_id` integer, nullable
    - `instructions` string, nullable

## Response `200`

Successful Response

- Agent

## Other responses

- `422`: Validation Error

---

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