Skip to main content

Reasoning Agent

FastAPI Version: 0.1.0

Endpoints​

Execute Agent​

POST /run-reasoning-agent

Execute the reasoning agent and stream the results.

This endpoint starts a new task for the reasoning agent and returns a streaming response with the agent's output. The task ID is returned in the 'X-Task-ID' header of the response.

Request Body​

FieldTypeDescription
messagesarray of MessageList of messages in the conversation
sessionobjectSession information for the conversation
actionobject or nullOptional action to be performed by the agent (default: )

Responses​

  • 200: Successful Response
  • 422: Validation Error

Cancel Agent​

POST /cancel-reasoning-agent/{task_id}

Cancel a running reasoning agent task.

This endpoint attempts to cancel a task identified by the given task_id. It sets the task status to 'cancelled' in Redis.

Parameters​

NameInTypeRequiredDescription
task_idpathstringYesThe ID of the task to cancel

Responses​

  • 200: Successful Response
  • 422: Validation Error

Schemas​

AgentRequest​

FieldTypeRequiredDescription
messagesarray of MessageYesList of messages in the conversation
sessionobjectNoSession information for the conversation
actionobject or nullNoOptional action to be performed by the agent (default: )

CancelResponse​

FieldTypeRequired
detailstringYes

Message​

FieldTypeRequired
rolestringYes
contentstringYes

HTTPValidationError​

FieldTypeDescription
detailarray of ValidationError

ValidationError​

FieldTypeDescription
locarray of (string or integer)Location
msgstringMessage
typestringError Type