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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_framework_gemini-1.0.0b260910.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_framework_gemini-1.0.0b260910-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file agent_framework_gemini-1.0.0b260910.tar.gz.

File metadata

  • Download URL: agent_framework_gemini-1.0.0b260910.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","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}

File hashes

Hashes for agent_framework_gemini-1.0.0b260910.tar.gz
Algorithm Hash digest
SHA256 2d6889181b51edc0c0a8d583c54d5edfa7ef3090a689692bf58c8f4080e11c23
MD5 ea8f8f7b97a2456f392106546a7c9388
BLAKE2b-256 064ed68a765e2881aec68307a2297382cb6e4e4b5d77b827a2488f2a62698357

See more details on using hashes here.

File details

Details for the file agent_framework_gemini-1.0.0b260910-py3-none-any.whl.

File metadata

  • Download URL: agent_framework_gemini-1.0.0b260910-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","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}

File hashes

Hashes for agent_framework_gemini-1.0.0b260910-py3-none-any.whl
Algorithm Hash digest
SHA256 bdcd37ae5048e7aa9e88720271c808beada7fa99e9896dd866d609c4b08c5aa9
MD5 0adb76bf7efbfb7a8956d36c269c8584
BLAKE2b-256 1304d47f41b40d193597b13ed27c1cc86a1d205cb418f6910c6d8a602f106a04

See more details on using hashes here.

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