Look, Anthropic's Claude-3.7-Sonnet is a powerful, hybrid reasoning, CRASHOUT LLM.
Their new CLAUDE CODE is THE best showcase of an effective AI AGENT TO DATE.
Let's breakdown their capabilities and see how you can use it in your engineering work and play.
Check out IndyDevDan YouTube Channel for the full breakdown of this starter pack and for more actionable insights on AI Agents, LLMs, and AI Coding.
This starter pack provides a collection of simple, self-contained examples showcasing the capabilities of Claude 3.7 Sonnet, Anthropic's latest and most powerful model. Each script demonstrates a specific feature or capability, making it easy to understand and integrate into your own projects.
Installation - Install uv
uv is THE modern package manager for Python.
macos + linux
brew install uv
windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
See each file to see usage instructions. Start with
simple_prompt.py
and work your way up.
simple_prompt.py
- Basic prompt to Claude 3.7 Sonnetsimple_structured_output.py
- Demonstrates structured JSON outputsimple_tool_use.py
- Shows basic tool use integrationprompt_with_extended_thinking.py
- Implements extended thinking for complex reasoningprompt_with_extended_thinking_and_streaming.py
- Combines extended thinking with streaming responsesprompt_with_extended_thinking_tool_use.py
- Integrates extended thinking with tool useprompt_with_extended_output_and_extended_thinking_and_streaming.py
- Showcases extended output combined with extended thinking and streamingagent_bash_and_editor_with_extended_thinking.py
- Demonstrates an agent with bash and editor capabilities using extended thinkingmcp_server_local_example.py
- Demonstrates a local MCP server for weather data with Claude 3.7 Sonnetmcp_server_fetch_hosted_example.py
- Shows how to use the Fetch MCP server to retrieve web content with Claude
Feature | Specification |
---|---|
Model | claude-3-7-sonnet-20250219 |
Tokens In | 200k |
Tokens Out (Normal) | 8k |
Tokens Out (Extended) | 128k (betas=["output-128k-2025-02-19"] ) |
Thinking Tokens | 64k |
Knowledge Cut Off | November 2024 |
My take (vibes + benchmarks) on the intelligence of the models. Don't take it as gospel.
claude-3-7-sonnet w/64k >
o1 (HIGH) >
o3-mini (HIGH) >
DeepSeek R1 >
GPT-4.5 >=
claude-3-7-sonnet >=
claude-3-5-sonnet >=
Deepseek v3
Token use | Cost |
---|---|
Input tokens | $3 / MTok |
Output tokens (including thinking tokens) | $15 / MTok |
Prompt caching write | $3.75 / MTok |
Prompt caching read | $0.30 / MTok |
Big idea: The big takeaway with extended thinking is that you have FINE-GRAINED control over the reasoning of your Claude 3.7 model now. You can effectively trade time & money for intelligence. This is powerful.
For simple tasks, you can just use the model with no extended thinking. For more complex tasks, you can scale up your extended thinking budget according to your needs:
Thinking Budget | Intelligence Level |
---|---|
1024 tokens | XS intelligence |
2000 tokens | S intelligence |
4000 tokens | M intelligence |
8000 tokens | L intelligence |
16000 tokens | XL intelligence |
32000 tokens | 2XL intelligence |
64000 tokens | 4XL intelligence |
- The minimum budget is 1,024 tokens
- Set appropriate budgets: Start with larger thinking budgets (16,000+ tokens) for complex tasks and adjust based on your needs
- Anthropic suggests starting at the minimum and increasing the thinking budget incrementally to find the optimal range for your use case
- Higher token counts may allow more comprehensive and nuanced reasoning, but there may be diminishing returns depending on the task
- The thinking budget is a target rather than a strict limit - actual token usage may vary based on the task
- Be prepared for potentially longer response times due to additional processing
- Streaming is required when
max_tokens
is greater than 21,333 - Monitor token usage to optimize costs and performance
- Use extended thinking for particularly complex tasks that benefit from step-by-step reasoning like math, coding, and analysis
- Experiment with thinking token budgets: The model might perform differently at different settings
For more information on Claude 3.7 Sonnet and extended thinking, check out these resources: