AI agents
Agents with their playbooks, memories, threads and approvals.
- GET
/agents/playbooks - POST
/agents/playbooks - PATCH
/agents/playbooks/{pid} - DELETE
/agents/playbooks/{pid} - GET
/agents/{id}/memories - POST
/agents/{id}/memories - DELETE
/agents/{id}/memories/{memoryId} - GET
/agents - POST
/agents - GET
/agents/usage - PATCH
/agents/settings - GET
/agents/actions - GET
/agents/actions/catalog - GET
/agents/actions/{actionId} - GET
/agents/actions/{actionId}/context - POST
/agents/actions/{actionId}/approve - POST
/agents/actions/{actionId}/edit - POST
/agents/actions/{actionId}/reject - POST
/agents/actions/{actionId}/always-allow - GET
/agents/tasks - GET
/agents/{id} - PATCH
/agents/{id} - DELETE
/agents/{id} - GET
/agents/{id}/actions - GET
/agents/{id}/actions/{actionId}/context - GET
/agents/{id}/api-key - POST
/agents/{id}/api-key/rotate - GET
/agents/{id}/tasks - POST
/agents/{id}/tasks - GET
/agents/{id}/tasks/{taskId} - PATCH
/agents/{id}/tasks/{taskId} - GET
/agents/{id}/tasks/{taskId}/events - POST
/agents/{id}/tasks/{taskId}/messages - POST
/agents/{id}/tasks/{taskId}/rerun - GET
/agents/{id}/setup - POST
/agents/{id}/setup - POST
/agents/{id}/setup/apply - POST
/agents/{id}/wake - GET
/agents/{id}/triage - GET
/agents/{id}/usage - GET
/agents/{id}/webhook - PATCH
/agents/{id}/webhook - POST
/agents/{id}/webhook/rotate - POST
/agents/{id}/mcp/test
List agent playbooks (SOP / skill modules)
GET
/agents/playbooksScope
agents:viewRead-onlyQuery parameters
| Name | Type |
|---|---|
agent | string |
q | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/playbooks" \ -H "Authorization: Bearer $KLERC_TOKEN"Create an agent playbook
POST
/agents/playbooksScope
agents:manageWrites dataRequest body
| Field | Type |
|---|---|
namerequired | string |
contentrequired | string |
description | string |
alwaysOn | boolean |
allAgents | boolean |
agents | array of string |
tags | array of string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/playbooks" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"…","content":"…","description":"…","alwaysOn":false,"allAgents":false,"agents":["…"],"tags":["…"]}'Update an agent playbook (content, assignment, always-on)
PATCH
/agents/playbooks/{pid}Scope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
pidrequired | string |
Request body
| Field | Type |
|---|---|
name | string |
content | string |
description | string |
alwaysOn | boolean |
allAgents | boolean |
agents | array of string |
tags | array of string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X PATCH "https://api.klerc.co/api/v1/agents/playbooks/{pid}" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"…","content":"…","description":"…","alwaysOn":false,"allAgents":false,"agents":["…"],"tags":["…"]}'Delete an agent playbook
DELETE
/agents/playbooks/{pid}Scope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
pidrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X DELETE "https://api.klerc.co/api/v1/agents/playbooks/{pid}" \ -H "Authorization: Bearer $KLERC_TOKEN"List an agent’s long-term memories
GET
/agents/{id}/memoriesScope
agents:viewRead-onlyPath parameters
| Name | Type |
|---|---|
idrequired | string |
Query parameters
| Name | Type |
|---|---|
scope | "agent" | "task" | "contact" |
task | string |
contactKey | string |
q | string |
kind | string |
page | number |
limit | number |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/{id}/memories?limit=25" \ -H "Authorization: Bearer $KLERC_TOKEN"Add a memory (fact / preference / instruction) to an agent
POST
/agents/{id}/memoriesScope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
idrequired | string |
Request body
| Field | Type |
|---|---|
textrequired | string |
scope | "agent" | "task" | "contact" |
kind | "fact" | "preference" | "episode" | "instruction" |
contactKey | string |
task | string |
importance | number |
expiresAt | string |
tags | array of string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/{id}/memories" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"text":"…","scope":"agent","kind":"fact","contactKey":"…","task":"…","importance":0,"expiresAt":"…","tags":["…"]}'Delete one of an agent’s memories
DELETE
/agents/{id}/memories/{memoryId}Scope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
idrequired | string |
memoryIdrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X DELETE "https://api.klerc.co/api/v1/agents/{id}/memories/{memoryId}" \ -H "Authorization: Bearer $KLERC_TOKEN"List AI agents
GET
/agentsScope
agents:viewRead-onlyResponses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents" \ -H "Authorization: Bearer $KLERC_TOKEN"Create an AI agent
POST
/agentsScope
agents:manageWrites dataRequest body
| Field | Type |
|---|---|
namerequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"…"}'Agent usage/cost across the org
GET
/agents/usageScope
agents:viewRead-onlyQuery parameters
| Name | Type |
|---|---|
from | string |
to | string |
groupBy | string |
agentId | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/usage" \ -H "Authorization: Bearer $KLERC_TOKEN"Update org-level agent settings (budgets, default model)
PATCH
/agents/settingsScope
agents:manageWrites dataRequest body
| Field | Type |
|---|---|
monthlyUsd | number |
perTaskUsd | number |
defaultModel | string |
allowAutonomous | boolean |
autoAssignIncludeAgents | boolean |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X PATCH "https://api.klerc.co/api/v1/agents/settings" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"monthlyUsd":0,"perTaskUsd":0,"defaultModel":"…","allowAutonomous":false,"autoAssignIncludeAgents":false}'List agent approval requests across the org
GET
/agents/actionsScope
agents:viewRead-onlyQuery parameters
| Name | Type |
|---|---|
status | string |
agent | string |
kind | string |
risk | string |
page | number |
limit | number |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/actions?limit=25" \ -H "Authorization: Bearer $KLERC_TOKEN"Catalog of gate-able actions (for policy rules)
GET
/agents/actions/catalogScope
agents:viewRead-onlyResponses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/actions/catalog" \ -H "Authorization: Bearer $KLERC_TOKEN"Get an approval request
GET
/agents/actions/{actionId}Scope
agents:viewRead-onlyPath parameters
| Name | Type |
|---|---|
actionIdrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/actions/{actionId}" \ -H "Authorization: Bearer $KLERC_TOKEN"Full task context behind an approval request
GET
/agents/actions/{actionId}/contextScope
agents:viewRead-onlyPath parameters
| Name | Type |
|---|---|
actionIdrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/actions/{actionId}/context" \ -H "Authorization: Bearer $KLERC_TOKEN"Approve an agent action
POST
/agents/actions/{actionId}/approveScope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
actionIdrequired | string |
Request body
| Field | Type |
|---|---|
args | object |
note | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/actions/{actionId}/approve" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"args":{},"note":"…"}'Edit and approve an agent action
POST
/agents/actions/{actionId}/editScope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
actionIdrequired | string |
Request body
| Field | Type |
|---|---|
args | object |
text | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/actions/{actionId}/edit" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"args":{},"text":"…"}'Reject an agent action
POST
/agents/actions/{actionId}/rejectScope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
actionIdrequired | string |
Request body
| Field | Type |
|---|---|
note | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/actions/{actionId}/reject" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"note":"…"}'Approve and always allow this kind of action for the agent
POST
/agents/actions/{actionId}/always-allowScope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
actionIdrequired | string |
Request body
| Field | Type |
|---|---|
scope | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/actions/{actionId}/always-allow" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"scope":"…"}'List agent task threads across the org
GET
/agents/tasksScope
agents:viewRead-onlyQuery parameters
| Name | Type |
|---|---|
agent | string |
status | string |
kind | string |
q | string |
page | number |
limit | number |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/tasks?limit=25" \ -H "Authorization: Bearer $KLERC_TOKEN"Get an AI agent
GET
/agents/{id}Scope
agents:viewRead-onlyPath parameters
| Name | Type |
|---|---|
idrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/{id}" \ -H "Authorization: Bearer $KLERC_TOKEN"Update an AI agent
PATCH
/agents/{id}Scope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
idrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X PATCH "https://api.klerc.co/api/v1/agents/{id}" \ -H "Authorization: Bearer $KLERC_TOKEN"Delete an AI agent
DELETE
/agents/{id}Scope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
idrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X DELETE "https://api.klerc.co/api/v1/agents/{id}" \ -H "Authorization: Bearer $KLERC_TOKEN"List an agent’s approval queue
GET
/agents/{id}/actionsScope
agents:viewRead-onlyPath parameters
| Name | Type |
|---|---|
idrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/{id}/actions" \ -H "Authorization: Bearer $KLERC_TOKEN"Full conversation behind an approval request
GET
/agents/{id}/actions/{actionId}/contextScope
agents:viewRead-onlyPath parameters
| Name | Type |
|---|---|
idrequired | string |
actionIdrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/{id}/actions/{actionId}/context" \ -H "Authorization: Bearer $KLERC_TOKEN"Get an agent’s API key metadata
GET
/agents/{id}/api-keyScope
agents:manageRead-onlyPath parameters
| Name | Type |
|---|---|
idrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/{id}/api-key" \ -H "Authorization: Bearer $KLERC_TOKEN"Rotate an agent’s API key
POST
/agents/{id}/api-key/rotateScope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
idrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/{id}/api-key/rotate" \ -H "Authorization: Bearer $KLERC_TOKEN"List an agent’s task threads
GET
/agents/{id}/tasksScope
agents:viewRead-onlyPath parameters
| Name | Type |
|---|---|
idrequired | string |
Query parameters
| Name | Type |
|---|---|
status | string |
kind | string |
page | number |
limit | number |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/{id}/tasks?limit=25" \ -H "Authorization: Bearer $KLERC_TOKEN"Start a task thread for an agent
POST
/agents/{id}/tasksScope
agents:viewWrites dataPath parameters
| Name | Type |
|---|---|
idrequired | string |
Request body
| Field | Type |
|---|---|
goalrequired | string |
title | string |
kind | "task" | "conversation" | "standing" |
participants | array of string |
budget | object |
budget.perTaskUsd | number |
schedule | object |
schedule.everyrequired | number |
schedule.unitrequired | string |
schedule.at | string |
schedule.enabled | boolean |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/{id}/tasks" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"goal":"…","title":"…","kind":"task","participants":["…"],"budget":{"perTaskUsd":0},"schedule":{"every":0,"unit":"…","at":"…","enabled":false}}'Get a task thread (with recent events)
GET
/agents/{id}/tasks/{taskId}Scope
agents:viewRead-onlyPath parameters
| Name | Type |
|---|---|
idrequired | string |
taskIdrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/{id}/tasks/{taskId}" \ -H "Authorization: Bearer $KLERC_TOKEN"Pause / resume / cancel / edit a task thread
PATCH
/agents/{id}/tasks/{taskId}Scope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
idrequired | string |
taskIdrequired | string |
Request body
| Field | Type |
|---|---|
action | "pause" | "resume" | "cancel" |
title | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X PATCH "https://api.klerc.co/api/v1/agents/{id}/tasks/{taskId}" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"action":"pause","title":"…"}'Page through a task thread’s events
GET
/agents/{id}/tasks/{taskId}/eventsScope
agents:viewRead-onlyPath parameters
| Name | Type |
|---|---|
idrequired | string |
taskIdrequired | string |
Query parameters
| Name | Type |
|---|---|
before | number |
limit | number |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/{id}/tasks/{taskId}/events?limit=25" \ -H "Authorization: Bearer $KLERC_TOKEN"Message an agent on a task thread
POST
/agents/{id}/tasks/{taskId}/messagesScope
agents:viewWrites dataPath parameters
| Name | Type |
|---|---|
idrequired | string |
taskIdrequired | string |
Request body
| Field | Type |
|---|---|
text | string |
attachments | array of string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/{id}/tasks/{taskId}/messages" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"text":"…","attachments":["…"]}'Run a task thread again now
POST
/agents/{id}/tasks/{taskId}/rerunScope
agents:viewWrites dataPath parameters
| Name | Type |
|---|---|
idrequired | string |
taskIdrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/{id}/tasks/{taskId}/rerun" \ -H "Authorization: Bearer $KLERC_TOKEN"Get this user's setup conversation with an agent
GET
/agents/{id}/setupScope
agents:manageRead-onlyPath parameters
| Name | Type |
|---|---|
idrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/{id}/setup" \ -H "Authorization: Bearer $KLERC_TOKEN"Talk to an agent while configuring it
POST
/agents/{id}/setupScope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
idrequired | string |
Request body
| Field | Type |
|---|---|
text | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/{id}/setup" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"text":"…"}'Save the setup the agent proposed
POST
/agents/{id}/setup/applyScope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
idrequired | string |
Request body
| Field | Type |
|---|---|
activate | boolean |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/{id}/setup/apply" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"activate":false}'Wake an agent with an event or message
POST
/agents/{id}/wakeScope
agents:viewWrites dataPath parameters
| Name | Type |
|---|---|
idrequired | string |
Request body
| Field | Type |
|---|---|
sourcerequired | object |
source.kind | string |
source.summary | string |
source.text | string |
source.payload | any |
source.taskId | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/{id}/wake" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"source":{"kind":"…","summary":"…","text":"…","payload":{},"taskId":"…"}}'List an agent’s triage decisions
GET
/agents/{id}/triageScope
agents:viewRead-onlyPath parameters
| Name | Type |
|---|---|
idrequired | string |
Query parameters
| Name | Type |
|---|---|
decision | string |
kind | string |
page | number |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/{id}/triage" \ -H "Authorization: Bearer $KLERC_TOKEN"An agent’s usage/cost summary
GET
/agents/{id}/usageScope
agents:viewRead-onlyPath parameters
| Name | Type |
|---|---|
idrequired | string |
Query parameters
| Name | Type |
|---|---|
from | string |
to | string |
groupBy | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/{id}/usage" \ -H "Authorization: Bearer $KLERC_TOKEN"Get an agent’s inbound webhook settings
GET
/agents/{id}/webhookScope
agents:manageRead-onlyPath parameters
| Name | Type |
|---|---|
idrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/agents/{id}/webhook" \ -H "Authorization: Bearer $KLERC_TOKEN"Enable/disable an agent’s inbound webhook
PATCH
/agents/{id}/webhookScope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
idrequired | string |
Request body
| Field | Type |
|---|---|
enabled | boolean |
allowDirect | boolean |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X PATCH "https://api.klerc.co/api/v1/agents/{id}/webhook" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"enabled":false,"allowDirect":false}'Rotate an agent’s inbound webhook secret
POST
/agents/{id}/webhook/rotateScope
agents:manageWrites dataPath parameters
| Name | Type |
|---|---|
idrequired | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/{id}/webhook/rotate" \ -H "Authorization: Bearer $KLERC_TOKEN"Test an MCP server connection and list its tools
POST
/agents/{id}/mcp/testScope
agents:manageRead-onlyPath parameters
| Name | Type |
|---|---|
idrequired | string |
Request body
| Field | Type |
|---|---|
url | string |
transport | string |
serverId | string |
Responses
200OK201Created401Authentication failed403Insufficient scope / feature disabled404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/agents/{id}/mcp/test" \ -H "Authorization: Bearer $KLERC_TOKEN" \ -H "Content-Type: application/json" \ -d '{"url":"…","transport":"…","serverId":"…"}'