Skip to main content
Every agent yields a stream of unified Event objects. All events share the same Event class and are distinguished by their type field using the EventType enum.

EventType values

Convenience properties

Key methods

Checking event types

Use the EventType enum and convenience methods instead of isinstance checks:

Metadata conventions

Events use the metadata dict for additional context. Common keys:

EventActions

Events carry EventActions for side-effects:

Event Filters

The orxhestra.events.filters module provides reusable functions for preparing session events before they are sent to the LLM. These are used internally by LlmAgent and available for custom agents.

should_include_event(event)

Returns True if the event should be included in LLM context. Filters out:
  • Partial (streaming) events
  • Lifecycle events (AGENT_START, AGENT_END)
  • Error-only metadata events
  • Scratchpad notes
  • Empty AGENT_MESSAGE events (no text, data, or tool calls)

apply_compaction(events)

Replaces raw events with compaction summaries where applicable. When events carry an EventActions.compaction entry, all raw events within that timestamp range are replaced by a single synthetic event containing the summary.
Both functions are also re-exported from orxhestra.events:

LlmResponse

AGENT_MESSAGE events may carry an llm_response: LlmResponse field with token usage and model version:

Signed Events

Agents with a signing_key automatically sign every event they emit using Ed25519. This provides cryptographic proof of which agent produced each event.
Requires orxhestra[auth] (pip install orxhestra[auth]).