Start the server synchronously.
Once running, the host exposes POST /invocations. The default
request body is:
.. code-block:: json
{"message": "Hello!", "stream": false}
message is either user text or a list containing a structured HITL
response item. stream is optional and defaults to false.
Non-streaming requests return JSON:
.. code-block:: json
{"response": "Assistant text"}
A pending LangGraph interrupt adds Responses-style function_call
and mcp_approval_request items under output. Resume it by
sending the matching function_call_output or
mcp_approval_response as the next request's message list.
Streaming requests return text/event-stream with token payloads:
.. code-block:: text
data: {"token": "..."}
event: done
data: {}
With options.resilient_background=True, a request containing
{"message": "Hello!", "background": true} returns 202.
Retrieve or cancel it through GET /invocations/{invocation_id}
and POST /invocations/{invocation_id}/cancel respectively.
Multi-turn callers should reuse the x-agent-session-id response
header as the next request's agent_session_id query parameter.
Network interface to bind. Defaults to "0.0.0.0".
Port to bind. Defaults to PORT env var or 8088.