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

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**protocols**](../modules/protocols) 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

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

### Returns

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

### Exceptions

<AccordionGroup>
  <Accordion title="ValueError">
    If `name` is already registered and `replace` is False.
  </Accordion>
</AccordionGroup>

## Uses

* `ValueError`
* `GatewayMethodDescriptor`

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Gateway Feature" icon="tower-broadcast" href="/docs/docs/features/gateway" />
</CardGroup>
