> ## 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 • AI Agent SDK

> register: Register a runtime with the registry.

# register

Method

> This is a method of the [**RuntimeRegistryProtocol**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/RuntimeRegistryProtocol.md) class in the [**registry**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/registry.md) module.

Register a runtime with the registry.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def register(runtime_id: str, factory_or_instance: Any) -> None
```

## Parameters

**runtime\_id** `str` *required*

Unique runtime identifier (e.g., "claude-code")

**factory\_or\_instance** `Any` *required*

Runtime factory function or instance \*\*metadata: Additional metadata for the runtime

### Exceptions

> [accordion] ValueError
>
> If runtime\_id is already registered

> [accordion] TypeError
>
> If factory\_or\_instance is not callable or valid instance

## Used By

* [`HookRegistry.register_function`](../functions/HookRegistry-register_function)
* [`HookRegistry.register_command`](../functions/HookRegistry-register_command)
* [`register_middleware`](../functions/register_middleware)
* [`register_runtime`](../functions/register_runtime)
* [`tool`](../functions/tool)

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/runtime/registry.py#L46)
>
> `praisonaiagents/runtime/registry.py` at line 46


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