SWIRLS_
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:

ParameterTypeRequiredDescription
idstringNo
projectIdstringYes
folderIdstring | nullNo
namestringYes
labelstringYes
descriptionstringNo
promptstringYes
toolTriggerIdsstring[]No

Output:

FieldTypeDescription
idstring

getAgent

Get an agent by ID with its tools

GET

Usage:

const result = await swirls.client.agents.getAgent({
  id: '...',
})

Input:

ParameterTypeRequiredDescription
idstringYes

Output:

FieldTypeDescription
idstring
projectIdstring
folderIdstring | null
namestring
labelstring
descriptionstring | null
promptstring
createdAtunknown
orgIdstring | null
userIdstring
toolsobject[]

updateAgent

Update an agent

PUT

Usage:

const result = await swirls.client.agents.updateAgent({
  id: '...',
})

Input:

ParameterTypeRequiredDescription
idstringYes
namestringNo
descriptionstringNo
promptstringNo
folderIdstring | nullNo
toolTriggerIdsstring[]No

Output:

FieldTypeDescription
idstring
projectIdstring
folderIdstring | null
namestring
labelstring
descriptionstring | null
promptstring
createdAtunknown
orgIdstring | null
userIdstring

deleteAgent

Delete an agent

DELETE

Usage:

const result = await swirls.client.agents.deleteAgent({
  id: '...',
})

Input:

ParameterTypeRequiredDescription
idstringYes

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:

ParameterTypeRequiredDescription
projectIdstringYes
folderIdstring | nullNo
paginationobjectNo

Output:

FieldTypeDescription
paginationobject
resultsobject[]
totalCountnumber

On this page