# Interface AgentEvent

Core event emitted by agents for observation.

interface AgentEvent {
eventId: string;
timestamp: string;
agentId: string;
eventType: EventType;
traceId: string;
spanId: string;
parentSpanId?: string;
payload: EventPayload;
durationMs?: number;
}

- Defined in packages/nexus-agents/src/observability/swarm-observer-types.ts:58

##### Index

### Properties

eventId
timestamp
agentId
eventType
traceId
spanId
parentSpanId?
payload
durationMs?

## Properties

### `Readonly` eventId

eventId: string

Event ID for deduplication

- Defined in packages/nexus-agents/src/observability/swarm-observer-types.ts:60

### `Readonly` timestamp

timestamp: string

ISO timestamp when event occurred

- Defined in packages/nexus-agents/src/observability/swarm-observer-types.ts:62

### `Readonly` agentId

agentId: string

Agent that emitted the event

- Defined in packages/nexus-agents/src/observability/swarm-observer-types.ts:64

### `Readonly` eventType

eventType: EventType

Type of event

- Defined in packages/nexus-agents/src/observability/swarm-observer-types.ts:66

### `Readonly` traceId

traceId: string

OpenTelemetry trace ID for correlation

- Defined in packages/nexus-agents/src/observability/swarm-observer-types.ts:68

### `Readonly` spanId

spanId: string

OpenTelemetry span ID

- Defined in packages/nexus-agents/src/observability/swarm-observer-types.ts:70

### `Optional` `Readonly` parentSpanId

parentSpanId?: string

Parent span ID for hierarchical tracing

- Defined in packages/nexus-agents/src/observability/swarm-observer-types.ts:72

### `Readonly` payload

payload: EventPayload

Event-specific payload

- Defined in packages/nexus-agents/src/observability/swarm-observer-types.ts:74

### `Optional` `Readonly` durationMs

durationMs?: number

Duration in milliseconds (for completed events)

- Defined in packages/nexus-agents/src/observability/swarm-observer-types.ts:76