register • AI Agent SDK

register: Register a runtime with the registry.

register

Method

</div>

This is a method of the RuntimeRegistryProtocol class in the registry module.

Register a runtime with the registry.

Signature

python
def register(runtime_id: str, factory_or_instance: Any) -> None

Parameters

ParamField str

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

ParamField Any

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

Exceptions

ValueError

If runtime_id is already registered

TypeError

If factory_or_instance is not callable or valid instance

Used By

Source

View on GitHub

praisonaiagents/runtime/registry.py at line 46