Installation
Setup
Create an Anthropic client by providing your API key:Language Model
Use the Anthropic language model for text generation:Streaming Responses
Stream responses for real-time text generation:Tool Calling
Use Claude’s native tools or define custom tools:Native Tools
Anthropic provides several native tools:- AnthropicTool.Bash: Execute bash commands
- AnthropicTool.CodeExecution: Run code in a sandbox
- AnthropicTool.ComputerUse: Interact with a computer interface
- AnthropicTool.Memory: Store and retrieve information across messages
- AnthropicTool.TextEditor: Edit text files
Error Handling
Handle Anthropic-specific errors:Telemetry
Integrate with OpenTelemetry for observability:API Modules
- AnthropicClient: HTTP client for Anthropic API
- AnthropicConfig: Configuration options
- AnthropicError: Error type augmentation
- AnthropicLanguageModel: Language model implementation
- AnthropicTelemetry: OpenTelemetry integration
- AnthropicTool: Provider-defined tools
