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

<Badge color="blue">AI Agent</Badge>

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

<CardGroup cols={2}>
  <Card title="RuntimeProtocol" icon="brackets-curly" href="../classes/RuntimeProtocol">
    Protocol for agent runtime implementations.
  </Card>

  <Card title="AgentRuntimeProtocol" icon="brackets-curly" href="../classes/AgentRuntimeProtocol">
    Extended protocol for agent-specific runtime features.
  </Card>

  <Card title="SessionContext" icon="brackets-curly" href="../classes/SessionContext">
    Context for runtime resolution within a session.
  </Card>

  <Card title="RuntimeResolver" icon="brackets-curly" href="../classes/RuntimeResolver">
    Abstract base class for runtime resolution strategies.
  </Card>

  <Card title="DefaultRuntimeResolver" icon="brackets-curly" href="../classes/DefaultRuntimeResolver">
    Default runtime resolver that creates appropriate runtime instances.
  </Card>

  <Card title="LLMRuntimeWrapper" icon="brackets-curly" href="../classes/LLMRuntimeWrapper">
    Wrapper around existing LLM class to provide runtime protocol.
  </Card>

  <Card title="FallbackRuntime" icon="brackets-curly" href="../classes/FallbackRuntime">
    Fallback runtime implementation that raises errors instead of returning stubs.
  </Card>
</CardGroup>

## Functions

<CardGroup cols={2}>
  <Card title="set_global_resolver()" icon="function" href="../functions/set_global_resolver">
    Set the global runtime resolver.
  </Card>

  <Card title="get_global_resolver()" icon="function" href="../functions/get_global_resolver">
    Get the global runtime resolver, creating default if needed.
  </Card>

  <Card title="resolve_runtime()" icon="function" href="../functions/resolve_runtime">
    Resolve runtime for the given agent and model at turn-time.
  </Card>

  <Card title="get_runtime_cache()" icon="function" href="../functions/get_runtime_cache">
    Get a copy of the current runtime cache (for debugging/testing).
  </Card>

  <Card title="clear_runtime_cache()" icon="function" href="../functions/clear_runtime_cache">
    Clear runtime cache for a specific session or all sessions.
  </Card>
</CardGroup>
