tool_use.py
Run the Example
1
Set up your virtual environment
2
Install dependencies
3
Export your API keys
4
Use a current Claude model
Replace
anthropic/claude-sonnet-4-20250514 with anthropic/claude-sonnet-4-6 in the saved file.5
Configure Nexus
Install Nexus, then create
nexus.toml for the Anthropic model and the /llm/v1/ endpoint used by Agno:6
Start Nexus
Start the gateway from the directory that contains
nexus.toml:7
Run the example
Save the code above as
tool_use.py, then run: