Skip to content

OSSS.ai.events.types

OSSS.ai.events.types

Enhanced Event Types with Multi-Axis Agent Classification.

This module defines the event types for the OSSS event-driven architecture, including rich metadata and multi-axis agent classification for intelligent routing and observability.

EventCategory

Bases: Enum

Event category taxonomy for distinguishing event sources.

This enum differentiates between orchestration-level events (DAG execution) and execution-level events (individual agent internals).

EventType

Bases: Enum

Comprehensive event type taxonomy for observability.

WorkflowEvent

Bases: BaseModel

Enhanced event model with multi-axis agent classification.

Provides comprehensive event tracking with correlation context, agent metadata, and task classification for intelligent routing and service extraction preparation.

validate_event_id(v) classmethod

Validate event ID format.

validate_capabilities(v) classmethod

Validate capabilities list.

validate_error_consistency()

Validate error field consistency.

to_dict()

Serialize event for storage and transmission - backward compatibility.

from_dict(data) classmethod

Deserialize event from storage - backward compatibility.

WorkflowStartedEvent

Bases: WorkflowEvent

Workflow execution started event with enhanced metadata.

model_post_init(__context)

Populate data after initialization.

WorkflowCompletedEvent

Bases: WorkflowEvent

Workflow execution completed event with enhanced metadata.

validate_agent_outputs(v) classmethod

Validate agent outputs structure.

Supports both structured outputs (dict) and legacy string outputs for backward compatibility.

model_post_init(__context)

Populate data after initialization.

AgentExecutionStartedEvent

Bases: WorkflowEvent

Agent execution started event with multi-axis classification.

model_post_init(__context)

Populate data after initialization.

AgentExecutionCompletedEvent

Bases: WorkflowEvent

Agent execution completed event with performance metrics.

model_post_init(__context)

Populate data after initialization.

RoutingDecisionEvent

Bases: WorkflowEvent

Routing decision event for analytics and optimization.

validate_selected_agents(v) classmethod

Validate selected agents list.

model_post_init(__context)

Populate data after initialization.

EventFilters

Bases: BaseModel

Filters for querying events with comprehensive validation.

validate_time_range()

Validate that start_time is before end_time.

matches(event)

Check if an event matches these filters.

EventStatistics

Bases: BaseModel

Statistics about processed events with validation.

validate_event_counts(v) classmethod

Validate that all counts are non-negative.

update_with_event(event)

Update statistics with a new event.