Stream agent response (v2)
Agentic RAG
Agent Response (Stream)
Streams cited Markdown responses, sourced exclusively from corporate disclosures, as server-sent events in response to natural language queries. This endpoint provides real-time streaming of AI-generated answers, making it ideal for interactive chat interfaces where users can see responses as they’re generated.
Server-Sent Events (SSE) Structure:
data: {"type": "thinking", ...}- Agent’s thinking process with stage informationdata: {"type": "thinking", "role": "assistant", "content": "...", "stage": "search"}
data: {"type": "message", ...}- Response content chunksdata: {"type": "message", "role": "assistant", "content": "..."}
data: {"type": "warning", ...}- Warning when no documents founddata: {"type": "warning", "message": "..."}
data: {"type": "sources", ...}- Source document informationdata: {"type": "sources", "content": {"#ref_id": {"content": "...", "pageNumber": 123, "excerpt": "...", "documentMetadata": {"id": "...", "title": "...", "documentCategory": "...", "formType": "...", "tickers": ["..."], "companyName": "...", "date": "...", "fiscalQuarter": 1, "fiscalYear": 2025}}}}}- Document sources and citationsdata: {"type": "sources", "content": {"#ref_id": {"content": "...", "pageNumber": 123, "excerpt": null, "documentMetadata": {"id": "...", "title": "...", "documentCategory": "...", "formType": "...", "tickers": ["..."], "companyName": "...", "date": "...", "fiscalQuarter": 1, "fiscalYear": 2025}}}}}- Document sources and citations (with null excerpt, often given before agent response)
data: {"type": "done"}- Stream completiondata: {"type": "done"}
This v2 endpoint supports newer document categories in source mappings (e.g., earnings-presentation, investor-event-presentation, shareholder-meeting-circular, etc.). Agent response quality is exactly the same compared to v1.
POST
Stream agent response (v2)
Authorizations
Body
application/json
Response
Stream started successfully