> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# receive • Rust AI Agent SDK

> receive: Receive an event from the client.

# receive

<div className="flex items-center gap-2">
  <Badge color="blue">Async</Badge>
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**GatewayClientProtocol**](../classes/GatewayClientProtocol) class in the [**gateway**](../modules/gateway) module.

Receive an event from the client.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async def receive(&self) -> Result<GatewayEvent>
```

### Returns

<ResponseField name="Returns" type="Result<GatewayEvent>">
  The result of the operation.
</ResponseField>
