m4trix provides full TypeScript inference from event schemas through agent logic to HTTP responses.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.
Event Inference
When you define events withAgentNetworkEvent.of(), the payload type is inferred from the Effect schema:
Agent Logic Inference
In.logic(), triggerEvent is a union of all listensTo event envelopes:
Emit Typing
Theemit() function only accepts events declared in .emits(). TypeScript will error if you emit an undeclared event or wrong payload shape.
Channel Names
Channel names use a branded type (ChannelName) and must be kebab-case. This is enforced at runtime.
Effect Integration
m4trix uses Effect for schema validation and concurrency. The event plane runs inside an Effect scope. For advanced use, you can compose with Effect’sEffect type and use .makeEffect() / .makeBoundEffect() for event creation.