agentic_fabric.runners.registry

Lazy runtime registry for optional agent frameworks.

Module Contents

Classes

RuntimeSpec

Metadata required to discover and instantiate one runtime.

Functions

register_runtime

Register or replace one runtime spec.

runtime_specs

Return registered runtime specs in priority order.

runtime_names

Return registered runtime names in priority order.

get_runtime_spec

Return a registered runtime spec.

clear_runtime_cache

Clear cached optional-runtime availability.

is_runtime_available

Return whether a runtime import target is importable.

available_runtimes

Return available runtime names in priority order.

runtime_info

Return runtime metadata with current availability.

require_runtime

Return a runtime spec or raise install guidance if unavailable.

load_runner

Instantiate a runner from the lazy registry.

install_command

Return the install command for one registered runtime.

API

class agentic_fabric.runners.registry.RuntimeSpec

Metadata required to discover and instantiate one runtime.

name: str = None
import_name: str = None
runner_module: str = None
runner_class: str = None
install: str = None
extra: str | None = None
description: str = <Multiline-String>
as_dict(*, available: bool) dict[str, Any]

Return serializable runtime metadata.

exception agentic_fabric.runners.registry.RuntimeUnavailableError(runtime: str, install: str)

Bases: RuntimeError

Raised when an optional runtime cannot be selected.

Initialization

Initialize the error with runtime-specific install guidance.

add_note()
class args
with_traceback()
agentic_fabric.runners.registry.register_runtime(spec: agentic_fabric.runners.registry.RuntimeSpec) None

Register or replace one runtime spec.

agentic_fabric.runners.registry.runtime_specs() types.MappingProxyType[str, agentic_fabric.runners.registry.RuntimeSpec]

Return registered runtime specs in priority order.

agentic_fabric.runners.registry.runtime_names() list[str]

Return registered runtime names in priority order.

agentic_fabric.runners.registry.get_runtime_spec(runtime: str) agentic_fabric.runners.registry.RuntimeSpec

Return a registered runtime spec.

agentic_fabric.runners.registry.clear_runtime_cache() None

Clear cached optional-runtime availability.

agentic_fabric.runners.registry.is_runtime_available(runtime: str) bool

Return whether a runtime import target is importable.

agentic_fabric.runners.registry.available_runtimes() list[str]

Return available runtime names in priority order.

agentic_fabric.runners.registry.runtime_info(runtime: str | None = None) list[dict[str, Any]] | dict[str, Any]

Return runtime metadata with current availability.

agentic_fabric.runners.registry.require_runtime(runtime: str) agentic_fabric.runners.registry.RuntimeSpec

Return a runtime spec or raise install guidance if unavailable.

agentic_fabric.runners.registry.load_runner(runtime: str) Any

Instantiate a runner from the lazy registry.

agentic_fabric.runners.registry.install_command(runtime: str) str

Return the install command for one registered runtime.