main() — anthropic-sdk-python Function Reference
Architecture documentation for the main() function in tools_runner.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 192158cd_1736_f626_1dbf_6946f0587680["main()"] f256b1e3_d2b3_ac5c_1d2c_4432a530febc["tools_runner.py"] 192158cd_1736_f626_1dbf_6946f0587680 -->|defined in| f256b1e3_d2b3_ac5c_1d2c_4432a530febc style 192158cd_1736_f626_1dbf_6946f0587680 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
examples/tools_runner.py lines 44–53
def main() -> None:
runner = client.beta.messages.tool_runner(
max_tokens=1024,
model="claude-3-5-sonnet-latest",
# alternatively, you can use `tools=[anthropic.beta_tool(get_weather)]`
tools=[get_weather],
messages=[{"role": "user", "content": "What is the weather in SF?"}],
)
for message in runner:
rich.print(message)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does main() do?
main() is a function in the anthropic-sdk-python codebase, defined in examples/tools_runner.py.
Where is main() defined?
main() is defined in examples/tools_runner.py at line 44.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free