Current collected state Current
Observed since 20 Oct, 22:46 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Gemini helper wrappers for the Grafana Agent Observability Python SDK
agento11y-gemini provides strict Gemini Models wrappers and mappers for agento11y.
pip install agento11y agento11y-gemini google-genai
models.generate_content(...)models.generate_content_async(...)models.generate_content_stream(...)models.generate_content_stream_async(...)models.embed_content(...)models.embed_content_async(...)models.from_request_response(...)models.from_stream(...)models.embedding_from_response(...)from google.genai import types as genai_types
from agento11y import Client, ClientConfig
from agento11y_gemini import GeminiOptions, models
client = Client(ClientConfig())
model = "gemini-2.5-pro"
contents = [genai_types.Content(role="user", parts=[genai_types.Part(text="Hello")])]
config = genai_types.GenerateContentConfig(max_output_tokens=256)
response = models.generate_content(
client,
model,
contents,
config,
lambda req_model, req_contents, req_config: gemini_client.models.generate_content(
model=req_model,
contents=req_contents,
config=req_config,
),
GeminiOptions(conversation_id="conv-1", agent_name="assistant", agent_version="1.0.0"),
)
from agento11y_gemini import GeminiStreamSummary, models
summary = models.generate_content_stream(
client,
model,
contents,
config,
lambda req_model, req_contents, req_config: GeminiStreamSummary(
responses=list(gemini_client.models.generate_content_stream(
model=req_model,
contents=req_contents,
config=req_config,
))
),
)
generation = models.from_request_response(model, contents, config, response)
stream_generation = models.from_stream(model, contents, config, summary)
embedding_response = models.embed_content(
client,
"gemini-embedding-001",
contents,
None,
lambda req_model, req_contents, req_config: gemini_client.models.embed_content(
model=req_model,
contents=req_contents,
config=req_config,
),
)
options = GeminiOptions(raw_artifacts=True)
Raw artifacts are default OFF and should only be enabled for diagnostics.
Gemini-specific fields are mapped as follows:
usage.thoughts_token_count -> normalized usage.reasoning_tokensusage.tool_use_prompt_token_count -> metadata agento11y.gen_ai.usage.tool_use_prompt_tokensconfig.thinking_config.thinking_budget -> metadata agento11y.gen_ai.request.thinking.budget_tokensconfig.thinking_config.thinking_level -> metadata agento11y.gen_ai.request.thinking.levelDownload counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.21.0 | 15 Oct 2026 | 3 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:46 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:c08bf61db70f217c6fee4babc98dd12adf686945eba6221a0eaed02689d82a60