Chat with agent
/agent/chatSend a message to an agent and receive a JSON response.
Header parameters
X-Phenoml-On-Behalf-OfstringoptionalOptional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity. Must be in the format: Patient/{uuid} or Practitioner/{uuid}
X-Phenoml-Fhir-ProviderstringoptionalOptional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}. Multiple FHIR provider integrations can be provided as comma-separated values.
Body parameters
messagestringrequiredThe message to send to the agent
contextstringoptionalOptional context for the conversation
session_idstringoptionalOptional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict.
agent_idstringrequiredThe ID of the agent to chat with
enhanced_reasoningbooleanoptionaldefault falseEnable enhanced reasoning capabilities. Increases latency but improves response quality and reliability.
Chat response received successfully
Response fields
responsestringoptionalAgent's response
successbooleanoptionalmessagestringoptionalStatus message
session_idstringoptionalChat session ID