ReferenceSDKClient
Agents
SDK reference for agents — Create and manage AI agents with system prompts and tool bindings.
Create and manage AI agents with system prompts and tool bindings.
createAgent
Create a new agent with a system prompt and tools that can trigger graphs
POST
Usage:
const result = await swirls.client.agents.createAgent({
projectId: '...',
name: '...',
label: '...',
prompt: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | No | |
projectId | string | Yes | |
folderId | string | null | No | |
name | string | Yes | |
label | string | Yes | |
description | string | No | |
prompt | string | Yes | |
toolTriggerIds | string[] | No |
Output:
| Field | Type | Description |
|---|---|---|
id | string |
getAgent
Get an agent by ID with its tools
GET
Usage:
const result = await swirls.client.agents.getAgent({
id: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
projectId | string | |
folderId | string | null | |
name | string | |
label | string | |
description | string | null | |
prompt | string | |
createdAt | unknown | |
orgId | string | null | |
userId | string | |
tools | object[] |
updateAgent
Update an agent
PUT
Usage:
const result = await swirls.client.agents.updateAgent({
id: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | No | |
description | string | No | |
prompt | string | No | |
folderId | string | null | No | |
toolTriggerIds | string[] | No |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
projectId | string | |
folderId | string | null | |
name | string | |
label | string | |
description | string | null | |
prompt | string | |
createdAt | unknown | |
orgId | string | null | |
userId | string |
deleteAgent
Delete an agent
DELETE
Usage:
const result = await swirls.client.agents.deleteAgent({
id: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
listAgents
List all agents in a project. Agents are AI assistants with tools that can trigger graphs.
GET
Usage:
const result = await swirls.client.agents.listAgents({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
folderId | string | null | No | |
pagination | object | No |
Output:
| Field | Type | Description |
|---|---|---|
pagination | object | |
results | object[] | |
totalCount | number |