# ProtocolEvent

> **Class** in `langgraph`

📖 [View in docs](https://reference.langchain.com/python/langgraph/stream/_types/ProtocolEvent)

A protocol event emitted by the streaming infrastructure.

Wraps a raw stream part (values, messages, custom, etc.) in a uniform
envelope with a monotonic sequence number assigned by the root StreamMux.
Consumers that need a total order across root events should use `seq`, not
`params.timestamp` (which is wall-clock and not monotonic).

## Signature

```python
ProtocolEvent()
```

## Extends

- `TypedDict`

## Constructors

```python
__init__(
    type: Literal['event'],
    eventId: NotRequired[str],
    seq: NotRequired[int],
    method: str,
    params: _ProtocolEventParams,
)
```

| Name | Type |
|------|------|
| `type` | `Literal['event']` |
| `eventId` | `NotRequired[str]` |
| `seq` | `NotRequired[int]` |
| `method` | `str` |
| `params` | `_ProtocolEventParams` |


## Properties

- `type`
- `eventId`
- `seq`
- `method`
- `params`

---

[View source on GitHub](https://github.com/langchain-ai/langgraph/blob/aa322c13cd5f16a3f6254a931a4104e412cd687c/libs/langgraph/langgraph/stream/_types.py#L28)