TRANXACT.AI Help

Agentic AI · Build

Knowledge

What an agent may read that is not a tool call — a folder, a set of articles, a report. Retrieval rather than action.

Type REST6 operationsBase path /api/agentic/knowledge-sourcesPublished as /api/v1/knowledge-sources

Download specification (OpenAPI 3.1) Screen: Knowledge

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 › Knowledge 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.knowledge_sources · 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

6 operations. Open one for its parameters, bodies, responses and a sample request.

GET/api/agentic/knowledge-sourcesList knowledge

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_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
      "code": "COD-000001",
      "name": "Example",
      "source_kind": "resource",
      "target_module": "text",
      "target_resource": "text",
      "drive_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
      "content_source_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
      "url": "https://example.com",
      "body": "text",
      "max_items": 10,
      "max_chars": 10
    }
  ],
  "count": 1
}

Sample request

curl "https://demo.tranxact.ai/api/agentic/knowledge-sources?limit=20" \
  -H "Authorization: Bearer $TOKEN"
GET/api/agentic/knowledge-sources/{id}Read one knowledge source

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_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "code": "COD-000001",
  "name": "Example",
  "source_kind": "resource",
  "target_module": "text",
  "target_resource": "text",
  "drive_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "content_source_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "url": "https://example.com",
  "body": "text",
  "max_items": 10,
  "max_chars": 10
}

404 when no record with that id is visible to the caller.

Sample request

curl "https://demo.tranxact.ai/api/agentic/knowledge-sources/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
  -H "Authorization: Bearer $TOKEN"
POST/api/agentic/knowledge-sourcesCreate a knowledge source

Request body

The record as JSON. Fields marked Yes are required.

FieldTypeRequiredDescription
agent_iduuidNoAgent — The agent that may read it. Empty: shared with the agents whose run-as user may read this source here (their roles include Knowledge, and its unit) -- an agent reads only what the person it runs as could.
codetextYesCode — Short and stable. Runs and history refer to this source by it, so it cannot be changed once the source is created. Letters, numbers and - _ . only (for example KS-POLICIES).
nametextYesName
source_kindtextNoKind — Where it reads from: records of a screen (resource), a Drive folder, a document, a report, a web address, text typed here, or the help articles (knowledge base).
Allowed: resource drive content_source document report url text knowledge_base
target_moduletextNoModule — The module it reads from, e.g. hrms.
target_resourcetextNoScreen or report — For Kind resource: the screen whose records it reads, e.g. employees. For Kind report: the report it reads.
drive_iduuidNoDrive — The connected drive it reads (Platform › Drives & Files). An agent reads the files brought in from it.
content_source_iduuidNoContent source — The content source it reads (Platform › Drives & Files). An agent reads the files brought in from it.
urltextNoAddress — The web page to read, starting with https:// or http://.
bodytextNoText — What it should know, written here.
max_itemsintegerNoMost items — The most records, files or articles read per run: a whole number from 1 to 1,000.
max_charsintegerNoMost characters — The most characters taken from it per run: a whole number from 1 to 200,000 (40,000 is the usual). A guard against a tenant with forty thousand articles turning every run into a forty-thousand-article prompt.
refresh_hoursintegerNoRefresh every (hours) — How often it is read again: a whole number of hours from 1 to 8,760 (a year), e.g. 24 for daily. Leave it empty to read it at every run.
is_activebooleanNoActive — Untick to stop every agent reading it, at once and without a Publish: runs started by hand, by a trigger or by a workflow alike. An inactive source is not read, so it is not refreshed either.
document_iduuidNoDocument — The document it reads: its text, as read when the document was brought in.
drive_pathtextNoFolder — The folder of that drive it reads, with everything under it. Leave it empty for the whole drive; choose Other to type a deeper folder, e.g. Finance/Policies.

Sample body

{
  "code": "COD-000001",
  "name": "Example",
  "agent_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "source_kind": "resource",
  "target_module": "text",
  "target_resource": "text"
}

Response 201

{
  "id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "org_unit_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "agent_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "code": "COD-000001",
  "name": "Example",
  "source_kind": "resource",
  "target_module": "text",
  "target_resource": "text",
  "drive_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "content_source_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "url": "https://example.com",
  "body": "text",
  "max_items": 10,
  "max_chars": 10
}

Sample request

