> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Beta Features

> Send Anthropic beta headers and their matching request configuration with Agno.

```python betas.py theme={null}
from agno.agent import Agent
from agno.models.anthropic import Claude


def lookup_temperature(city: str) -> str:
    temperatures = {
        "London": "18 C",
        "Paris": "21 C",
        "Tokyo": "25 C",
    }
    return temperatures.get(city, "No reading available")


agent = Agent(
    model=Claude(
        id="claude-sonnet-4-5-20250929",
        betas=["context-management-2025-06-27"],
        context_management={
            "edits": [
                {
                    "type": "clear_tool_uses_20250919",
                    "trigger": {"type": "tool_uses", "value": 2},
                    "keep": {"type": "tool_uses", "value": 1},
                }
            ]
        },
    ),
    tools=[lookup_temperature],
)

if __name__ == "__main__":
    agent.print_response(
        "Call lookup_temperature separately for London, Paris, and Tokyo, then compare the readings."
    )
```

Agno passes `betas` to the Anthropic SDK's beta Messages API. Use the exact beta name from the feature documentation and include every request field that the feature requires. An unsupported beta returns a `400` response. Anthropic has also retired specific beta headers by ignoring them, so the absence of an error does not prove that a feature is active.

The example pairs the context-editing beta with its required `context_management` body. A beta header changes an API request; it does not add tools or external data access by itself.

## Run the Example

<Snippet file="create-venv-step.mdx" />

**1. Install dependencies**

```bash theme={null}
uv pip install -U "agno[anthropic]"
```

**2. Set your API key**

```bash Mac/Linux theme={null}
export ANTHROPIC_API_KEY="your_anthropic_api_key"
```

```powershell Windows theme={null}
$Env:ANTHROPIC_API_KEY="your_anthropic_api_key"
```

**3. Save and run**

Save the example as `betas.py`, then run:

```bash theme={null}
python betas.py
```

## Features That Require Beta Headers

| Feature | Beta | Agno Configuration |
| - | - | - |
| [Context editing](https://agno-v2.mintlify.site/models/providers/native/anthropic/usage/context-management.md) | `context-management-2025-06-27` | Set `betas` and `context_management` |
| [Files API](https://agno-v2.mintlify.site/models/providers/native/anthropic/usage/file-upload.md) | `files-api-2025-04-14` | Send the beta when uploading or referencing an Anthropic file |
| [Agent Skills](https://agno-v2.mintlify.site/models/providers/native/anthropic/usage/skills.md) | `skills-2025-10-02` | Set `skills`; Agno adds the Skills beta and the legacy code-execution beta |
| [MCP connector](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector) | `mcp-client-2025-04-04` | Set `betas` and `mcp_servers` |

Beta names and availability can change. Check Anthropic's [beta-header documentation](https://platform.claude.com/docs/en/api/beta-headers) before enabling one.

## Related Generally Available Features

The current versions of these Anthropic features do not require a beta header:

* [Code execution](https://agno-v2.mintlify.site/models/providers/native/anthropic/usage/code-execution.md)
* [Prompt caching](https://agno-v2.mintlify.site/models/providers/native/anthropic/usage/prompt-caching.md)
* [Web fetch](https://agno-v2.mintlify.site/models/providers/native/anthropic/usage/web-fetch.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.