# MentorSseEndpoint class

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

- URL: https://docs.mentoragent.net/api/novior-mentoragent-server-endpoints/mentorsseendpoint
- Verified with: MentorAgent 1.2.0
- Last updated: 2026-10-27
- Packages: Novior.MentorAgent.Server

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.

## Definition

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

`public static class MentorSseEndpoint`

```shell
dotnet add package Novior.MentorAgent.Server
```

## Methods

### `HandleAsync`

`public static Task HandleAsync(HttpContext ctx)`

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

### `HandlePostAsync`

`public static Task HandlePostAsync(HttpContext ctx)`

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

---

- Previous: [MentorServerUserContext class](https://docs.mentoragent.net/api/novior-mentoragent-server-auth/mentorserverusercontext.md)
- Next: [MentorSseEndpoint.ChatRequest record](https://docs.mentoragent.net/api/novior-mentoragent-server-endpoints/mentorsseendpoint-chatrequest.md)
