
Gemini Agent
- 1 installs
- Updated June 12, 2026
- ahsan361/crisis-intelligence-response-orchestrator
gemini-agent is a Claude Code skill that guides implementing Python AI pipeline agents using the Google Gemini API with structured JSON output and shared client key rotation.
About
gemini-agent guides implementation of AI pipeline agents that use Google Gemini. Each agent is a Python function in backend/agents/ that accepts a state dict and returns a dict, instantiating the GenAI client through a shared client manager for API-key rotation. It enforces structured application/json output, appends outcomes to state trace with fields like decision and confidence, and requires JSON-parse fallbacks so a failed parse does not crash the pipeline.
- Implements AI pipeline agents in Python using the Gemini GenAI client
- Enforces API-key rotation via a shared client manager
- Requires structured application/json output and trace-state mutation
Gemini Agent by the numbers
- 1 all-time installs (skills.sh)
- Ranked #14,102 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Jul 7, 2026 (Skillselion catalog sync)
gemini-agent capabilities & compatibility
Requires a Google Gemini API key managed via the client manager.
- Capabilities
- gemini integration · agent implementation · structured output · state tracing
- Use cases
- api development · orchestration
- Pricing
- Bring your own API key
What gemini-agent says it does
Implement AI pipeline agents using Gemini.
Always instantiate the GenAI client using `get_client()` from `agents.client_manager`. This guarantees API key rotation.
If `json.loads(response.text)` fails, the agent must catch the exception and return a default fallback state dict to prevent the pipeline from crashing.
npx skills add https://github.com/ahsan361/crisis-intelligence-response-orchestrator --skill gemini-agentAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| Last updated | June 12, 2026 |
| Repository | ahsan361/crisis-intelligence-response-orchestrator ↗ |
What it does
Implement a Python Gemini pipeline agent with structured JSON output, key rotation, and trace-state mutation.
Who is it for?
Adding agents to a FastAPI/Supabase pipeline that uses a client manager and an agent_trace JSONB column.
Skip if: Directly instantiating google.genai.Client with an environment variable - the docs forbid it in favor of ClientManager.
When should I use this skill?
You are adding a new Gemini-backed pipeline agent to a Python backend that follows the client-manager and trace-state conventions.
What you get
A deterministic Python agent function that returns structured JSON, rotates API keys, and updates the trace state safely.
- a Python agent function under backend/agents/ returning structured JSON
By the numbers
- trace entry captures 5 fields (agent, timestamp, decision, confidence, input/output summary)
Files
Gemini Agent Skill
Instructions
1. Agent Definition: Create a new python file in backend/agents/. Define a function accepting a state: dict and returning a dict. 2. Client Management: Always instantiate the GenAI client using get_client() from agents.client_manager. This guarantees API key rotation. 3. Structured Output: Ensure the prompt asks for application/json output, and set response_mime_type="application/json" in GenerateContentConfig. 4. State Mutation: Append the agent's outcome to state["trace"] as a dictionary containing agent, timestamp, decision, confidence, and input_summary/output_summary.
Constraints
- Do not initialize the
google.genai.Clientdirectly with an environment variable. TheClientManagermust handle it. - Agents must be deterministic in output schema. Always provide a clear JSON format block in the prompt.
Common Pitfalls
- Missing Fallbacks: If
json.loads(response.text)fails, the agent must catch the exception and return a default fallback state dict to prevent the pipeline from crashing. - Trace Formatting: Forgetting to update
state["trace"]breaks the mobile app's Agent Trace screen, which relies on theagent_traceJSONB column.
Related skills
FAQ
How should the Gemini client be created?
Always via get_client() from agents.client_manager, which guarantees API key rotation; never instantiate google.genai.Client directly with an env variable.
What happens if JSON parsing fails?
The agent must catch the exception and return a default fallback state dict to prevent the pipeline from crashing.