AI Agent APIs
All AI agents configured on Rierino are automatically accessible as APIs and can be incorporated into any app for visual interaction
All runners which include GenAI base runner and have GenAI models assigned to them can service the following common APIs for describing and interacting with agents.
Returns sagas, states, systems and scripting languages an agent can utilize.
Query parameters
idstringOptional
Id of agent to view
Responses
200
OK
application/json
401
Authorization information is missing or invalid.
403
User does not have the required role for access.
500
Server failed to process request due to internal errors.
501
Feature is not implemented by the server.
get
GET /api/request/{channel}/GetAIAgent HTTP/1.1
Host: gateway_server
Accept: */*
{
"id": "text",
"data": {
"name": "text",
"description": "text",
"states": [],
"systems": [],
"sagas": [],
"prompts": []
}
}
Makes a request to a specific AI agent with a message or prompt inputs.
Body
agentstringOptionalExample:
Id of the agent to call
translator
chatstringOptionalExample:
Id of the ongoing chat with agent
123
messagestringOptionalExample:
Message/request to send to agent, required if prompt is not used
Please translate the following sentence...
promptstringOptionalExample:
Id of the agent prompt to be used, required if message is not used
multi_translate
inputobjectOptionalExample:
Input parameters which are used by the selected prompt
{"text":"Hello world","source":"enUS","targets":["frFR","ptPT"],"instructions":"Please keep it short"}
Responses
200
OK
application/json
401
Authorization information is missing or invalid.
403
User does not have the required role for access.
500
Server failed to process request due to internal errors.
501
Feature is not implemented by the server.
post
POST /api/request/{channel}/CallAIAgent HTTP/1.1
Host: gateway_server
Content-Type: application/json
Accept: */*
Content-Length: 228
{
"agent": "translator",
"chat": "123",
"message": "Please translate the following sentence...",
"prompt": "multi_translate",
"input": {
"text": "Hello world",
"source": "enUS",
"targets": [
"frFR",
"ptPT"
],
"instructions": "Please keep it short"
}
}
{
"response": "text",
"chat": "text"
}
Last updated