Skip to main content
PATCH
/
api
/
v3
/
agents
/
{id}
Update an agent
curl --request PATCH \
  --url https://paradigm.lighton.ai/api/v3/agents/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "instructions": "<string>",
  "scope_workspaces_by_group": true,
  "native_tool_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "mcp_server_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "scoped_workspace_ids": [
    123
  ]
}
'
import requests

url = "https://paradigm.lighton.ai/api/v3/agents/{id}"

payload = {
"name": "<string>",
"description": "<string>",
"instructions": "<string>",
"scope_workspaces_by_group": True,
"native_tool_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"mcp_server_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"scoped_workspace_ids": [123]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
instructions: '<string>',
scope_workspaces_by_group: true,
native_tool_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
mcp_server_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
scoped_workspace_ids: [123]
})
};

fetch('https://paradigm.lighton.ai/api/v3/agents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "id": 123,
  "name": "<string>",
  "description": "<string>",
  "instructions": "<string>",
  "company": {
    "id": 123,
    "name": "<string>",
    "allow_ephemeral_mode": true,
    "is_sharing_enabled": true
  },
  "group": {
    "id": 123,
    "name": "<string>"
  },
  "workspaces": [
    {
      "id": 123,
      "name": "<string>",
      "category": "<string>",
      "file_count": 123,
      "summaries": []
    }
  ],
  "tools": {
    "native": [
      {
        "id": "<string>",
        "name": "<string>",
        "object": "tool"
      }
    ],
    "mcp_servers": [
      {
        "id": "<string>",
        "name": "<string>",
        "object": "mcp_server"
      }
    ]
  },
  "is_default": true,
  "ownership": "<string>",
  "scope_workspaces_by_group": true,
  "scoped_workspace_ids": [
    123
  ],
  "is_current_user_favorite": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}
"<unknown>"
"<unknown>"
"<unknown>"

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
integer
required

ID of the agent to update

Body

name
string | null
description
string | null
instructions
string | null
scope_workspaces_by_group
boolean | null
native_tool_ids
string<uuid>[] | null
mcp_server_ids
string<uuid>[] | null
scoped_workspace_ids
integer[] | null

Response

id
integer
required
name
string
required
description
string | null
required
instructions
string | null
required
company
object
required
group
object
required
workspaces
object[]
required
tools
object
required
is_default
boolean
required
ownership
string
required
scope_workspaces_by_group
boolean
required
scoped_workspace_ids
integer[]
required
is_current_user_favorite
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required