Table of Fields — AgentPayload
Example of context object:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
What are agent payloads?
export interface AgentPayload {
agent: string;
input: string;
context?: { role: 'user' | 'assistant'; content: string }[];
chatId?: string;
files?: string[];
metadata?: Metadata;
}
export interface Metadata {
useCache: boolean;
hoursCache: number;
}
AgentPayload| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| agent | string | Yes | Identifier of the registered agent. | ”Suporte Orkeia” |
| input | string | Yes | User’s prompt/message. | ”Quais são os planos e valores?“ |
| context | object, as per example below | No | History of turns for continuity. Can alternate between user and assistant. | See example below |
| chatId | string | No | Conversation ID for persistence. | ”chat1234” |
| files | string | No | URLs/paths of attachments. | ”www.arquivo.com” |
| metadata | Metadata | No | Edge cache control. | see example below |
context: {
role: 'user' | 'assistant';
content: string;
}[]
[
{
"role":"user",
"content":"oi"
}
]
{
"useCache": true, "hoursCache": 6}
Metadata| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| useCache | boolean | ✅ | If true, allows response reuse. | true |
| hoursCache | number | ✅ | Cache validity window (in hours). | 6 |
{
"agent": "Suporte Orkeia",
"input": "Preciso de ajuda com a fatura"
}
{
"agent": "Suporte Orkeia",
"input": "Quais são os planos e valores?",
"context": [
{ "role": "user", "content": "Olá!" },
{ "role": "assistant", "content": "Oi! Como posso ajudar?" }
],
"chatId": "chat_12345",
"files": ["https://storage.orkeia.ai/docs/termos.pdf"],
"metadata": {
"useCache": true,
"hoursCache": 12
}
}
Was this page helpful?
