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 theEventType enum and convenience methods instead of isinstance checks:
Metadata conventions
Events use themetadata dict for additional context. Common keys:
EventActions
Events carryEventActions for side-effects:
Event Filters
Theorxhestra.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_MESSAGEevents (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.
orxhestra.events:
LlmResponse
AGENT_MESSAGE events may carry an llm_response: LlmResponse field with token usage and model version:
Signed Events
Agents with asigning_key automatically sign every event they emit using Ed25519. This provides cryptographic proof of which agent produced each event.
orxhestra[auth] (pip install orxhestra[auth]).