Agent Query

Execute an agent-style query using the :class:MorphikAgent.

Args: request: The query payload containing the natural language question and optional chat_id. auth: Authentication context used to enforce limits and access control. redis: Redis connection for chat history storage.

Returns: A dictionary with the agent's full response.

post/agent

Headers

authorizationstring

Request body

querystring required

Natural language query for the Morphik agent

chat_idstring nullable

Optional chat session ID for persisting conversation history

display_mode'formatted' | 'raw'

Display mode for images: 'formatted' (default) creates bounding boxes with Gemini, 'raw' returns uncropped images

Response

Successful Response

object required

Changes