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.

Gets detailed view of AI agent capabilities

get

Returns sagas, states, systems and scripting languages an agent can utilize.

Query parameters
idstringOptional

Id of agent to view

Responses
200
OK
application/json
get
GET /api/request/{channel}/GetAIAgent HTTP/1.1
Host: gateway_server
Accept: */*
{
  "id": "text",
  "data": {
    "name": "text",
    "description": "text",
    "states": [],
    "systems": [],
    "sagas": [],
    "prompts": []
  }
}

Calls an AI agent

post

Makes a request to a specific AI agent with a message or prompt inputs.

Body
agentstringOptional

Id of the agent to call

Example: translator
chatstringOptional

Id of the ongoing chat with agent

Example: 123
messagestringOptional

Message/request to send to agent, required if prompt is not used

Example: Please translate the following sentence...
promptstringOptional

Id of the agent prompt to be used, required if message is not used

Example: multi_translate
inputobjectOptional

Input parameters which are used by the selected prompt

Example: {"text":"Hello world","source":"enUS","targets":["frFR","ptPT"],"instructions":"Please keep it short"}
Responses
200
OK
application/json
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