Skip to main content

Google Gemini integration for Microsoft Agent Framework.

Project description

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

Project details


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.0a260609.tar.gz (15.9 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.0a260609-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agent_framework_gemini-1.0.0a260609.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":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.0a260609.tar.gz
Algorithm Hash digest
SHA256 20f9470dedf04b7d180bafbe31ebbdbccd5e2efa16aa823718f03ce82bd75c85
MD5 d38127ea1cbd2858e714ad1c2973fc67
BLAKE2b-256 26f3f424f37a07896b71c8d6f0cebc8167144b92e70b9f612dff3c83a0ebc289

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agent_framework_gemini-1.0.0a260609-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":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.0a260609-py3-none-any.whl
Algorithm Hash digest
SHA256 d899525c8909ed760f1d9545089601c7bf3514f942eb5b96410c4cdd69eff549
MD5 bd5189a43876246979f57d91d77a2424
BLAKE2b-256 3daa83c22d96b298b591c4102e505eea206a75949f49a750d0dc4c853f09570d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page