agno and claude_code, or custom runtimes tailored to your needs.
With this service, you can:
- List and filter available runtimes to see what execution environments are available for your agents, including their features and status.
- Retrieve detailed runtime requirements to understand what dependencies, features, or models are needed for each runtime type.
- Validate runtime configurations before deploying agents, ensuring your setup meets all requirements and will work as expected.
For conceptual information about runtimes and how they’re used in agents, see Runtimes Core Concepts.
Overview
The Runtimes Service provides a set of high-level methods designed to be intuitive and flexible, supporting a wide range of operational and administrative tasks:- list(): Retrieve all available runtimes, with details about their type, features, and status. This is the primary entry point for discovering which execution environments are available in your workspace.
- get_requirements(runtime_id): Fetch detailed requirements for a specific runtime, including required features, model compatibility, and environment settings. Use this to ensure your agent configuration matches the runtime’s needs.
- validate(runtime_config): Validate a runtime configuration before deploying an agent. This helps catch errors early and ensures your deployment will succeed without unexpected issues.
Quick Start
List Runtimes
List all available agent runtime types.Basic Listing
Extract Runtime Information
Filter Runtimes by Type
Get Runtime Requirements
Get runtime-specific requirements for a runtime.Basic Requirements Check
Check Runtime Compatibility
Compare Runtime Requirements
Validate Runtime Configuration
Validate a runtime configuration before deployment.Basic Validation
Validate with Error Handling
Pre-deployment Validation
Practical Examples
1. Runtime Selection Helper
Use this helper when you want to automatically select the most suitable runtime for your agent based on required features or model provider. This is useful for dynamic agent deployment or when your requirements may change over time.2. Runtime Compatibility Matrix
This example helps you generate a matrix comparing all available runtimes, their features, and compatibility. It’s valuable for platform administrators or teams evaluating which runtimes best fit their needs.3. Runtime Configuration Builder
Use this builder class to construct and validate runtime configurations step by step. This approach is helpful for complex deployments where you want to ensure all configuration details are correct before deploying an agent.4. Runtime Health Monitor
Monitor the health status of all runtimes in your environment. This is useful for ongoing operations and maintenance, allowing you to quickly identify and address issues with inactive or unhealthy runtimes.Error Handling
When working with runtimes, you may encounter errors such as missing runtimes, invalid configurations, or unavailable features. These examples show how to handle such errors gracefully and provide fallback options to keep your workflows running smoothly.Best Practices
Follow these best practices to make your use of the Runtimes Service more robust, efficient, and maintainable. These patterns help you avoid common pitfalls and ensure your code is resilient to changes in runtime availability or configuration.1. Cache Runtime Information
To reduce API calls and improve performance, cache runtime and requirements information locally after the first retrieval. This is especially useful in applications that repeatedly access the same runtime details.2. Always Validate Before Deployment
Always validate your runtime configuration before deploying an agent. This helps catch errors early and ensures your deployment will succeed without unexpected issues.3. Check Requirements Before Configuration
Before building a runtime configuration, check the requirements for the selected runtime. This ensures your configuration will meet all necessary criteria and reduces the risk of deployment failures.4. Handle Runtime Unavailability
Always provide a fallback mechanism in case your preferred runtime is unavailable. This keeps your application resilient and ensures continuity of service even if a runtime is removed or temporarily inaccessible.API Reference
Methods
| Method | Description | Parameters |
|---|---|---|
list() | List all available runtimes | None |
get_requirements(runtime_id) | Get runtime-specific requirements | runtime_id: Runtime identifier (e.g., ‘claude_code’) |
validate(runtime_config) | Validate runtime configuration | runtime_config: Dictionary with runtime configuration |