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

# Betas

> Enable the 1M-token context beta on Claude via the betas parameter and print every beta available in the installed anthropic SDK.

Beta features are experimental capability extensions for Anthropic models. You can use them with the `betas` parameter of the Agno Claude model class.

```python betas.py theme={null}
"""Example demonstrating how to use Anthropic beta features.

Beta features are experimental capability extensions for Anthropic models.
You can use them with the `betas` parameter of the Agno Claude model class.
"""

import anthropic
from agno.agent import Agent
from agno.models.anthropic import Claude

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
# Setup the beta features we want to use
betas = ["context-1m-2025-08-07"]
model = Claude(betas=betas)

# Note: you can see all beta features available in your Anthropic version like this:
all_betas = anthropic.types.AnthropicBetaParam
agent = Agent(model=model, debug_mode=True)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
# The beta features are now activated, the model will have access to use them.
if __name__ == "__main__":
    print("\n=== All available Anthropic beta features ===")
    beta_lines = "\n- ".join(str(b) for b in all_betas.__args__[1].__args__)
    print(f"- {beta_lines}")
    print("=============================================\n")

    agent.print_response("What is the weather in Tokyo?")
```

## 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="Export your Anthropic API key">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export ANTHROPIC_API_KEY="your_anthropic_api_key_here"
      ```

      ```bash Windows theme={null}
      $Env:ANTHROPIC_API_KEY="your_anthropic_api_key_here"
      ```
    </CodeGroup>
  </Step>

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

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

Full source: [cookbook/90\_models/anthropic/betas.py](https://github.com/agno-agi/agno/blob/main/cookbook/90_models/anthropic/betas.py)
