Skip to navigation

Invoke

Beta

Call the general Athena agent synchronously.

Call the agent with the messages list, wait for the agent to complete, and return the result.

A human message’s additional_kwargs.metadata keeps the names the caller sets for itself. Names Athena reserves there for what it writes itself are not taken from the request; source is one of them only where it holds voice, text or voice_delegation. A message the thread already holds keeps the thread’s value for each, and on any other human message none is taken from the request.

Authentication

X-API-KEYstring
API Key authentication via header

Headers

X-Athena-Session-CredentialstringOptional

Request

This endpoint expects an object.
configobjectRequired
Configurable fields for the agent.
messageslist of objectsRequired

The messages to send to the agent. Each message should be a string (for text inputs) or a list of multimodal content parts.

channelstringOptionalDefaults to api
The channel through which the request is being made.
thread_idstring or nullOptional

Optional thread ID for conversation persistence. If not provided, a new thread will be created. A new thread’s ID is lower-case letters, digits, _ and -, begins with a letter or a digit, is at most 128 characters long and does not begin with asset_.

Response

Successful Response
messageslist of objects
structured_outputmap from strings to any or nullOptional

The agent’s final answer as an object matching config.structured_output. Null when no schema was requested.

Errors

422
Unprocessable Entity Error