MentorAgent Docs
Menu

Questa pagina non è ancora tradotta in italiano: qui la trovi in inglese.

ReferencePackage: Novior.MentorAgent.Server

MentorSseEndpoint class

The MentorSseEndpoint class of Novior.MentorAgent.Server.Endpoints: Server-Sent Events (SSE) endpoint for clients that prefer HTTP streaming over SignalR…

On this page

Server-Sent Events (SSE) endpoint for clients that prefer HTTP streaming over SignalR (React, Vue, curl, Axios, etc.). GET /mentor/chat?message=hello — text-only POST /mentor/chat { "message": "...", — text + image attachments (roadmap #13); "attachments": [ … ] } a base64 image never fits in a query string. Response format: text/event-stream data: {"type":"chunk","text":"Hello","aiGenerated":true} data: {"type":"cards","cards":[…]} data: {"type":"navigation","url":"/orders"} data: {"type":"confirmationRequired","actionId":"…","tool":"…","message":"…"} data: {"type":"completed","aiGenerated":true} data: {"type":"error","message":"..."}

Every frame beyond chunk/completed/error is additive: a client that does not know a type ignores it and still receives the whole answer as text. That is what lets the protocol grow without breaking the three-frame clients the README has always shown.

Namespace: Novior.MentorAgent.Server.Endpoints. Package: Novior.MentorAgent.Server.

public static class MentorSseEndpoint

Terminal
dotnet add package Novior.MentorAgent.Server

public static Task HandleAsync(HttpContext ctx)

GET /mentor/chat?message=…&language=… — text-only streaming.

public static Task HandlePostAsync(HttpContext ctx)

POST /mentor/chat — streaming with optional image attachments (#13).