curl -X POST "https://demo.tranxact.ai/api/agentic/knowledge-sources" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code":"COD-000001","name":"Example","agent_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73","source_kind":"resource","target_module":"text","target_resource":"text"}'
PUT/api/agentic/knowledge-sources/{id}Change a knowledge source

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
agent_iduuidNoAgent — The agent that may read it. Empty: shared with the agents whose run-as user may read this source here (their roles include Knowledge, and its unit) -- an agent reads only what the person it runs as could.
codetextYesCode — Short and stable. Runs and history refer to this source by it, so it cannot be changed once the source is created. Letters, numbers and - _ . only (for example KS-POLICIES).
nametextYesName
source_kindtextNoKind — Where it reads from: records of a screen (resource), a Drive folder, a document, a report, a web address, text typed here, or the help articles (knowledge base).
Allowed: resource drive content_source document report url text knowledge_base
target_moduletextNoModule — The module it reads from, e.g. hrms.
target_resourcetextNoScreen or report — For Kind resource: the screen whose records it reads, e.g. employees. For Kind report: the report it reads.
drive_iduuidNoDrive — The connected drive it reads (Platform › Drives & Files). An agent reads the files brought in from it.
content_source_iduuidNoContent source — The content source it reads (Platform › Drives & Files). An agent reads the files brought in from it.
urltextNoAddress — The web page to read, starting with https:// or http://.
bodytextNoText — What it should know, written here.
max_itemsintegerNoMost items — The most records, files or articles read per run: a whole number from 1 to 1,000.
max_charsintegerNoMost characters — The most characters taken from it per run: a whole number from 1 to 200,000 (40,000 is the usual). A guard against a tenant with forty thousand articles turning every run into a forty-thousand-article prompt.
refresh_hoursintegerNoRefresh every (hours) — How often it is read again: a whole number of hours from 1 to 8,760 (a year), e.g. 24 for daily. Leave it empty to read it at every run.
is_activebooleanNoActive — Untick to stop every agent reading it, at once and without a Publish: runs started by hand, by a trigger or by a workflow alike. An inactive source is not read, so it is not refreshed either.
document_iduuidNoDocument — The document it reads: its text, as read when the document was brought in.
drive_pathtextNoFolder — The folder of that drive it reads, with everything under it. Leave it empty for the whole drive; choose Other to type a deeper folder, e.g. Finance/Policies.

Sample body

{
  "code": "COD-000001",
  "name": "Example"
}

Response 200

{
  "id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "org_unit_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "agent_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "code": "COD-000001",
  "name": "Example",
  "source_kind": "resource",
  "target_module": "text",
  "target_resource": "text",
  "drive_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "content_source_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "url": "https://example.com",
  "body": "text",
  "max_items": 10,
  "max_chars": 10
}

Sample request

curl -X PUT "https://demo.tranxact.ai/api/agentic/knowledge-sources/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code":"COD-000001","name":"Example"}'
DELETE/api/agentic/knowledge-sources/{id}Delete a knowledge source

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/knowledge-sources/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
  -H "Authorization: Bearer $TOKEN"
POST/api/agentic/knowledge-sources/{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/knowledge-sources/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/copy" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"overrides":"value","preview":"value","withLines":"value"}'

Data model

Every field of a knowledge source, 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_iduuidread, writeAgent — The agent that may read it. Empty: shared with the agents whose run-as user may read this source here (their roles include Knowledge, and its unit) -- an agent reads only what the person it runs as could.
codetextread, writeCode — Short and stable. Runs and history refer to this source by it, so it cannot be changed once the source is created. Letters, numbers and - _ . only (for example KS-POLICIES).
nametextread, writeName
source_kindtextread, writeKind — Where it reads from: records of a screen (resource), a Drive folder, a document, a report, a web address, text typed here, or the help articles (knowledge base).
Allowed: resource drive content_source document report url text knowledge_base
target_moduletextread, writeModule — The module it reads from, e.g. hrms.
target_resourcetextread, writeScreen or report — For Kind resource: the screen whose records it reads, e.g. employees. For Kind report: the report it reads.
drive_iduuidread, writeDrive — The connected drive it reads (Platform › Drives & Files). An agent reads the files brought in from it.
content_source_iduuidread, writeContent source — The content source it reads (Platform › Drives & Files). An agent reads the files brought in from it.
urltextread, writeAddress — The web page to read, starting with https:// or http://.
bodytextread, writeText — What it should know, written here.
max_itemsintegerread, writeMost items — The most records, files or articles read per run: a whole number from 1 to 1,000.
max_charsintegerread, writeMost characters — The most characters taken from it per run: a whole number from 1 to 200,000 (40,000 is the usual). A guard against a tenant with forty thousand articles turning every run into a forty-thousand-article prompt.
refresh_hoursintegerread, writeRefresh every (hours) — How often it is read again: a whole number of hours from 1 to 8,760 (a year), e.g. 24 for daily. Leave it empty to read it at every run.
last_refreshed_attimestamp with time zoneread onlyLast refreshed at
item_countintegerread onlyItem count
is_activebooleanread, writeActive — Untick to stop every agent reading it, at once and without a Publish: runs started by hand, by a trigger or by a workflow alike. An inactive source is not read, so it is not refreshed either.
created_attimestamp with time zoneread onlyCreated at
created_byuuidread onlyCreated by
updated_attimestamp with time zoneread onlyUpdated at
updated_byuuidread onlyUpdated by
document_iduuidread, writeDocument — The document it reads: its text, as read when the document was brought in.
drive_pathtextread, writeFolder — The folder of that drive it reads, with everything under it. Leave it empty for the whole drive; choose Other to type a deeper folder, e.g. Finance/Policies.
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 › Knowledge 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.