Buckets:

download
raw
956 Bytes
"""
Anthropic Thinking
==================
Cookbook example for `anthropic/thinking.py`.
"""
from agno.agent import Agent
from agno.models.anthropic import Claude
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
agent = Agent(
model=Claude(
id="claude-sonnet-4-5",
max_tokens=2048,
thinking={"type": "enabled", "budget_tokens": 1024},
),
markdown=True,
)
# Print the response in the terminal
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
# --- Sync ---
agent.print_response("Share a very scary 2 sentence horror story")
# --- Sync + Streaming ---
agent.print_response("Share a very scary 2 sentence horror story", stream=True)

Xet Storage Details

Size:
956 Bytes
·
Xet hash:
b2ef78851268e0743d8bdf5ac619f40ee46bb24d91d3d5ecb5b276dd39a97950

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.