> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/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

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

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U "agno[anthropic]"
    ```
  </Step>

  <Step title="Set your API key">
    <CodeGroup>
      ```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"
      ```
    </CodeGroup>
  </Step>

  <Step title="Save and run">
    Save the example as `betas.py`, then run:

    ```bash theme={null}
    python betas.py
    ```
  </Step>
</Steps>

## Features That Require Beta Headers

| Feature                                                                             | Beta                            | Agno Configuration                                                         |
| ----------------------------------------------------------------------------------- | ------------------------------- | -------------------------------------------------------------------------- |
| [Context editing](/models/providers/native/anthropic/usage/context-management)      | `context-management-2025-06-27` | Set `betas` and `context_management`                                       |
| [Files API](/models/providers/native/anthropic/usage/file-upload)                   | `files-api-2025-04-14`          | Send the beta when uploading or referencing an Anthropic file              |
| [Agent Skills](/models/providers/native/anthropic/usage/skills)                     | `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](/models/providers/native/anthropic/usage/code-execution)
* [Prompt caching](/models/providers/native/anthropic/usage/prompt-caching)
* [Web fetch](/models/providers/native/anthropic/usage/web-fetch)
