> ## 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.

# request • AI Agent SDK

> request: Deliver ``req`` to the session's client and await its reply.

# request

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

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

Deliver `req` to the session's client and await its reply.

Returns the correlated :class:`GatewayServerReply`, or `None` when no
reply arrives within `timeout_s` (the request is then cleared from the
open set so it is not replayed on a later reconnect).

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async def request(req: 'GatewayServerRequest') -> Optional['GatewayServerReply']
```

## Parameters

<ParamField query="req" type="GatewayServerRequest" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="Optional['GatewayServerReply']">
  The result of the operation.
</ResponseField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L3561">
  `praisonaiagents/gateway/protocols.py` at line 3561
</Card>
