Skip to main content
PATCH
/
api
/
v1
/
agents
/
{agent_id}
Update an agent
curl --request PATCH \
  --url https://agents.nanonets.com/api/v1/agents/{agent_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "system_prompt": "<string>",
  "config": {},
  "is_active": true
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agent_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "version_number": 123,
  "name": "<string>",
  "config": {},
  "is_active": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Workspace API key issued from the web app. Pass as Authorization: Bearer YOUR_API_KEY.

Path Parameters

agent_id
string<uuid>
required

UUID of the agent.

Body

application/json

Partial update. Provide only the fields you want to change. Hot-patched in place — no new version is created.

name
string
system_prompt
string

Convenience field — overwrites config.system_prompt while leaving other config keys untouched.

config
object

Replaces the entire config object. To make a targeted change to one field, use system_prompt (for the prompt) or GET first and PATCH back the merged object.

is_active
boolean

Response

Updated agent.

Full agent representation.

id
string<uuid>
required

ID of this specific version of the agent.

agent_group_id
string<uuid>
required

Stable identifier across all versions of this agent. Use this when you need to refer to "the agent" as a logical entity rather than a specific version.

version_number
integer
required

Sequential version number (1, 2, 3 …) within this agent group.

status
enum<string>
required

Lifecycle status of an agent version.

  • draft — work-in-progress, not yet runnable for end users
  • published — live, runnable
  • archived — superseded by a newer version
Available options:
draft,
published,
archived
name
string
required
config
object
required

Full agent configuration object. Free-form JSON — common keys include system_prompt, tools, states, milestones, model. Treat unknown keys as opaque.

is_active
boolean
required

Whether this agent can be run. Inactive agents reject runs with 403.

created_at
string<date-time>
required
updated_at
string<date-time>
required