Skip to main content

resolve_runtime

Function
This function is defined in the resolve module.
Resolve runtime for the given agent and model at turn-time. This is the main API that handoffs and sub-agent invocations should call to get the appropriate runtime instead of using construction-time pins.

Signature

Parameters

str
required
Unique identifier for the agent
str
required
Model reference (e.g., ‘gpt-4o’, ‘claude-3-sonnet’)
SessionContext
required
Session context for caching and tracking

Returns

AgentRuntimeProtocol
AgentRuntimeProtocol instance configured for the model

Exceptions

If no suitable runtime can be resolved

Usage

Uses

  • time.time
  • logger.debug
  • logger.info
  • get_global_resolver
  • resolver.supports_model
  • RuntimeError
  • resolver.resolve
  • logger.error

Used By

Source

View on GitHub

praisonaiagents/runtime/resolve.py at line 232