agentleFS
MicrosoftKnown publishermicrosoft/agent-framework/python/packages/gemini/AGENTS.md

agent-framework / gemini

AGENTS.md14k starsChanged 10 months agoMITView on GitHub

Integration with Google's Gemini Developer API and Enterprise (Vertex AI) via the google-genai SDK. The shared _sdk_client.create_genai_client resolves authentication, backend mode, and service URL for chat and embeddings. GeminiEmbeddingClient supports only gemini-embedding-2 and gemini-embedding-2-preview, requiring per-call task instructions for text strings. Multimodal Google SDK Content or media Part inputs receive no task prefix, even with mixed text-and-media parts. Text-only SDK content is rejected so callers cannot bypass the task requirement. Enterprise accepts one content per request; the client splits batches…

Trending

More talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 3 mentionsApr 2026: 5 mentionsMay 2026: 3 mentionsJun 2026: 1 mentionJul 2026: 1 mentionAug 2026: 1 mentionSep 2026: 3 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/agent-framework repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/agent-framework

The biggest 5 of 31 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 31

Talked about on GitHub, Bluesky and Hacker News (31 times).

On GitHub · 17

12 more on GitHub

On Bluesky · 10

5 more on Bluesky

The file

Files
AGENTS.md

Gemini Package (agent-framework-gemini)

Integration with Google's Gemini Developer API and Enterprise (Vertex AI) via the google-genai SDK. The shared _sdk_client.create_genai_client resolves authentication, backend mode, and service URL for chat and embeddings.

Core Classes

  • RawGeminiChatClient - Lightweight chat client without any layers, for custom pipeline composition
  • GeminiChatClient - Full-featured chat client with function invocation, middleware, and telemetry
  • GeminiChatOptions - Options TypedDict for Gemini-specific parameters
  • GoogleGeminiSettings - Shared GOOGLE_* environment settings for chat and embeddings
  • ThinkingConfig - Configuration for extended thinking
  • RawGeminiEmbeddingClient - Text and multimodal embeddings without telemetry
  • GeminiEmbeddingClient - Text and multimodal embeddings with telemetry (defaults to stable gemini-embedding-2)
  • GeminiEmbeddingOptions - Per-call embedding model, dimensions, text task, and document title

GeminiEmbeddingClient supports only gemini-embedding-2 and gemini-embedding-2-preview, requiring per-call task instructions for text strings. Multimodal Google SDK Content or media Part inputs receive no task prefix, even with mixed text-and-media parts. Text-only SDK content is rejected so callers cannot bypass the task requirement. Enterprise accepts one content per request; the client splits batches there while keeping input order.

Gemini-specific Options

  • thinking_config - Enable extended thinking via ThinkingConfig
  • response_schema - Raw JSON schema dict for structured output (alternative to response_format)
  • top_k - Top-K sampling parameter

Built-in Tool Factory Methods

  • get_web_search_tool() - Google Search grounding for up-to-date web answers
  • get_code_interpreter_tool() - Sandboxed code execution
  • get_maps_grounding_tool() - Google Maps grounding for location and mapping
  • get_file_search_tool() - Retrieval from Gemini file search stores
  • get_mcp_tool() - Model Context Protocol server integration

Usage

from agent_framework import Content, Message
from agent_framework.gemini import GeminiChatClient

client = GeminiChatClient(model="gemini-2.5-flash")
response = await client.get_response([Message(role="user", contents=[Content.from_text("Hello")])])
from agent_framework.gemini import GeminiEmbeddingClient

client = GeminiEmbeddingClient()
try:
    result = await client.get_embeddings(
        ["A document"], options={"task_type": "RETRIEVAL_DOCUMENT", "dimensions": 768}
    )
finally:
    await client.close()

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.