ByteChef LogoByteChef

AI Agent

With the AI Agent, you can chat with the AI agent.

Categories: Artificial Intelligence

Type: aiAgent/v1


Actions

Chat

Name: chat

Chat with the AI agent.

Properties

NameLabelTypeDescriptionRequired
formatFormatSTRING
Options SIMPLE, ADVANCED
Format of providing the prompt to the model.true
userPromptPromptSTRINGUser prompt to the model.true
systemPromptSystem PromptSTRINGSystem prompt to the model.false
attachmentsAttachmentsARRAY
Items [FILE_ENTRY]
Only text and image files are supported. Also, only certain models supports images. Please check the documentation.false
messagesMessagesARRAY
Items [{STRING(role), STRING(content), [FILE_ENTRY](attachments)}]
A list of messages comprising the conversation so far.true
responseResponseOBJECT
Properties {STRING(responseFormat), STRING(responseSchema)}
The response from the API.true

Example JSON Structure

{
  "label" : "Chat",
  "name" : "chat",
  "parameters" : {
    "format" : "",
    "userPrompt" : "",
    "systemPrompt" : "",
    "attachments" : [ {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    } ],
    "messages" : [ {
      "role" : "",
      "content" : "",
      "attachments" : [ {
        "extension" : "",
        "mimeType" : "",
        "name" : "",
        "url" : ""
      } ]
    } ],
    "response" : {
      "responseFormat" : "",
      "responseSchema" : ""
    }
  },
  "type" : "aiAgent/v1/chat"
}

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

Chat (stream)

Name: streamChat

Chat with the AI agent and stream the response.

Properties

NameLabelTypeDescriptionRequired
formatFormatSTRING
Options SIMPLE, ADVANCED
Format of providing the prompt to the model.true
userPromptPromptSTRINGUser prompt to the model.true
systemPromptSystem PromptSTRINGSystem prompt to the model.false
attachmentsAttachmentsARRAY
Items [FILE_ENTRY]
Only text and image files are supported. Also, only certain models supports images. Please check the documentation.false
messagesMessagesARRAY
Items [{STRING(role), STRING(content), [FILE_ENTRY](attachments)}]
A list of messages comprising the conversation so far.true
responseResponseOBJECT
Properties {STRING(responseFormat), STRING(responseSchema)}
The response from the API.true

Example JSON Structure

{
  "label" : "Chat (stream)",
  "name" : "streamChat",
  "parameters" : {
    "format" : "",
    "userPrompt" : "",
    "systemPrompt" : "",
    "attachments" : [ {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    } ],
    "messages" : [ {
      "role" : "",
      "content" : "",
      "attachments" : [ {
        "extension" : "",
        "mimeType" : "",
        "name" : "",
        "url" : ""
      } ]
    } ],
    "response" : {
      "responseFormat" : "",
      "responseSchema" : ""
    }
  },
  "type" : "aiAgent/v1/streamChat"
}

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

Realtime Chat

Name: realtimeChat

Streaming LLM turn handler. Consumes finalized user turns from the inbound WebSocket and emits assistant tokens to the outbound channel, supporting tool calls and conversation memory. Designed for voice pipelines where this action sits between an STT and a TTS task.

Properties

NameLabelTypeDescriptionRequired
modelModelSTRINGModel name override for the cluster element. If omitted, the model cluster element's default is used.false
systemPromptSystem PromptSTRINGThe system prompt that defines the agent's behavior and personality.false
threadIdThread IDSTRINGChat memory thread id. Defaults to the call's ${callSid} when omitted (referenced via the embedded sub-workflow's inputs).false
maxTokensMax TokensINTEGERMaximum tokens per assistant response.false
temperatureTemperatureNUMBERSampling temperature for the assistant response.false

Example JSON Structure

{
  "label" : "Realtime Chat",
  "name" : "realtimeChat",
  "parameters" : {
    "model" : "",
    "systemPrompt" : "",
    "threadId" : "",
    "maxTokens" : 1,
    "temperature" : 0.0
  },
  "type" : "aiAgent/v1/realtimeChat"
}

Output

This action does not produce any output.

How is this guide?

Last updated on

On this page