# Interface MessagePayload

Payload for message events.

interface MessagePayload {
type: "message";
direction: "sent" | "received";
targetAgentId?: string;
sourceAgentId?: string;
messageType: string;
contentPreview?: string;
}

- Defined in packages/nexus-agents/src/observability/swarm-observer-payloads.ts:37

##### Index

### Properties

type
direction
targetAgentId?
sourceAgentId?
messageType
contentPreview?

## Properties

### `Readonly` type

type: "message"

- Defined in packages/nexus-agents/src/observability/swarm-observer-payloads.ts:38

### `Readonly` direction

direction: "sent" | "received"

- Defined in packages/nexus-agents/src/observability/swarm-observer-payloads.ts:39

### `Optional` `Readonly` targetAgentId

targetAgentId?: string

- Defined in packages/nexus-agents/src/observability/swarm-observer-payloads.ts:40

### `Optional` `Readonly` sourceAgentId

sourceAgentId?: string

- Defined in packages/nexus-agents/src/observability/swarm-observer-payloads.ts:41

### `Readonly` messageType

messageType: string

- Defined in packages/nexus-agents/src/observability/swarm-observer-payloads.ts:42

### `Optional` `Readonly` contentPreview

contentPreview?: string

Truncated preview of message content

- Defined in packages/nexus-agents/src/observability/swarm-observer-payloads.ts:44