chat

Chat

post/v1/agent_sessions/{session_id}/chat

Path parameters

session_idstring required

Request body

headlessboolean required

Whether a headless client (terminal or scripted) is driving the turn, as opposed to the browser assistant. Selects the agent configuration the turn runs on.

editPermission'manual' | 'bypass'
requestedSkillsstring[]

Skills the user explicitly requested via the prompt's slash-command affordance. The server force-loads each available skill by injecting a synthetic load_skill tool call/result at the tail of the message history. Unknown or context-unavailable names are ignored.

trigger'submit-message'
idstring required
lastMessageIdstring nullable

The id of the last transcript message the client has rendered, used for optimistic concurrency. Omit when the session has no messages; required (and validated against the persisted transcript) once it does. On mismatch the server rejects the send with HTTP 409 and code agent_session_messages_stale — the client should refetch the session before retrying.

recordLocalTracesboolean
exportRemoteTracesboolean
instrumentUserIdboolean

When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference user.id span attribute on all traced work for this request.

Response

Successful Response

{"stackTrail":"paths:/v1/agent_sessions/{session_id}/chat:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes

Changed in 4 of the 70 revisions of this API.1117

    • added the new optional request property message/anyOf[subschema #1: PhoenixUIMessage]/parts/items/anyOf[subschema #2: ReasoningUIPart]/id

      new-optional-request-property

  • e4bf71c6ae16113See the full diff
    • removed ProjectContext TraceContext SessionContext PromptContext PromptVersionContext AgentSpanContext PlaygroundContext CodeEvaluatorContext LlmEvaluatorContext DatasetContext from the contexts/items/ request property oneOf list

      request-property-one-of-removed

    • added the new optional request property message/anyOf[subschema #1: PhoenixUIMessage]/metadata/anyOf[subschema #1: MessageMetadata]/phoenix/anyOf[subschema #1]/oneOf[subschema #2: PhoenixUserMessageMetadata]/editPermission

      new-optional-request-property

    • added the new optional request property message/anyOf[subschema #1: PhoenixUIMessage]/metadata/anyOf[subschema #1: MessageMetadata]/phoenix/anyOf[subschema #1]/oneOf[subschema #2: PhoenixUserMessageMetadata]/uiContexts

      new-optional-request-property

    • mapped value for discriminator key code_evaluator changed from CodeEvaluatorContext to CodeEvaluatorUIContext for contexts/items/ request property

      request-property-discriminator-mapping-changed

    • mapped value for discriminator key dataset changed from DatasetContext to DatasetUIContext for contexts/items/ request property

      request-property-discriminator-mapping-changed

    • mapped value for discriminator key llm_evaluator changed from LlmEvaluatorContext to LlmEvaluatorUIContext for contexts/items/ request property

      request-property-discriminator-mapping-changed

    • mapped value for discriminator key playground changed from PlaygroundContext to PlaygroundUIContext for contexts/items/ request property

      request-property-discriminator-mapping-changed

    • mapped value for discriminator key project changed from ProjectContext to ProjectUIContext for contexts/items/ request property

      request-property-discriminator-mapping-changed

    • mapped value for discriminator key prompt changed from PromptContext to PromptUIContext for contexts/items/ request property

      request-property-discriminator-mapping-changed

    • mapped value for discriminator key prompt_version changed from PromptVersionContext to PromptVersionUIContext for contexts/items/ request property

      request-property-discriminator-mapping-changed

    • mapped value for discriminator key session changed from SessionContext to SessionUIContext for contexts/items/ request property

      request-property-discriminator-mapping-changed

    • mapped value for discriminator key span changed from AgentSpanContext to SpanUIContext for contexts/items/ request property

      request-property-discriminator-mapping-changed

    • mapped value for discriminator key trace changed from TraceContext to TraceUIContext for contexts/items/ request property

      request-property-discriminator-mapping-changed

    • added ProjectUIContext TraceUIContext SessionUIContext PromptUIContext PromptVersionUIContext SpanUIContext PlaygroundUIContext CodeEvaluatorUIContext LlmEvaluatorUIContext DatasetUIContext to the contexts/items/ request property oneOf list

      request-property-one-of-added

    This revision also has 15 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 6107b5235c7412See the full diff
    • added the new agent_session_tool_approvals_conflict enum value to the code response property for the response status 409

      response-property-enum-value-added

    • added the new optional request property toolApprovals

      new-optional-request-property

    • request property contexts/items/oneOf[subschema #12: GraphQLContext]/ deprecated

      request-property-deprecated

    • endpoint added

      endpoint-added

    This revision also has 16 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog