Documentation Index
Fetch the complete documentation index at: https://docs.m4trix.dev/llms.txt
Use this file to discover all available pages before exploring further.
Streaming
m4trix uses Server-Sent Events (SSE) for streaming responses to clients. When an agent emits events to a channel with anhttpStream() sink, those events are streamed as SSE to the browser.
SSE Format
Streaming from Agents
Emit multiple events during an LLM stream:Sinks
Sinks determine how events leave a channel:sink.httpStream()— Streams events as SSE to HTTP clientssink.kafka({ topic })— Publishes events to a Kafka topic
Adapters
Adapters expose the network as an HTTP API:- NextEndpoint — Next.js App Router (
GET/POSThandlers) - ExpressEndpoint — Express.js route handlers