Skip to main content
The EventBuilder provides a chainable API for constructing events. Start a builder with client.event(), then chain methods to add data.

Starting a builder

Builder methods

action(name, params)

Define an Action event — use this whenever your agent does something (calls an API, books a seat, sends an email).

outcome(result)

Attach a success outcome to the previously defined action.
outcome() requires action() earlier in the chain. Calling it without action() will throw an error.

observation(type, data, options?)

Define an Observation event — use this when the agent receives external data that isn’t a direct message (price updates, sensor readings, API responses).
The data parameter is stored verbatim — the SDK does not validate payload fields.

context(text, type?)

Define a Context event for claim extraction. Use this for raw text content like conversation messages, documents, or transcripts.

state(variables)

Add environmental state variables to the event context.

goal(text, priority?, progress?)

Attach an active goal. Goals are how Minns Memory Layer groups events into episodes.
Set progress to 1.0 on the final event to mark the episode as complete. This triggers memory formation and strategy extraction.

causedBy(parentId)

Link the event to a parent event, building a causality chain.

build()

Return the raw Event object without submitting it.

send()

Build and submit the event. Returns the server response.

enqueue()

Build and queue the event for background processing. Returns a local receipt immediately.

Full example

Next steps

Memory & strategies

Query memories and learned strategies via the SDK.

Event types reference

See the full specification for every event type variant.