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

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

> This is a method of the [**RuntimeRegistryProtocol**](../classes/RuntimeRegistryProtocol) class in the [**registry**](../modules/registry) 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

<ParamField query="runtime_id" type="str" required={true}>
  Unique runtime identifier (e.g., "claude-code")
</ParamField>

<ParamField query="factory_or_instance" type="Any" required={true}>
  Runtime factory function or instance \*\*metadata: Additional metadata for the runtime
</ParamField>

### Exceptions

<AccordionGroup>
  <Accordion title="ValueError">
    If runtime\_id is already registered
  </Accordion>

  <Accordion title="TypeError">
    If factory\_or\_instance is not callable or valid instance
  </Accordion>
</AccordionGroup>

## 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 title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/runtime/registry.py#L46">
  `praisonaiagents/runtime/registry.py` at line 46
</Card>
