Getting Started
The goal of this chapter is to take you from āknowing nothingā to ārunning the demo and seeing AI responsesā, and to clarify what your backend needs to implement.
Required pieces (otherwise it will error or be unavailable):
- At least one AI model configuration:
ai.models.length > 0. Umo Editor Next usesai.models[0]as the default model. - An accessible backend endpoint (SSE recommended):
ai.models[].endpoint. The frontend will call this endpoint. You can test first by pointing to the default SSE demo endpoints provided by Umo Editor Server:/mock/sse/normalor/mock/sse/agui. See: API list.
Minimal configuration
The minimum working configuration:
const options = {
ai: {
models: [
{
value: 'default',
label: { zh_CN: 'é»č®¤ęØ”å', en_US: 'Default Model' },
avatar: '/images/ai.svg',
protocol: 'default', // or 'agui'
endpoint: 'http://127.0.0.1:1235/mock/sse/normal', // SSE demo endpoint from Umo Editor Server
stream: true,
reasoning: true,
},
],
chat: { enabled: true }, // Sidebar chat
assistant: { enabled: true }, // Document bubble assistant
},
}Choosing a protocol
For protocol details, see Supported protocols. Practical guidance:
- If your backend only needs to āreturn model output via SSEā and you want a custom data shape: use
protocol: 'default'. - If you already have (or plan to implement) AG-UI (with tool calls, status events, etc.): use
protocol: 'agui'.
When protocol: 'agui', the frontend will not use custom parsing via ai.callbacks.onMessage. Instead it uses the built-in AG-UI parser and renderer. Your backend must output an AG-UI event stream (see Supported protocols).
Verify
You can simply:
- Open the āDocument Assistantā entry (bubble menu) or the chat entry at the bottom-right
- Type anything and send
- Check whether you can see an assistant reply
If there is no output, start with Troubleshooting.