tool_use.py
Run the Example
1
Set up your virtual environment
2
Install dependencies
3
Export your Anthropic API key
4
Start the Nexus gateway
Install and start Nexus on
http://localhost:8000 using the Nexus setup guide. Configure its Anthropic provider with ANTHROPIC_API_KEY and explicitly register claude-sonnet-4-6. Replace anthropic/claude-sonnet-4-20250514 in the saved file with anthropic/claude-sonnet-4-6.5
Run the example
Save the code above as
tool_use.py, then run: