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

# Register Gateway Method • AI Agent SDK

> register_gateway_method: Register (once) the required scope for a gateway method.

# register\_gateway\_method

Function

> This function is defined in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

Register (once) the required scope for a gateway method.

Core methods are registered at import time (see below); plugins that add
new gateway surface should register their descriptors through this same
function so they inherit default-deny semantics.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def register_gateway_method(name: str) -> GatewayMethodDescriptor
```

## Parameters

**name** `str` *required*

No description available.

### Returns

**Returns** `GatewayMethodDescriptor`

The result of the operation.

### Exceptions

> [accordion] ValueError
>
> If `name` is already registered and `replace` is False.

## Uses

* `ValueError`
* `GatewayMethodDescriptor`

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L7795)
>
> `praisonaiagents/gateway/protocols.py` at line 7795

***

## Related Documentation

> [card] [Gateway Feature](https://praison.ai/docs/docs/features/gateway)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.