google-genai—from google import genai.google-generativeai—import google.generativeai.
egisai.init() runs, calls through either SDK are policy-checked,
audited, and (where applicable) sanitized before reaching the provider.
Supported surface
google-genai
google-generativeai
Install
Use — google-genai
Async
Streaming
Use — google-generativeai
Streaming
System instructions
Both SDKs allow attaching a system instruction. The egisai SDK reads it for sub-agent fingerprinting on the dashboard. To override identity explicitly, useset_context().
When a call is blocked
By default a blocked call raisesPermissionError. Switch modes at init if
you’d rather receive a refusal-shaped response: