Agent Invoke API
Endpoint: POST /api/agent/{agent_uuid}/invoke/
Description
This endpoint allows users to invoke an agent to perform specific actions based on the input text and context provided.
Parameters
- Path Parameter:
-
agent_uuid(string, required): A unique identifier for the agent you wish to invoke. -
Request Body (application/json, required):
text(string): The input text to be processed by the agent.payload(object): Additional context information to assist the agent in generating responses. This can be parsed by the agent to tailor responses accordingly.
Example Request Body 1:
Example Request Body 2 (New Example with Payload Data):
Agent's prompt:
You are {name} and you are {age} years old. Tell that to the user. API call with payload
Response
- Status Code: 200 OK
- Content-Type: application/json
Response Body:
answer(string): The agent's response to the input text.duration(string): The time taken to process the request.token(string): A token generated for the session or action.
Example Response Body 1:
Example Response Body 2: