Index of every page on this site: llms.txt
All skills
google avatar

/gemini-interactions-api

@5fb62c2
by googlegoogle/skills24k stars
2,026
Run it yourself

Guides the usage of Gemini Interactions API on Gemini Enterprise Agent Platform. Use when the user wants to use the stateful, server-managed Interactions API for multi-turn conversations, background execution, streaming, structured output, and function calling on the Agent Platform.

Use this Skill: https://skilld.dev/gh/google/skills/gemini-interactions-api

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesdata_model.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Data Model & Step Types Reference

An Interaction response contains steps, an array of typed step objects representing a structured timeline of the interaction turn. Read the current step type rather than assuming the last step is text — the trailing step may be a function_call or a thought.

Step Types

User steps:

  • user_input: User input (text, audio, multimodal). Contains a content array. (This is why REST input payloads use "type": "user_input", not "role": "user".)

Model/server steps:

  • model_output: Final model generation. Contains a content array with text, image, audio, etc. (REST responses use "type": "model_output", not "role": "model".)
  • thought: Model reasoning / chain of thought. Has a signature field and optional summary.
  • function_call: Tool call request, with flat id, name, and arguments fields (there is no nested tool_calls list).
  • function_result: Tool result you send back, with call_id, name, and result fields.
  • google_search_call / google_search_result, code_execution_call / code_execution_result, url_context_call / url_context_result, mcp_server_tool_call / mcp_server_tool_result, file_search_call / file_search_result: built-in and remote tool steps.

Content types (inside the content array on model_output and user_input steps)

  • text: Text content (text field).
  • image / audio / document / video: Content with data, mime_type, or uri.

Convenience accessors

  • output_text: The combined text from the trailing model_output steps. Prefer this over hand-walking steps[-1].content[0].text, which breaks when the last step is a tool call or a thought.
  • output_image / output_audio: The last image or audio generated by the model in the response (data base64 + mime_type).

Streaming Event Types

Event Description
interaction.created Interaction created; includes metadata.
interaction.status_update Interaction-level status change.
step.start A new step begins. Contains the step type and initial metadata.
step.delta Incremental data for the current step. Contains a typed delta object (e.g. delta.type == "text" with delta.text).
step.stop The step is complete. Contains index.
interaction.completed Interaction finished. Contains final usage.

Delta Types

Delta Type Parent Step Description
text model_output Incremental text token.
audio model_output Audio chunk (base64).
image model_output Image chunk (base64).
thought_summary thought Thinking summary text.
thought_signature thought Opaque signature for thought verification.

Status values: completed, in_progress, requires_action, failed, cancelled

Storage & retention

Interactions are stored by default (store=True, retained for 7 days), which enables stateful features like previous_interaction_id and background execution. Passing store=False disables server-side retention (Zero Data Retention compliant) and therefore also disables previous_interaction_id and background — in that mode you must pass the full conversation history in input on each turn.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts13d3 checks · Risk SAFE
  • Gen Agent Trust Hub13d

    This skill provides standard guidance for interacting with the Google Gemini Interactions API using official SDKs and REST endpoints. It includes instructions for authentication, configuration, and telemetry attribution.

  • Socket13d

    No alerts

  • Snyk13d

    Risk: LOW · No issues

Signed by skilld at 5fb62c2. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 weeks ago
metadata
{
  "version": "2.0.2",
  "category": "AiAndMachineLearning"
}

README badge

README badge for google/skills/gemini-interactions-api