From kitaru
Migrate existing Gemini Interactions, Google GenAI, and Antigravity managed agent code to Kitaru's Gemini Interactions adapter. Use when code mentions google.genai, genai.Client, client.interactions.create, client.interactions.get, Interaction, interaction_id, previous_interaction_id, requires_action, function_call, function_result, background, store, poll, steps, output_text, Antigravity, managed agents, environment, Vertex, API key, KitaruGeminiInteractionsRunner, GeminiInteractionRequest, GeminiInteractionResult, GeminiInteractionCapturePolicy, or cache_identity. Helps classify direct, approximate, and absent mappings, preserve Google-owned hosted interaction internals, handle requires_action and polling safely, and produce a migration report.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kitaru:kitaru-gemini-interactions-migrationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill to inspect existing Gemini Interactions / Google GenAI code and
Use this skill to inspect existing Gemini Interactions / Google GenAI code and
move the safe outer interaction boundary to Kitaru's kitaru.adapters.gemini
surfaces.
The output should be conservative:
direct,
approximate, or absent.KitaruGeminiInteractionsRunner,
GeminiInteractionRequest, GeminiInteractionResult, and capture policy.MIGRATION_REPORT.md section or file that names replay, polling,
requires_action, hosted-tool, Antigravity, environment, region, credential,
and privacy risks.Use the user-facing name Gemini Interactions. Treat Antigravity as an important managed-agent/preset use case, not as the primary adapter identity.
Google owns the hosted interaction runtime: model/agent execution, hosted tools, MCP, web/code execution, Antigravity sandbox/environment internals, background jobs, and server-side interaction history.
Kitaru records one stable Gemini Interactions response with
checkpoint_strategy="interaction". Stable means completed or
requires_action.
Concrete story: the app sends an interaction request. Google may think, browse,
call hosted tools, use an Antigravity environment, or ask for a local function
result. Kitaru cannot see all of that internal work. Kitaru records the stable
response that comes back. If the response says requires_action, the work
returns to your Kitaru flow: run the local tool or ask a human, then send a later
function_result request.
Use it when the user asks to:
client.interactions.create(...) with
KitaruGeminiInteractionsRunner.run/run_sync(...);client.interactions.get(...) polling to GeminiInteractionRequest.poll(...);previous_interaction_id with GeminiInteractionRequest.resume(...);GeminiInteractionRequest.function_result(...);requires_action at Kitaru flow scope;background, store, steps, output_text, hosted tools, MCP,
Google Search, code execution, web tools, Antigravity, managed agents, Vertex,
API keys, regions, environments, or cache_identity;Do not use it to:
generateContent code unless the user is explicitly moving it
to Gemini Interactions first;requires_action work inside the provider-owned interaction instead of
returning it to Kitaru flow scope;Classify each source pattern before editing:
direct: Kitaru has a close adapter surface for the same outer behavior.
Example: client.interactions.create(model=..., input=...) becomes
runner.run_sync(GeminiInteractionRequest.start(input, model=...)).approximate: The migration is possible, but replay, polling, state,
environment, capture, or hosted-tool behavior differs. Example: hosted tool
steps remain Google-owned and are captured only as response summaries/artifacts.absent: There is no safe automatic migration. Example: a plan to replay each
Antigravity file operation as a Kitaru checkpoint.Unsupported patterns must not be silently approximated. Add a concrete
# TODO(migration): ... comment near proposed code, list it in the report, and
explain the redesign needed.
genai.Client, client.interactions.create,
get, previous_interaction_id, background, store, function calls,
function results, status checks, Antigravity/managed agents, environments,
Vertex/API-key configuration, and existing Kitaru decorators.references/concept-map.md and
references/gaps-and-flags.md. Count direct, approximate, high-risk, and
blocked items.checkpoint_strategy="interaction".
One stable Gemini Interactions response becomes one Kitaru checkpoint.KitaruGeminiInteractionsRunner plus GeminiInteractionRequest. Add status
handling for completed, requires_action, and non-stable statuses.MIGRATION_REPORT.md. Include the inventory, chosen boundary,
classifications, flags, behavior differences, and verification plan.Look for:
from google import genai, genai.Client(...), client.interactions.create,
client.interactions.get, or Interaction objects.model=..., agent=..., environment=..., tools=...,
system_instruction=..., generation_config=..., agent_config=...,
response_format=..., or response_mime_type=....previous_interaction_id, interaction.id, interaction_id, background,
store, poll, webhooks, or retry loops.status, requires_action, function_call, function_result, call_id,
steps, output_text, and manual local tool execution.@kitaru.flow or @kitaru.checkpoint wrappers.KitaruGeminiInteractionsRunner(name=..., checkpoint_strategy="interaction").GeminiInteractionRequest.start(...) for new interactions.GeminiInteractionRequest.resume(...) for previous_interaction_id turns.GeminiInteractionRequest.function_result(...) to answer a prior
requires_action function call.GeminiInteractionRequest.poll(interaction_id=...) to fetch an existing
background interaction. Do not create duplicate jobs to check progress.model= vs agent= distinction. Set exactly one..antigravity(...) for Antigravity managed-agent requests when that preset
fits, but report that Antigravity internals remain Google-owned.cache_identity when the same logical request might run under different
projects, regions, credentials, clients, or environment configuration.completed and requires_action as not safely
checkpointable final outputs.Minimal model interaction:
import kitaru
from kitaru.adapters.gemini import (
GeminiInteractionRequest,
KitaruGeminiInteractionsRunner,
)
runner = KitaruGeminiInteractionsRunner(name="gemini_writer")
@kitaru.flow
def write_summary(topic: str) -> str:
result = runner.run_sync(
GeminiInteractionRequest.start(
f"Write a short summary of {topic}.",
model="gemini-3.5-flash",
)
)
if result.status != "completed":
raise RuntimeError(f"Expected completed interaction, got {result.status!r}")
return result.output_text or ""
For full examples, load references/code-patterns.md.
When a pattern is unsafe or unsupported:
# TODO(migration): ... comment near the code if producing
code.LOW, MEDIUM, HIGH, or BLOCKER.Every non-trivial migration must include or draft MIGRATION_REPORT.md with:
requires_action, function
results, polling/background jobs, model vs agent targets, Antigravity,
environments, Vertex/API-key/region/client configuration, cache_identity,
capture/privacy policy, and hosted tools;Use references/report-template.md when a full report is needed.
Avoid these:
"interaction".in_progress, failed, cancelled, incomplete, or
budget_exceeded as successful checkpoint outputs.interaction_id.model= and agent= in one request.cache_identity when project/region/credential/client differences
change the meaning of the cached request.Load only the reference file needed for the current task:
references/concept-map.md — source-to-target mapping table and
classification guidance.references/code-patterns.md — import-complete migration examples.references/gaps-and-flags.md — severity definitions, upstream assumptions,
and must-flag patterns.references/report-template.md — Gemini Interactions-specific migration
report template.Kitaru source references:
kitaru/docs/content/docs/adapters/gemini-interactions.mdxkitaru/src/kitaru/adapters/gemini/__init__.pykitaru/examples/integrations/gemini_interactions_agent/README.mdnpx claudepluginhub zenml-io/kitaru-skills --plugin kitaruGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.