Agentic AI · Build
Agents
What each agent is for, what it may do, and what it has actually been doing. An agent with no tools is not broken — it is one that can only think, which is a legitimate and common thing to want.
/api/agentic/agentsPublished as /api/v1/agentsOverview
| Package | Agentic AI |
|---|---|
| Authentication | Bearer token: a service account's token (POST /api/auth/service-token) or, for the published path, an API key |
| Authorization | The caller's roles must hold Agentic AI › Agents on the Roles screen: display for GET, add for POST, change for PUT, delete for DELETE; an action needs the grant of the button that runs it on the screen. |
| Table | agent.agents · kept per company (and organisational unit where it has one) |
| Record | Created, changed and (where the screen allows) deleted; key id |
| Rules | The same as the screen: validation, numbering, approvals, posting, the company the caller belongs to, and the audit trail. |
API reference
12 operations. Open one for its parameters, bodies, responses and a sample request.
GET/api/agentic/agentsList agents
Query parameters
| Name | Description | Example |
|---|---|---|
limit | Rows per page (50 by default, at most 200) | limit=100 |
offset | Rows to skip | offset=200 |
q | Free-text search over the search columns | q=acme |
sort | column:asc or column:desc, several separated by commas | sort=created_at:desc |
filter | A JSON condition or group (see the filter language), URL-encoded; any field below can be filtered and sorted | filter={"col":"status","op":"eq","value":"open"} |
<field>=<value> | Shorthand for "field is value" |
Response 200
{
"rows": [
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"org_unit_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"agent_no": "AGE-000001",
"code": "COD-000001",
"name": "Example",
"name_local": "Example",
"purpose": "text",
"purpose_local": "text",
"module": "agentic",
"category": "text",
"template_code": "TEM-000001",
"avatar": "text",
"provider": "text",
"model": "text"
}
],
"count": 1
}Sample request
curl "https://demo.tranxact.ai/api/agentic/agents?limit=20" \
-H "Authorization: Bearer $TOKEN"GET/api/agentic/agents/{id}Read one agents
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Response 200
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"org_unit_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"agent_no": "AGE-000001",
"code": "COD-000001",
"name": "Example",
"name_local": "Example",
"purpose": "text",
"purpose_local": "text",
"module": "agentic",
"category": "text",
"template_code": "TEM-000001",
"avatar": "text",
"provider": "text",
"model": "text"
}404 when no record with that id is visible to the caller.
Sample request
curl "https://demo.tranxact.ai/api/agentic/agents/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"POST/api/agentic/agentsCreate a agents
Request body
The record as JSON. Fields marked Yes are required.
| Field | Type | Required | Description |
|---|---|---|---|
code | text | Yes | Code — Short and stable. It appears in the audit trail against everything this agent does, so it cannot be changed once the agent is created. |
name | text | Yes | Name |
name_local | text | No | Name in local language — The agent's name in the company's local language — Arabic in Saudi Arabia, Hindi or a regional language in India. People using the console in a language other than English see this name; English readers see Name. Leave empty to show Name to everyone. |
purpose | text | No | What it is for — One or two sentences a colleague reads to tell whether this is the agent they need. |
purpose_local | text | No | Purpose local |
module | text | No | Module — The part of the product it works in. Its tools are usually from the same part. Allowed: agentic crm scm accounting hrms mfg ats ehr slcm platform |
category | text | No | Kind of work — What sort of work it does, for grouping and filtering agents. Starts at Operations; choose the one that fits. |
template_code | text | No | Template code |
avatar | text | No | Avatar |
provider | text | No | Engine — The AI service it runs on. Starts at the company default engine (Platform › AI Providers); an engine with no key for this company cannot be chosen. |
model | text | No | Model — Required before the agent can be published or run. The list is the models of the chosen engine; a model with no price on file shows its run cost as unknown. |
temperature | numeric | No | Temperature — How freely it words its answers: 0 is the most predictable, higher is more varied. Empty: the engine default. |
max_tokens | integer | No | Reply size limit — The longest reply it may write in one step, in tokens (a token is about three quarters of a word). Empty: the engine default. |
system_prompt | text | No | Instructions — What it is, what it must do, and what it must never do. This is the whole agent: everything else on this screen is a limit on it. |
instructions | text | No | Opening instruction — What it is told at the start of every run, as distinct from what it always is. |
run_as_user_id | uuid | No | Runs as — The agent borrows this person authority and cannot exceed it. An agent that runs as an administrator can reach everything an administrator can. |
owner_user_id | uuid | No | Owner — The person answerable for what this agent does. Left empty on a new agent, it is you. Needed before the agent can be published or given more autonomy. |
max_steps | integer | No | Step limit — A run that hits this is stopped rather than truncated, because a half-finished agentic run that claims to have succeeded is worse than one that says it ran out. |
max_tool_calls | integer | No | Tool-call limit — The most tool calls one run may make; the run is stopped at this many. |
max_run_seconds | integer | No | Time limit (seconds) — How long one run may take before it is stopped, e.g. 300 for five minutes. |
max_cost_per_run | numeric | No | Cost ceiling per run (company currency) |
max_cost_per_day | numeric | No | Cost ceiling per day (company currency) |
currency | text | No | Currency |
memory_mode | text | No | Memory — Whether it keeps notes between runs (Agent Memory) and how widely they are shared. |
memory_ttl_days | integer | No | Forget after (days) — A note it keeps is forgotten after this many days. Empty: kept until removed. |
locale | text | No | Writes in — A language code. Empty means the language of whoever is reading. |
notes | text | No | Notes |
is_active | boolean | No | Enabled — Untick to switch the agent off without retiring it — it then does not run, by hand or on a trigger. This does not make a draft runnable: Publish does (Next step › Publish), and Status then reads active. Next step › Switch off / Switch on does the same without opening Edit. |
Sample body
{
"code": "COD-000001",
"name": "Example",
"name_local": "Example",
"purpose": "text",
"purpose_local": "text",
"module": "agentic"
}Response 201
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"org_unit_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"agent_no": "AGE-000001",
"code": "COD-000001",
"name": "Example",
"name_local": "Example",
"purpose": "text",
"purpose_local": "text",
"module": "agentic",
"category": "text",
"template_code": "TEM-000001",
"avatar": "text",
"provider": "text",
"model": "text"
}Sample request
curl -X POST "https://demo.tranxact.ai/api/agentic/agents" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"code":"COD-000001","name":"Example","name_local":"Example","purpose":"text","purpose_local":"text","module":"agentic"}'PUT/api/agentic/agents/{id}Change a agents
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
Only the fields to change; fields left out keep their value.
| Field | Type | Required | Description |
|---|---|---|---|
code | text | Yes | Code — Short and stable. It appears in the audit trail against everything this agent does, so it cannot be changed once the agent is created. |
name | text | Yes | Name |
name_local | text | No | Name in local language — The agent's name in the company's local language — Arabic in Saudi Arabia, Hindi or a regional language in India. People using the console in a language other than English see this name; English readers see Name. Leave empty to show Name to everyone. |
purpose | text | No | What it is for — One or two sentences a colleague reads to tell whether this is the agent they need. |
purpose_local | text | No | Purpose local |
module | text | No | Module — The part of the product it works in. Its tools are usually from the same part. Allowed: agentic crm scm accounting hrms mfg ats ehr slcm platform |
category | text | No | Kind of work — What sort of work it does, for grouping and filtering agents. Starts at Operations; choose the one that fits. |
template_code | text | No | Template code |
avatar | text | No | Avatar |
provider | text | No | Engine — The AI service it runs on. Starts at the company default engine (Platform › AI Providers); an engine with no key for this company cannot be chosen. |
model | text | No | Model — Required before the agent can be published or run. The list is the models of the chosen engine; a model with no price on file shows its run cost as unknown. |
temperature | numeric | No | Temperature — How freely it words its answers: 0 is the most predictable, higher is more varied. Empty: the engine default. |
max_tokens | integer | No | Reply size limit — The longest reply it may write in one step, in tokens (a token is about three quarters of a word). Empty: the engine default. |
system_prompt | text | No | Instructions — What it is, what it must do, and what it must never do. This is the whole agent: everything else on this screen is a limit on it. |
instructions | text | No | Opening instruction — What it is told at the start of every run, as distinct from what it always is. |
run_as_user_id | uuid | No | Runs as — The agent borrows this person authority and cannot exceed it. An agent that runs as an administrator can reach everything an administrator can. |
owner_user_id | uuid | No | Owner — The person answerable for what this agent does. Left empty on a new agent, it is you. Needed before the agent can be published or given more autonomy. |
max_steps | integer | No | Step limit — A run that hits this is stopped rather than truncated, because a half-finished agentic run that claims to have succeeded is worse than one that says it ran out. |
max_tool_calls | integer | No | Tool-call limit — The most tool calls one run may make; the run is stopped at this many. |
max_run_seconds | integer | No | Time limit (seconds) — How long one run may take before it is stopped, e.g. 300 for five minutes. |
max_cost_per_run | numeric | No | Cost ceiling per run (company currency) |
max_cost_per_day | numeric | No | Cost ceiling per day (company currency) |
currency | text | No | Currency |
memory_mode | text | No | Memory — Whether it keeps notes between runs (Agent Memory) and how widely they are shared. |
memory_ttl_days | integer | No | Forget after (days) — A note it keeps is forgotten after this many days. Empty: kept until removed. |
locale | text | No | Writes in — A language code. Empty means the language of whoever is reading. |
notes | text | No | Notes |
is_active | boolean | No | Enabled — Untick to switch the agent off without retiring it — it then does not run, by hand or on a trigger. This does not make a draft runnable: Publish does (Next step › Publish), and Status then reads active. Next step › Switch off / Switch on does the same without opening Edit. |
Sample body
{
"code": "COD-000001",
"name": "Example"
}Response 200
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"org_unit_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"agent_no": "AGE-000001",
"code": "COD-000001",
"name": "Example",
"name_local": "Example",
"purpose": "text",
"purpose_local": "text",
"module": "agentic",
"category": "text",
"template_code": "TEM-000001",
"avatar": "text",
"provider": "text",
"model": "text"
}Sample request
curl -X PUT "https://demo.tranxact.ai/api/agentic/agents/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"code":"COD-000001","name":"Example"}'DELETE/api/agentic/agents/{id}Delete a agents
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Response 200
{ "deleted": true }Many documents are cancelled or reversed instead; the API refuses a delete the screen would refuse.
Sample request
curl -X DELETE "https://demo.tranxact.ai/api/agentic/agents/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"POST/api/agentic/agents/{id}/copyCopy
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
overrides, preview, withLinesResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/agentic/agents/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/copy" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"overrides":"value","preview":"value","withLines":"value"}'POST/api/agentic/agents/{id}/publishPublish
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
noteResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/agentic/agents/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/publish" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"note":"value"}'POST/api/agentic/agents/{id}/autonomyAutonomy
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
autonomy, reason; autonomy one of suggest|approve|supervise|autoResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/agentic/agents/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/autonomy" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"autonomy":"value","reason;":"value"}'POST/api/agentic/agents/{id}/switch-onSwitch on
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
reasonResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/agentic/agents/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/switch-on" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"reason":"value"}'POST/api/agentic/agents/{id}/switch-offSwitch off
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
reasonResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/agentic/agents/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/switch-off" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"reason":"value"}'GET/api/agentic/agents/{id}/toolsTools
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/agentic/agents/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/tools" \
-H "Authorization: Bearer $TOKEN"POST/api/agentic/agents/{id}/runRun
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
input, subjectResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/agentic/agents/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/run" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"input":"value","subject":"value"}'Data model
Every field of a agents, as the API returns it. Field names are the JSON keys; any of them can be filtered and sorted on a list.
| Field | Type | Access | Description |
|---|---|---|---|
id | uuid | read only | Id |
org_id | uuid | read only | Org id |
org_unit_id | uuid | read only | Org unit id |
agent_no | text | read only | Agent no |
code | text | read, write | Code — Short and stable. It appears in the audit trail against everything this agent does, so it cannot be changed once the agent is created. |
name | text | read, write | Name |
name_local | text | read, write | Name in local language — The agent's name in the company's local language — Arabic in Saudi Arabia, Hindi or a regional language in India. People using the console in a language other than English see this name; English readers see Name. Leave empty to show Name to everyone. |
purpose | text | read, write | What it is for — One or two sentences a colleague reads to tell whether this is the agent they need. |
purpose_local | text | read, write | Purpose local |
module | text | read, write | Module — The part of the product it works in. Its tools are usually from the same part. Allowed: agentic crm scm accounting hrms mfg ats ehr slcm platform |
category | text | read, write | Kind of work — What sort of work it does, for grouping and filtering agents. Starts at Operations; choose the one that fits. |
template_code | text | read, write | Template code |
avatar | text | read, write | Avatar |
provider | text | read, write | Engine — The AI service it runs on. Starts at the company default engine (Platform › AI Providers); an engine with no key for this company cannot be chosen. |
model | text | read, write | Model — Required before the agent can be published or run. The list is the models of the chosen engine; a model with no price on file shows its run cost as unknown. |
temperature | numeric | read, write | Temperature — How freely it words its answers: 0 is the most predictable, higher is more varied. Empty: the engine default. |
max_tokens | integer | read, write | Reply size limit — The longest reply it may write in one step, in tokens (a token is about three quarters of a word). Empty: the engine default. |
system_prompt | text | read, write | Instructions — What it is, what it must do, and what it must never do. This is the whole agent: everything else on this screen is a limit on it. |
instructions | text | read, write | Opening instruction — What it is told at the start of every run, as distinct from what it always is. |
output_schema | jsonb | read only | Output schema |
version | integer | read only | Version |
autonomy | text | read only | Autonomy — Suggest only is where every agent starts. Raising this is a separate, audited decision — the field here sets it on a new agent, and afterwards it changes on the agent screen. |
run_as_user_id | uuid | read, write | Runs as — The agent borrows this person authority and cannot exceed it. An agent that runs as an administrator can reach everything an administrator can. |
owner_user_id | uuid | read, write | Owner — The person answerable for what this agent does. Left empty on a new agent, it is you. Needed before the agent can be published or given more autonomy. |
max_steps | integer | read, write | Step limit — A run that hits this is stopped rather than truncated, because a half-finished agentic run that claims to have succeeded is worse than one that says it ran out. |
max_tool_calls | integer | read, write | Tool-call limit — The most tool calls one run may make; the run is stopped at this many. |
max_run_seconds | integer | read, write | Time limit (seconds) — How long one run may take before it is stopped, e.g. 300 for five minutes. |
max_cost_per_run | numeric | read, write | Cost ceiling per run (company currency) |
max_cost_per_day | numeric | read, write | Cost ceiling per day (company currency) |
currency | text | read, write | Currency |
memory_mode | text | read, write | Memory — Whether it keeps notes between runs (Agent Memory) and how widely they are shared. |
memory_ttl_days | integer | read, write | Forget after (days) — A note it keeps is forgotten after this many days. Empty: kept until removed. |
locale | text | read, write | Writes in — A language code. Empty means the language of whoever is reading. |
status | text | read only | Status |
last_run_at | timestamp with time zone | read only | Last run at |
run_count | bigint | read only | Run count |
success_count | bigint | read only | Success count |
failure_count | bigint | read only | Failure count |
total_cost | numeric | read only | Total cost |
notes | text | read, write | Notes |
is_active | boolean | read, write | Enabled — Untick to switch the agent off without retiring it — it then does not run, by hand or on a trigger. This does not make a draft runnable: Publish does (Next step › Publish), and Status then reads active. Next step › Switch off / Switch on does the same without opening Edit. |
created_at | timestamp with time zone | read only | Created at |
created_by | uuid | read only | Created by |
updated_at | timestamp with time zone | read only | Updated at |
updated_by | uuid | read only | Updated by |
xf_text_1 | text | read only | Xf text 1 |
xf_text_2 | text | read only | Xf text 2 |
xf_text_3 | text | read only | Xf text 3 |
xf_text_4 | text | read only | Xf text 4 |
xf_text_5 | text | read only | Xf text 5 |
xf_num_1 | numeric | read only | Xf num 1 |
xf_num_2 | numeric | read only | Xf num 2 |
xf_num_3 | numeric | read only | Xf num 3 |
xf_date_1 | date | read only | Xf date 1 |
xf_date_2 | date | read only | Xf date 2 |
Errors
| Status | Meaning |
|---|---|
| 400 | The request could not be read: a filter that is not JSON, a bad parameter |
| 401 | No credential, or it is wrong, revoked or expired |
| 403 | The caller's roles do not hold Agentic AI › Agents for this verb, or the address or origin is not allowed |
| 404 | No record with that id is visible to the caller |
| 409 | A conflict: a duplicate number, a document in a state that does not allow it, or a record changed or locked by someone else |
| 422 | Refused by the same validation as the screen; the error names the field and why |
Every error is JSON: {"error": "a sentence saying what was wrong"}, with field where it applies.