Skip to main content
AgentNetworkEvent defines typed events with schema validation via Effect Schema.

Creating Events

Methods

.make(payload)

Creates an unbound event (name + payload) for use with emit. Meta is injected by the runtime when emitted.

.makeBound(meta, payload)

Creates a full envelope for tests or manual triggers. Sync, throws on invalid data.

.makeEffect(payload)

Effect version of make. Use in Effect pipelines.

.makeBoundEffect(meta, payload)

Effect version of makeBound.

.decode(unknown)

Decodes an unknown value into a validated event envelope. Useful for parsing incoming requests.

.is(value)

Type guard that checks whether an unknown value matches this event’s shape.

Event Envelope

Every event has:

See Also