AI Agent Server will be used to communicate with the AI Agent. It will be used to send the request and receive the response from the AI Agent.

Server

Server API example

see in example/custom_agent

ResponseAction

  • ResponseAction.Direct should return โ€œSSE"
  • ResponseAction.TextChunk should return โ€œJSONโ€
  • ResponseAction.WebView should return โ€œHTMLโ€ code

Request Body

same to Chat API

{
  "messages": [
    {
      "role": "user",
      "content": "Hi, I want to book a flight from Hangzhou to Shanghai."
    }
  ]
}