Events are typed messages that flow through the system. Each event has a name, a payload schema (validated at runtime via Effect Schema), and automatically-attached metadata (run ID, timestamps, correlation IDs).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.
Defining Events
UseAgentNetworkEvent.of() to define an event with a name and a payload schema:
Event Envelope
Every event flowing through the system is wrapped in an envelope:meta fields are automatically managed by the runtime. You only need to provide the name and payload when emitting events from agents.
API Summary
| Method | Description |
|---|---|
AgentNetworkEvent.of(name, schema) | Creates an event definition |
.make(payload) | Creates an unbound event for emit; meta injected at runtime |
.makeBound(meta, payload) | Creates full envelope for tests or manual triggers |
.makeEffect(payload) | Effect version of make |
.makeBoundEffect(meta, payload) | Effect version of makeBound |
.decode(unknown) | Decodes unknown value into validated envelope |
.is(value) | Type guard for event shape |