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

# resolve • AI Agent SDK

> Turn-time runtime resolution API for handoffs and sub-agents.

# resolve

AI Agent

Turn-time runtime resolution API for handoffs and sub-agents.

This module addresses the issue where handoffs and sub-agents inherit
construction-time runtime pins from the parent agent, causing wrong
harness execution when the delegate uses a different model\_ref or provider.

The solution provides turn-time resolution that re-resolves runtime
from (agent\_id, model\_ref) at each handoff/sub-agent invocation.

## Import

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents.runtime import resolve
```

## Classes

> [card] [RuntimeProtocol](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/RuntimeProtocol.md)
>
> Protocol for agent runtime implementations.

> [card] [AgentRuntimeProtocol](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/AgentRuntimeProtocol.md)
>
> Extended protocol for agent-specific runtime features.

> [card] [SessionContext](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/SessionContext.md)
>
> Context for runtime resolution within a session.

> [card] [RuntimeResolver](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/RuntimeResolver.md)
>
> Abstract base class for runtime resolution strategies.

> [card] [DefaultRuntimeResolver](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/DefaultRuntimeResolver.md)
>
> Default runtime resolver that creates appropriate runtime instances.

> [card] [LLMRuntimeWrapper](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/LLMRuntimeWrapper.md)
>
> Wrapper around existing LLM class to provide runtime protocol.

> [card] [FallbackRuntime](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/FallbackRuntime.md)
>
> Fallback runtime implementation that raises errors instead of returning stubs.

## Functions

> [card] [set\_global\_resolver()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/set_global_resolver.md)
>
> Set the global runtime resolver.

> [card] [get\_global\_resolver()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/get_global_resolver.md)
>
> Get the global runtime resolver, creating default if needed.

> [card] [resolve\_runtime()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/resolve_runtime.md)
>
> Resolve runtime for the given agent and model at turn-time.

> [card] [get\_runtime\_cache()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/get_runtime_cache.md)
>
> Get a copy of the current runtime cache (for debugging/testing).

> [card] [clear\_runtime\_cache()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/clear_runtime_cache.md)
>
> Clear runtime cache for a specific session or all sessions.


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