Agents
Generated from api/openapi.yaml (OpenAPI 3.1). Base URL: https://api.teemli.com. Auth: Authorization: Bearer <token or tml_ API key>. Errors are application/problem+json; writes accept an Idempotency-Key header.
Agents (set up by chatting), allow rules
My agents
Section titled “My agents”GET /v1/orgs/{org}/agentsThe caller’s personal agents and the AI employees they manage or that are shared with
them. Ordered: active first, then paused/retired. Includes live-ish activity_state
(idle / working / waiting / needs_you), open cards for me, and month-to-date spend.
API keys: needs the agents:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
200Agents — object401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
New agent (opens as a chat)
Section titled “New agent (opens as a chat)”POST /v1/orgs/{org}/agentsCreates a blank agent in setting_up with its main conversation and a greeting
(“Hi, I’m new here. What would you like me to own?…”). Open the returned conversation;
the agent proposes its name, avatar, charter and instructions on setup_change cards.
API keys: needs the agents:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
name |
string | Optional; default “New agent” |
template |
chief_of_staff |
Start from a template (GET …/agent-templates); it is ready to use (status active) |
Responses
201Created — object401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem422Invalid input — Problem
One agent
Section titled “One agent”GET /v1/orgs/{org}/agents/{agent}API keys: needs the agents:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
agent (required) |
path | string (uuid) |
Responses
200The agent — Agent401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Edit, pause or resume an agent
Section titled “Edit, pause or resume an agent”PATCH /v1/orgs/{org}/agents/{agent}Direct edits by the person who controls the agent (owner, or an AI employee’s manager).
Confirm cards exist to stop the agent changing itself; the person edits freely.
An agent paused by an admin (admin_paused) can’t be resumed here (403).
API keys: needs the agents:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
agent (required) |
path | string (uuid) |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
name |
string | |
avatar_seed |
string | |
charter |
string | |
instructions |
string | |
model |
string | “” resets to the organisation default |
budget_monthly_usd |
number | |
clear_budget |
boolean | Remove the budget |
laptop_access |
always, ask, never |
|
status |
active, paused |
Resume / pause |
context_window_tokens |
250000, 500000, 1000000, null |
null = use the organisation’s default |
Responses
200The updated agent — Agent401Missing, invalid or expired token — Problem403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem422Invalid input — Problem
Delete an agent
Section titled “Delete an agent”DELETE /v1/orgs/{org}/agents/{agent}Deletes the agent with its conversations, routines and memory. Can’t be undone.
API keys: needs the agents:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
agent (required) |
path | string (uuid) |
Responses
200Deleted — object401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
My main conversation with an agent
Section titled “My main conversation with an agent”POST /v1/orgs/{org}/agents/{agent}/conversationGet-or-create the caller’s main thread with the agent (e.g. first time opening an AI employee shared with them).
API keys: needs the agents:run scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
agent (required) |
path | string (uuid) |
Responses
200The conversation — Conversation401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Standing permissions (“Always” and “For this task”)
Section titled “Standing permissions (“Always” and “For this task”)”GET /v1/orgs/{org}/agents/{agent}/allow-rulesShown in the agent’s Permissions tab with a revoke action. Visible to the agent’s controller.
API keys: needs the agents:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
agent (required) |
path | string (uuid) |
Responses
200Rules, newest first — object401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Revoke a standing permission
Section titled “Revoke a standing permission”DELETE /v1/orgs/{org}/agents/{agent}/allow-rules/{rule}API keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
agent (required) |
path | string (uuid) | |
rule (required) |
path | string (uuid) |
Responses
200Deleted — object401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem