Trigger a chat run (fire-and-forget)
Trigger a chat run for the specified session.
The run executes as a background task. Events produced during the
run are published to the message bus and delivered to any active
GET /sessions/{session_id}/stream SSE subscriber. The caller
does not receive events from this endpoint’s response body.
Accepts the same input payloads as before:
Msg/list[Msg]: new user message(s).UserConfirmResultEvent/ExternalExecutionResultEvent: resume a paused tool call (human-in-the-loop).None: continue from current state.
Args:
request (ChatRequest):
JSON body with agent_id, session_id, and input.
user_id (str):
Injected user id.
chat_service (ChatService):
Injected application-wide chat service.
Returns:
ChatTriggerResponse:
Confirms the run was scheduled.
Headers
Caller's user ID. Temporary header-based identity; will be replaced by JWT auth.
Body
Request body for the chat endpoint.
Agent ID for the chat endpoint.
The session to send the message to.
The message class in AgentScope, responsible for information storage and transmission among different agents.
- Msg · object
- Msg · object[]
- UserConfirmResultEvent · object
- ExternalExecutionResultEvent · object
Response
Successful Response
Response body for the fire-and-forget chat trigger.
Confirms that the chat run was scheduled. Events produced by the run arrive separately via the session's SSE stream endpoint.