Back to library
AI
tutorial

Override Managed Agent Configurations for Rapid Session-Based Testing

Modify model, prompts, or tools for a single session without permanent changes.

Use the new 'agent_with_overrides' type when creating a session to temporarily swap models, prompts, or tools without changing the base agent configuration.

Claude

The Scenario

You have a production Claude Managed Agent and want to test how it performs with a new set of instructions or a different model without permanently changing the agent's core settings.

Before & after

The old way

Previously, you had to create an entirely new agent configuration or duplicate the agent to test different system prompts or tools. This could take 15-20 minutes of setup and management.

With AI

Pass `agent` with `type: "agent_with_overrides"` to swap the model, system prompt, or tools for just one session. This takes about 1-2 minutes to configure via API.

The Prompt

// API Request snippet for overriding agent config
{
  "agent": {
    "type": "agent_with_overrides",
    "overrides": {
      "model": "claude-sonnet-5",
      "system_prompt": "[YOUR_EXPERIMENTAL_PROMPT]",
      "tools": [YOUR_NEW_TOOL_LIST]
    }
  }
}

This feature is particularly useful for A/B testing different system prompts or testing how an agent performs with a specific toolset without affecting the master agent definition.

Source

Claude Platform - Claude Platform Docs
"replace the model, system prompt, tools, MCP servers, or skills for a single session. The agent itself is unchanged."