Channels are named conduits for events. They route events between agents and connect to external systems via sinks.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.
Creating Channels
'main', 'client-output', 'processing-queue'). This is enforced at runtime with a branded type.
Channel Events
You can optionally declare which events a channel carries:Sinks
Sinks determine how events leave a channel. They are the bridge between the internal event plane and external systems.HTTP Stream Sink
Routes events to HTTP SSE streams. Required forexpose() to work.
Kafka Sink
Routes events to a Kafka topic.Multiple Sinks
A single channel can have multiple sinks:Event Flow
- A start event is published to the main channel (either programmatically or via
expose()) - Agents subscribed to that channel receive the event (filtered by their
listensTodeclarations) - Agent logic runs and emits new events
- Emitted events are published to the agent’s publishTo channels
- Other agents on those channels pick up the events, continuing the chain
- Events on channels with an HTTP stream sink are streamed to the client