Agents (Legacy)
Interact with Agent apps using conversational messages. Send messages to agents and receive responses, with support for both synchronous and asynchronous communication.
This endpoint allows you to send a message (chat) to an Agent app. You can include inputs with your message which will be passed to the app.
API requests are authenticated using Bearer tokens. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
You can find your API key in your workspace settings.
The unique identifier (UUID) for the app. You can find this in your app's Integrate section.
6d2f4e0b-1a1d-49ae-8034-ba56f932119eThe message to send to the agent
Hello, I need help with this.The session id of the chat. Use the session_id to send a message to an existing conversation. If not present, a new session will be created after sending the first message.
23iu3h23-34n43yib4-3243n34b4-34n434hMessage sent
Authentication error
POST /public_api/agent_apps/{app_uuid}/chat HTTP/1.1
Host: api.airops.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 62
{
"message": "Hello, how are you?",
"inputs": {
"name": "John Doe"
}
}{
"result": {
"message": "Hello, how are you?.",
"session_id": "23iu3h23-34n43yib4-3243n34b4-34n434h"
},
"airops_app_execution": {
"id": 22,
"status": "success",
"airops_apps_version_id": 21,
"conversation_id": 23,
"credits_used": 34,
"error_code": null,
"error_message": null,
"feedback": "positive",
"inputs": {
"name": "John Doe"
},
"output": {
"greet": "Hello John Doe!"
},
"runtime": 34,
"source": null,
"uuid": "c3405f16-d0e8-4d5c-8ad9-85ef332c44ee",
"workspace_id": 1,
"createdAt": "2024-02-01T16:39:28.161Z",
"updatedAt": "2024-02-01T16:39:28.161Z"
}
}This endpoint allows you to send a message (chat) to an Agent app asynchronously, without waiting for the response. You can include inputs with your message which will be passed to the app.
API requests are authenticated using Bearer tokens. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
You can find your API key in your workspace settings.
The unique identifier (UUID) for the app. You can find this in your app's Integrate section.
6d2f4e0b-1a1d-49ae-8034-ba56f932119eThe message to send to the agent.
Hello, how are you?Message sent
Authentication error
POST /public_api/agent_apps/{app_uuid}/async_chat HTTP/1.1
Host: api.airops.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 62
{
"message": "Hello, how are you?",
"inputs": {
"name": "John Doe"
}
}{
"session_id": {
"$ref": "#/components/examples/ChatPayload/value/session_id"
},
"airops_app_execution": {
"id": 22,
"status": "success",
"airops_apps_version_id": 21,
"conversation_id": 23,
"credits_used": 34,
"error_code": null,
"error_message": null,
"feedback": "positive",
"inputs": {
"name": "John Doe"
},
"output": {
"greet": "Hello John Doe!"
},
"runtime": 34,
"source": null,
"uuid": "c3405f16-d0e8-4d5c-8ad9-85ef332c44ee",
"workspace_id": 1,
"createdAt": "2024-02-01T16:39:28.161Z",
"updatedAt": "2024-02-01T16:39:28.161Z"
}
}Was this helpful?