Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Get Started with Microsoft Agent Framework Gemini

Install the provider package:

pip install agent-framework-gemini --pre

Gemini Integration

The Gemini integration enables Microsoft Agent Framework applications to call Google Gemini models with familiar chat abstractions, including streaming, tool/function calling, and structured output.

Structured Output

Gemini structured output can be configured with either a Pydantic model in response_format, a JSON schema mapping in response_format, or a Gemini-specific response_schema. Declarative agents that define outputSchema pass that schema through response_format.

Authentication

The connector supports both google-genai authentication modes.

Gemini Developer API

Obtain an API key from Google AI Studio and set either the package-prefixed or SDK-standard environment variable:

export GEMINI_API_KEY="your-api-key"
# or: export GOOGLE_API_KEY="your-api-key"
export GEMINI_MODEL="gemini-2.5-flash-lite"
# or: export GOOGLE_MODEL="gemini-2.5-flash-lite"

Vertex AI

Set the standard Vertex AI environment variables used by google-genai:

export GOOGLE_GENAI_USE_VERTEXAI=true
export GOOGLE_CLOUD_PROJECT="your-project-id"
export GOOGLE_CLOUD_LOCATION="global"
export GOOGLE_MODEL="gemini-2.5-flash-lite"

Examples

See the Google Gemini samples for runnable end-to-end scripts covering:

  • Basic agent with tool calling and streaming
  • Extended thinking with ThinkingConfig
  • Google Search grounding
  • Google Maps grounding
  • Built-in code execution

Metadata

Release files for agent-framework-gemini 1.0.0b260722

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-framework-gemini 1.0.0b260722
File Size Uploaded Provenance Actions
agent_framework_gemini-1.0.0b260722.tar.gz 17.5 kB Without provenance Details for agent_framework_gemini-1.0.0b260722.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-framework-gemini 1.0.0b260722
File Interpreter ABI Platform Actions
agent_framework_gemini-1.0.0b260722-py3-none-any.whl Python 3 none any Details for agent_framework_gemini-1.0.0b260722-py3-none-any.whl

Total release size: 34.8 kB

Release files / agent_framework_gemini-1.0.0b260722.tar.gz

Download URL agent_framework_gemini-1.0.0b260722.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f11589691be3676931a5520e75ecba17832ffa28f15167282a75ccad41f0ff7b
BLAKE2b-256 checksum
How to use checksums
936feba7f29b3aed1034b5e298b3c644639e29e15e69f6337b076a5b012c624a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / agent_framework_gemini-1.0.0b260722-py3-none-any.whl

Download URL agent_framework_gemini-1.0.0b260722-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5d9fb57ca076821f99cf4892bd4bce2bd846d9db203461793048547a14b1bbf
BLAKE2b-256 checksum
How to use checksums
632bbe163e873b9f887fbc8166fb1bb651e4971bacbec008e5b3b9aa2122c624
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for agent-framework-gemini 1.0.0b260722

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page