anthropic
Python package. After egisai.init() runs, both sync and async Anthropic /
AsyncAnthropic clients are policy-checked, audited, and (where applicable)
sanitized before reaching the provider.
Supported surface
Minimum version
anthropic>=0.40 is recommended.
Install
Use
Async usage
Streaming
System prompts and agent identity
Anthropic places the system prompt in a top-levelsystem= argument rather
than in the messages list. The SDK reads from there to fingerprint sub-agents
correctly. If you want to override identity explicitly, use
set_context().
When a call is blocked
By default a blocked call raisesPermissionError. Switch modes at init if
you’d rather receive a refusal-shaped Message-like object: