Copy
Ask AI
"""
Anthropic Web Fetch
===================
Cookbook example for `anthropic/web_fetch.py`.
"""
from agno.agent import Agent
from agno.models.anthropic import Claude
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
agent = Agent(
model=Claude(id="claude-opus-4-5", betas=["web-fetch-2025-09-10"]),
tools=[
{
"type": "web_fetch_20250910",
"name": "web_fetch",
"max_uses": 5,
}
],
markdown=True,
)
agent.print_response(
"Tell me more about https://en.wikipedia.org/wiki/Glacier_National_Park_(U.S.)",
stream=True,
)
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
pass
Run the Example
Copy
Ask AI
# Clone and setup repo
git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/90_models/anthropic
# Create and activate virtual environment
./scripts/demo_setup.sh
source .venvs/demo/bin/activate
python web_fetch.py