# Configure models, runtimes, and policies

Create and maintain model configurations, runtime policies, and runtime bindings, then apply them to a target agent. This page does not create or invoke agents.

## Prerequisites

Prepare credentials that can access the target workspace and the target agent ID. For service endpoints, authentication, and general request formats, see [Prepare to call an API](../../api-call-basics.md).

Before configuration, list available runtime providers, existing model configurations, and runtime policies to obtain IDs required by later actions.

## Call sequence

1. Query runtime providers, model configurations, and runtime policies, then select existing objects or create new ones.
2. After creating or updating model configurations and runtime policies, retain their IDs.
3. Bind the model and runtime to the target agent, then update runtime policies.
4. Query the agent's runtime policies. To realign the runtime, use the reconcile action and confirm again.

## API operations

### Manage model configurations and runtime providers

| What you need to do | API operation | Use it when |
| --- | --- | --- |
| Query runtime providers | [List runtime providers](../../../../reference/api/ai-studio/agents/runtime-providers/list-runtime-providers.md) | Learn available providers before configuration. |
| Query a runtime-provider profile | [Get a runtime provider](../../../../reference/api/ai-studio/agents/runtime-providers/get-runtime-provider.md) | You selected a provider and need its information. |
| Create a model configuration | [Create a model configuration](../../../../reference/api/ai-studio/agents/model-configurations/create-model-configuration.md) | You need a new model configuration. |
| Query model configurations | [List model configurations](../../../../reference/api/ai-studio/agents/model-configurations/list-model-configurations.md) | Select or confirm a model configuration. |
| Query model-configuration details | [Get a model configuration](../../../../reference/api/ai-studio/agents/model-configurations/get-model-configuration.md) | Confirm the target model configuration before updating or binding. |
| Update a model configuration | [Update a model configuration](../../../../reference/api/ai-studio/agents/model-configurations/update-model-configuration.md) | You have the model-configuration ID and need to modify it. |

### Manage runtime policies

| What you need to do | API operation | Use it when |
| --- | --- | --- |
| Create a runtime policy | [Create a runtime policy](../../../../reference/api/ai-studio/agents/runtime-policy-profiles/create-runtime-policy-profile.md) | You need a new runtime policy. |
| Query runtime policies | [List runtime policies](../../../../reference/api/ai-studio/agents/runtime-policy-profiles/list-runtime-policy-profiles.md) | Select or confirm a runtime policy. |
| Query runtime-policy details | [Get a runtime policy](../../../../reference/api/ai-studio/agents/runtime-policy-profiles/get-runtime-policy-profile.md) | Confirm a target runtime policy before updating. |
| Update a runtime policy | [Update a runtime policy](../../../../reference/api/ai-studio/agents/runtime-policy-profiles/update-runtime-policy-profile.md) | You have the runtime-policy ID and need to modify it. |

### Apply configuration to an agent

| What you need to do | API operation | Use it when |
| --- | --- | --- |
| Update a model binding | [Update a model binding](../../../../reference/api/ai-studio/agents/agents/update-model-binding.md) | You selected a model configuration and need to apply it to an agent. |
| Bind a runtime | [Upsert a runtime binding](../../../../reference/api/ai-studio/agents/agents/upsert-runtime-binding.md) | You selected a runtime and need to bind it to an agent. |
| Update runtime policies | [Update runtime policies](../../../../reference/api/ai-studio/agents/agents/update-runtime-policies.md) | Adjust the agent's current runtime policies. |
| Query runtime policies | [Get runtime policies](../../../../reference/api/ai-studio/agents/agents/get-runtime-policies.md) | Confirm the agent's current policies after applying them. |
| Reconcile a runtime | [Reconcile a runtime binding](../../../../reference/api/ai-studio/agents/agents/reconcile-runtime-binding.md) | Realign the target agent's runtime. |

## Confirm the result

Use [Get runtime policies](../../../../reference/api/ai-studio/agents/agents/get-runtime-policies.md) to confirm current agent policies. Confirm model-configuration and runtime-policy objects with their respective detail or list actions.

## Next steps

- [Create and maintain agents](agents.md)
- [Connect tools, skills, and channels](tools-skills-channels.md)
