TRANXACT.AI Help

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.

Type REST12 operationsBase path /api/agentic/agentsPublished as /api/v1/agents

Download specification (OpenAPI 3.1) Screen: Agents

Overview

PackageAgentic AI
AuthenticationBearer token: a service account's token (POST /api/auth/service-token) or, for the published path, an API key
AuthorizationThe 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.
Tableagent.agents · kept per company (and organisational unit where it has one)
RecordCreated, changed and (where the screen allows) deleted; key id
RulesThe 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

NameDescriptionExample
limitRows per page (50 by default, at most 200)limit=100
offsetRows to skipoffset=200
qFree-text search over the search columnsq=acme
sortcolumn:asc or column:desc, several separated by commassort=created_at:desc
filterA JSON condition or group (see the filter language), URL-encoded; any field below can be filtered and sortedfilter={"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

NameTypeDescription
idstring (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.

FieldTypeRequiredDescription
codetextYesCode — Short and stable. It appears in the audit trail against everything this agent does, so it cannot be changed once the agent is created.
nametextYesName
name_localtextNoName 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.
purposetextNoWhat it is for — One or two sentences a colleague reads to tell whether this is the agent they need.
purpose_localtextNoPurpose local
moduletextNoModule — 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
categorytextNoKind of work — What sort of work it does, for grouping and filtering agents. Starts at Operations; choose the one that fits.
template_codetextNoTemplate code
avatartextNoAvatar
providertextNoEngine — 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.
modeltextNoModel — 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.
temperaturenumericNoTemperature — How freely it words its answers: 0 is the most predictable, higher is more varied. Empty: the engine default.
max_tokensintegerNoReply 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_prompttextNoInstructions — 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.
instructionstextNoOpening instruction — What it is told at the start of every run, as distinct from what it always is.
run_as_user_iduuidNoRuns 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_iduuidNoOwner — 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_stepsintegerNoStep 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_callsintegerNoTool-call limit — The most tool calls one run may make; the run is stopped at this many.
max_run_secondsintegerNoTime limit (seconds) — How long one run may take before it is stopped, e.g. 300 for five minutes.
max_cost_per_runnumericNoCost ceiling per run (company currency)
max_cost_per_daynumericNoCost ceiling per day (company currency)
currencytextNoCurrency
memory_modetextNoMemory — Whether it keeps notes between runs (Agent Memory) and how widely they are shared.
memory_ttl_daysintegerNoForget after (days) — A note it keeps is forgotten after this many days. Empty: kept until removed.
localetextNoWrites in — A language code. Empty means the language of whoever is reading.
notestextNoNotes
is_activebooleanNoEnabled — 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

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

Request body

Only the fields to change; fields left out keep their value.

FieldTypeRequiredDescription
codetextYesCode — Short and stable. It appears in the audit trail against everything this agent does, so it cannot be changed once the agent is created.
nametextYesName
name_localtextNoName 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.
purposetextNoWhat it is for — One or two sentences a colleague reads to tell whether this is the agent they need.
purpose_localtextNoPurpose local
moduletextNoModule — 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
categorytextNoKind of work — What sort of work it does, for grouping and filtering agents. Starts at Operations; choose the one that fits.
template_codetextNoTemplate code
avatartextNoAvatar
providertextNoEngine — 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.
modeltextNoModel — 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.
temperaturenumericNoTemperature — How freely it words its answers: 0 is the most predictable, higher is more varied. Empty: the engine default.
max_tokensintegerNoReply 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_prompttextNoInstructions — 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.
instructionstextNoOpening instruction — What it is told at the start of every run, as distinct from what it always is.
run_as_user_iduuidNoRuns 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_iduuidNoOwner — 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_stepsintegerNoStep 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_callsintegerNoTool-call limit — The most tool calls one run may make; the run is stopped at this many.
max_run_secondsintegerNoTime limit (seconds) — How long one run may take before it is stopped, e.g. 300 for five minutes.
max_cost_per_runnumericNoCost ceiling per run (company currency)
max_cost_per_daynumericNoCost ceiling per day (company currency)
currencytextNoCurrency
memory_modetextNoMemory — Whether it keeps notes between runs (Agent Memory) and how widely they are shared.
memory_ttl_daysintegerNoForget after (days) — A note it keeps is forgotten after this many days. Empty: kept until removed.
localetextNoWrites in — A language code. Empty means the language of whoever is reading.
notestextNoNotes
is_activebooleanNoEnabled — 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

NameTypeDescription
idstring (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

NameTypeDescription
idstring (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, withLines

Response

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

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

Request body

The keys this action reads (* = required; "one of" lists the only values):

note

Response

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

NameTypeDescription
idstring (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|auto

Response

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

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

Request body

The keys this action reads (* = required; "one of" lists the only values):

reason

Response

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

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

Request body

The keys this action reads (* = required; "one of" lists the only values):

reason

Response

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

NameTypeDescription
idstring (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

NameTypeDescription
idstring (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, subject

Response

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.

FieldTypeAccessDescription
iduuidread onlyId
org_iduuidread onlyOrg id
org_unit_iduuidread onlyOrg unit id
agent_notextread onlyAgent no
codetextread, writeCode — Short and stable. It appears in the audit trail against everything this agent does, so it cannot be changed once the agent is created.
nametextread, writeName
name_localtextread, writeName 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.
purposetextread, writeWhat it is for — One or two sentences a colleague reads to tell whether this is the agent they need.
purpose_localtextread, writePurpose local
moduletextread, writeModule — 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
categorytextread, writeKind of work — What sort of work it does, for grouping and filtering agents. Starts at Operations; choose the one that fits.
template_codetextread, writeTemplate code
avatartextread, writeAvatar
providertextread, writeEngine — 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.
modeltextread, writeModel — 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.
temperaturenumericread, writeTemperature — How freely it words its answers: 0 is the most predictable, higher is more varied. Empty: the engine default.
max_tokensintegerread, writeReply 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_prompttextread, writeInstructions — 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.
instructionstextread, writeOpening instruction — What it is told at the start of every run, as distinct from what it always is.
output_schemajsonbread onlyOutput schema
versionintegerread onlyVersion
autonomytextread onlyAutonomy — 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_iduuidread, writeRuns 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_iduuidread, writeOwner — 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_stepsintegerread, writeStep 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_callsintegerread, writeTool-call limit — The most tool calls one run may make; the run is stopped at this many.
max_run_secondsintegerread, writeTime limit (seconds) — How long one run may take before it is stopped, e.g. 300 for five minutes.
max_cost_per_runnumericread, writeCost ceiling per run (company currency)
max_cost_per_daynumericread, writeCost ceiling per day (company currency)
currencytextread, writeCurrency
memory_modetextread, writeMemory — Whether it keeps notes between runs (Agent Memory) and how widely they are shared.
memory_ttl_daysintegerread, writeForget after (days) — A note it keeps is forgotten after this many days. Empty: kept until removed.
localetextread, writeWrites in — A language code. Empty means the language of whoever is reading.
statustextread onlyStatus
last_run_attimestamp with time zoneread onlyLast run at
run_countbigintread onlyRun count
success_countbigintread onlySuccess count
failure_countbigintread onlyFailure count
total_costnumericread onlyTotal cost
notestextread, writeNotes
is_activebooleanread, writeEnabled — 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_attimestamp with time zoneread onlyCreated at
created_byuuidread onlyCreated by
updated_attimestamp with time zoneread onlyUpdated at
updated_byuuidread onlyUpdated by
xf_text_1textread onlyXf text 1
xf_text_2textread onlyXf text 2
xf_text_3textread onlyXf text 3
xf_text_4textread onlyXf text 4
xf_text_5textread onlyXf text 5
xf_num_1numericread onlyXf num 1
xf_num_2numericread onlyXf num 2
xf_num_3numericread onlyXf num 3
xf_date_1dateread onlyXf date 1
xf_date_2dateread onlyXf date 2

Errors

StatusMeaning
400The request could not be read: a filter that is not JSON, a bad parameter
401No credential, or it is wrong, revoked or expired
403The caller's roles do not hold Agentic AI › Agents for this verb, or the address or origin is not allowed
404No record with that id is visible to the caller
409A conflict: a duplicate number, a document in a state that does not allow it, or a record changed or locked by someone else
422Refused 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.