[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79DPX185TXZTPF5BCJ4XYG4":3,"skill-same:01M79DPX185TXZTPF5BCJ4XYG4":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M79DPX185TXZTPF5BCJ4XYG4","gemini-interactions-api",null,"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.","hamzabellouch\u002Fagent-skills","hamzabellouch","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F237856042?v=4","01M79BRYW7XAMK3YDWQEMTWGWS","Hamza Bellouch","01M79BRYWXQV3JK2TGVTX8GN2A",8,"MIT","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FProgramming\u002FAI_Engineering_and_Platforms\u002FAgents_and_LLM_Platforms\u002Fgemini-interactions-api\u002Fgemini-interactions-api\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: gemini-interactions-api\nmetadata:\n  category: AiAndMachineLearning\ndescription: 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.\n---\n\n# Gemini Interactions API Skill\n\nThis skill provides instructions for authenticating, connecting to, and utilizing the stateful, server-managed **Gemini Interactions API** on Gemini Enterprise Agent Platform.\n\n\nThe Interactions API is the modern, recommended way to execute Generative AI agent conversations, background research tasks, multi-turn chats, and structured, multi-step workflows.\n\n> [!IMPORTANT] **CRITICAL: Unified SDK, Latest Models & GEAP Targeting** *\n> **Unified SDK**: Use the Google Gen AI SDK (**`google-genai >= 2.3.0`** for\n> Python, **`@google\u002Fgenai >= 2.3.0`** for JS\u002FTS). SDK versions `>= 2.0.0` are\n> the minimum floor at which the steps schema activates, but `>= 2.3.0` is the\n> supported\u002Frecommended floor. Legacy SDKs like `google-cloud-aiplatform`,\n> `@google-cloud\u002Fvertexai`, and `google-generativeai` are strictly unsupported\n> for Interactions. * *Mandatory Instruction*: When explaining client\n> initialization or writing import code, you **must** explicitly state\u002Fwarn the\n> user that legacy packages like `google-cloud-aiplatform` or\n> `google-generativeai` are strictly unsupported for interactions. * **Latest\n> Models Only**: Use `gemini-3.5-flash` (fast, balanced, multimodal — the\n> recommended default), `gemini-3.1-pro-preview` (complex reasoning, coding,\n> research), or `gemini-3.1-flash-lite` (cost-efficient, high-frequency\n> lightweight tasks). Refer to the\n> [latest model versions](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fmigrate)\n> to check for new updates. Legacy models (`gemini-3-flash-preview`,\n> `gemini-2.5-*`, `gemini-2.0-*`, `gemini-1.5-*`) are deprecated and do not\n> support interactions. * *Mandatory Instruction*: In any interaction response,\n> you **must** warn the user that legacy models like `gemini-2.5-*`,\n> `gemini-2.0-*`, or `gemini-1.5-*` are deprecated and unsupported for the\n> Interactions API. * **GEAP requires a provisioned agent (no direct base-model\n> calls yet)**: On Gemini Enterprise Agent Platform (GEAP), direct\u002Fbase-model\n> calls (`model=\"...\"`) via the Interactions API are **not supported yet**. You\n> **must** target a provisioned agent or endpoint with the `agent=\"\u003CAGENT_ID>\"`\n> parameter instead of `model=\"...\"`. The code examples in this skill use\n> `agent=...` for this reason. (This is the primary difference from the\n> [ai.google.dev](https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Finteractions)\n> documentation for Interactions, which uses `model=...` — while `model=...` is\n> valid for other Gemini API contexts, it is **not supported on the Agent\n> Platform**.) Provision an agent per the\n> [Agent Platform docs](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform)\n> and pass its ID as `agent`. * **Turn-Scoped Parameters**: Parameters like\n> `tools`, `system_instruction`, and `generation_config` are turn-scoped. They\n> **MUST** be passed with each interaction request.\n\n## 1. Authentication\n\nBefore running any code, ensure you are authenticated with Application Default Credentials (ADC) and have the necessary API enabled.\n\n1.  **Login**:\n    \n    ```bash\n    gcloud auth application-default login\n    ```\n2.  **Enable API** (if not already enabled):\n    \n    ```bash\n    gcloud services enable aiplatform.googleapis.com\n    ```\n\n---\n\n## 2. Client Initialization\n\nYou can initialize the client using environment variables (recommended) or by passing explicit configuration parameters.\n\n### Option A: Environment Variables (Recommended)\n\nConfigure environment variables to let the SDK automatically resolve settings:\n\n```bash\nexport GOOGLE_GENAI_USE_ENTERPRISE=true\nexport GOOGLE_CLOUD_PROJECT=\"your-project-id\"\nexport GOOGLE_CLOUD_LOCATION=\"global\"\n```\n\n#### Python\n\n```python\nfrom google import genai\n\n# The SDK automatically picks up the environment variables\nclient = genai.Client()\n```\n\n#### TypeScript\u002FJavaScript\n\n```typescript\nimport { GoogleGenAI } from \"@google\u002Fgenai\";\n\n\u002F\u002F The SDK automatically picks up the environment variables\nconst ai = new GoogleGenAI();\n```\n\n### Option B: Explicit Inline Parameters\n\nAlternatively, pass configuration values directly inside your code:\n\n#### Python\n\n```python\nfrom google import genai\nimport google.auth\n\n_, project_id = google.auth.default()\nclient = genai.Client(enterprise=True, project=project_id, location=\"global\")\n```\n\n#### TypeScript\u002FJavaScript\n\n```typescript\nimport { GoogleGenAI } from \"@google\u002Fgenai\";\n\nconst ai = new GoogleGenAI({\n    enterprise: {\n        project: \"your-project-id\",\n        location: \"global\"\n    }\n});\n```\n\n---\n\n## 3. Core Interactions API Usage\n\n### Quick Start (Single-Turn)\n\nSubmit a single prompt and read the final text response. Under the modern schema, output content is retrieved from the `steps` list.\n\n#### Python\n\n```python\ninteraction = client.interactions.create(\n    agent=\"your-agent-id\",  # GEAP: target a provisioned agent, not a base model\n    input=\"Explain serverless computing in one sentence.\"\n)\n# Use the output_text convenience accessor (combined text from the trailing model_output steps)\nprint(interaction.output_text)\n```\n\n#### TypeScript\u002FJavaScript\n\n```typescript\nconst interaction = await ai.interactions.create({\n    agent: \"your-agent-id\", \u002F\u002F GEAP: target a provisioned agent, not a base model\n    input: \"Explain serverless computing in one sentence.\"\n});\nconsole.log(interaction.output_text);\n```\n\n---\n\n### Stateful Conversation (Multi-Turn)\n\nInteractions are stateful by default. Store the conversation state in the cloud and reference it in the subsequent turn using `previous_interaction_id`.\n\n#### Python\n\n```python\n# Turn 1: Introduce ourselves\n# Interactions are stored by default (store=True); pass store=False to disable\n# server-side retention (which also disables previous_interaction_id and background).\nturn1 = client.interactions.create(\n    agent=\"your-agent-id\",\n    input=\"Hi! My name is John. I am working on AI agents.\",\n    store=True\n)\nprint(f\"Turn 1: {turn1.output_text}\")\n\n# Turn 2: Refer back to the stored turn state\nturn2 = client.interactions.create(\n    agent=\"your-agent-id\",\n    input=\"What is my name?\",\n    previous_interaction_id=turn1.id\n)\nprint(f\"Turn 2: {turn2.output_text}\")\n```\n\n#### TypeScript\u002FJavaScript\n\n```typescript\n\u002F\u002F Turn 1 (interactions are stored by default; pass store: false to disable)\nconst turn1 = await ai.interactions.create({\n    agent: \"your-agent-id\",\n    input: \"Hi! My name is John. I am working on AI agents.\",\n    store: true\n});\n\n\u002F\u002F Turn 2\nconst turn2 = await ai.interactions.create({\n    agent: \"your-agent-id\",\n    input: \"What is my name?\",\n    previousInteractionId: turn1.id\n});\nconsole.log(turn2.output_text);\n```\n\n---\n\n### Real-Time Streaming\n\nStream responses in real-time. Passing `stream=True` returns an iterable chunk generator.\n\n#### Python\n\n```python\n# The stream yields typed events, not full interaction snapshots. The sequence is:\n# interaction.created -> (step.start -> step.delta(s) -> step.stop)+ -> interaction.completed\nfor event in client.interactions.create(\n    agent=\"your-agent-id\",\n    input=\"Write a short poem about debugging.\",\n    stream=True\n):\n    if event.event_type == \"step.delta\":\n        if event.delta.type == \"text\":\n            print(event.delta.text, end=\"\", flush=True)\n    elif event.event_type == \"interaction.completed\":\n        print()\n```\n\n#### TypeScript\u002FJavaScript\n\n```typescript\n\u002F\u002F The stream yields typed events, not full interaction snapshots. The sequence is:\n\u002F\u002F interaction.created -> (step.start -> step.delta(s) -> step.stop)+ -> interaction.completed\nconst responseStream = await ai.interactions.create({\n    agent: \"your-agent-id\",\n    input: \"Write a short poem about debugging.\",\n    stream: true\n});\n\nfor await (const event of responseStream) {\n    if (event.event_type === \"step.delta\") {\n        if (event.delta.type === \"text\") {\n            process.stdout.write(event.delta.text);\n        }\n    } else if (event.event_type === \"interaction.completed\") {\n        console.log();\n    }\n}\n```\n\n---\n\n### Structured Output (Pydantic \u002F Polymorphic `response_format`)\n\nRetrieve structured, type-safe JSON matching a schema. Under the modern Interactions API, a polymorphic `response_format` argument directly takes the target schema structure.\n\n#### Python\n\n```python\nfrom pydantic import BaseModel, Field\n\nclass Book(BaseModel):\n    title: str = Field(description=\"The title of the book\")\n    author: str = Field(description=\"The book's author\")\n    year_published: int\n\ninteraction = client.interactions.create(\n    agent=\"your-agent-id\",\n    input=\"Recommend one famous sci-fi book.\",\n    response_format=Book\n)\n\n# The text will be a valid JSON matching the Book schema\nprint(interaction.output_text)\n```\n\n#### TypeScript\u002FJavaScript\n\n```typescript\nimport { Type } from \"@google\u002Fgenai\";\n\nconst BookSchema = {\n    type: Type.OBJECT,\n    properties: {\n        title: { type: Type.STRING, description: \"The title of the book\" },\n        author: { type: Type.STRING, description: \"The book's author\" },\n        yearPublished: { type: Type.INTEGER }\n    },\n    required: [\"title\", \"author\", \"yearPublished\"]\n};\n\nconst interaction = await ai.interactions.create({\n    agent: \"your-agent-id\",\n    input: \"Recommend one famous sci-fi book.\",\n    responseFormat: BookSchema\n});\n\nconsole.log(interaction.output_text);\n```\n\n---\n\n### Function Calling (Agent Tool Use)\n\nDefine local tools (functions) and submit execution results to the stateful interaction history.\n\n#### Python\n\n```python\nimport json\n\ndef get_stock_price(ticker: str) -> float:\n    \"\"\"Gets the stock price for a given ticker symbol.\"\"\"\n    if ticker.upper() == \"GOOG\":\n        return 175.50\n    return 100.0\n\n# Turn 1: Pass tools to the model\ninteraction = client.interactions.create(\n    agent=\"your-agent-id\",\n    input=\"What is the stock price of GOOG?\",\n    tools=[get_stock_price]\n)\n\n# In the flat steps schema, a tool request is a top-level step of type\n# \"function_call\" with flat `name` and `arguments` fields (no nested tool_calls).\nfor step in interaction.steps:\n    if step.type == \"function_call\" and step.name == \"get_stock_price\":\n        ticker_arg = step.arguments.get(\"ticker\")\n        price = get_stock_price(ticker_arg)\n\n        # Turn 2: Submit the result back as a function_result step. Reference the\n        # originating call via call_id=step.id, and pass tools again (turn-scoped).\n        final_turn = client.interactions.create(\n            agent=\"your-agent-id\",\n            input=[\n                {\n                    \"type\": \"function_result\",\n                    \"name\": step.name,\n                    \"call_id\": step.id,\n                    \"result\": [{\"type\": \"text\", \"text\": json.dumps(price)}],\n                }\n            ],\n            tools=[get_stock_price],\n            previous_interaction_id=interaction.id\n        )\n        print(final_turn.output_text)\n```\n\n#### TypeScript\u002FJavaScript\n\n```typescript\nimport { Type } from \"@google\u002Fgenai\";\n\n\u002F\u002F Define local tool\nfunction getStockPrice({ ticker }: { ticker: string }): number {\n    if (ticker.toUpperCase() === \"GOOG\") {\n        return 175.50;\n    }\n    return 100.00;\n}\n\n\u002F\u002F Turn 1: Pass tools to the model\nconst toolDeclaration = {\n    functionDeclarations: [{\n        name: \"getStockPrice\",\n        description: \"Gets the stock price for a given ticker symbol.\",\n        parameters: {\n            type: Type.OBJECT,\n            properties: {\n                ticker: { type: Type.STRING, description: \"The stock ticker symbol\" }\n            },\n            required: [\"ticker\"]\n        }\n    }]\n};\n\nconst interaction = await ai.interactions.create({\n    agent: \"your-agent-id\",\n    input: \"What is the stock price of GOOG?\",\n    tools: [toolDeclaration]\n});\n\n\u002F\u002F In the flat steps schema, a tool request is a top-level step of type\n\u002F\u002F \"function_call\" with flat `name` and `arguments` fields (no nested toolCalls).\nconst fcStep = interaction.steps.find(s => s.type === \"function_call\");\nif (fcStep && fcStep.name === \"getStockPrice\") {\n    const tickerArg = fcStep.arguments.ticker as string;\n    const price = getStockPrice({ ticker: tickerArg });\n\n    \u002F\u002F Turn 2: Submit the result back as a function_result step. Reference the\n    \u002F\u002F originating call via call_id=fcStep.id, and pass tools again (turn-scoped).\n    const finalTurn = await ai.interactions.create({\n        agent: \"your-agent-id\",\n        input: [{\n            type: \"function_result\",\n            name: fcStep.name,\n            call_id: fcStep.id,\n            result: [{ type: \"text\", text: JSON.stringify(price) }]\n        }],\n        tools: [toolDeclaration],\n        previousInteractionId: interaction.id\n    });\n    console.log(finalTurn.output_text);\n}\n```\n\n---\n\n## 4. Accessing the Interactions API via REST\n\nFor shell-based scripts, debugging, or non-Python\u002FJS environments, you can communicate with the stateful Interactions API directly using raw HTTP\u002FREST requests via `curl`.\n\n### 1. REST Endpoint\n\nThe REST API endpoint for interactions is:\n\n```http\nPOST https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F{PROJECT_ID}\u002Flocations\u002F{LOCATION}\u002Finteractions\n```\n\n*   **LOCATION**: Use `global` (or custom region if required).\n*   **PROJECT_ID**: Your Google Cloud Project ID.\n\n### 2. Set up Variables & Authentication Header\n\nSet your target agent ID (e.g., model or custom agent path) and access token generated from Application Default Credentials:\n\n```bash\nAGENT_ID=\"your-agent-id\"\nACCESS_TOKEN=$(gcloud auth print-access-token)\n```\n\n### 3. Single-Turn Interaction Payload\n\nSend a request to start an interaction using the agent variable:\n\n```bash\ncurl -X POST \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002Fglobal\u002Finteractions\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"agent\": \"'\"${AGENT_ID}\"'\",\n    \"input\": [{\n      \"type\": \"user_input\",\n      \"content\": [{\n        \"type\": \"text\",\n        \"text\": \"Explain serverless computing in one sentence.\"\n      }]\n    }]\n  }'\n```\n\n#### Response Example\nA synchronous POST request returns a JSON object containing the conversation step details and unique identifiers:\n\n```json\n{\n  \"id\": \"your-interaction-id\",\n  \"status\": \"completed\",\n  \"steps\": [\n    {\n      \"type\": \"model_output\",\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"Serverless computing is a cloud execution model where the cloud provider dynamically manages the allocation and provisioning of servers, charging customers based on actual usage rather than pre-purchased capacity.\"\n        }\n      ]\n    }\n  ],\n  \"usage\": {\n    \"total_tokens\": 24751,\n    \"total_input_tokens\": 23894,\n    \"total_output_tokens\": 857\n  },\n  \"created\": \"2026-05-08T10:44:43Z\",\n  \"updated\": \"2026-05-08T10:44:43Z\",\n  \"environment_id\": \"your-environment-id\",\n  \"object\": \"interaction\"\n}\n```\n\n### 4. Multi-Turn Stateful Interaction Payload\n\nTo continue an existing conversation statefully, specify the `previous_interaction_id` in the JSON payload:\n\n```bash\ncurl -X POST \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002Fglobal\u002Finteractions\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"agent\": \"'\"${AGENT_ID}\"'\",\n    \"store\": true,\n    \"previous_interaction_id\": \"YOUR_PREVIOUS_INTERACTION_ID\",\n    \"input\": [{\n      \"type\": \"user_input\",\n      \"content\": [{\n        \"type\": \"text\",\n        \"text\": \"Can you elaborate on that?\"\n      }]\n    }]\n  }'\n```\n\n### 5. Streaming Output Payload\nTo stream updates in real time (Server-Sent Events format), pass `\"stream\": true` in the payload:\n\n```bash\ncurl -X POST \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002Fglobal\u002Finteractions\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"agent\": \"'\"${AGENT_ID}\"'\",\n    \"stream\": true,\n    \"input\": [{\n      \"type\": \"user_input\",\n      \"content\": [{\n        \"type\": \"text\",\n        \"text\": \"Write a long story about space travel.\"\n      }]\n    }]\n  }'\n```\n\nThe endpoint will return a chunked stream where each event begins with `data: ` containing JSON updates with the `event_type` and step contents.\n\n> **How `curl` handles streaming:**\n> By default, when `\"stream\": true` is passed, the server responds with `Transfer-Encoding: chunked` and `Content-Type: text\u002Fevent-stream` (Server-Sent Events). `curl` will automatically keep the connection open and print the incoming data chunks to `stdout` in real time as they are pushed by the server. The user does not need to poll or pull further; the complete sequence of events streams continuously until completion.\n\n--------------------------------------------------------------------------------\n\n## 5. Data Model & Step Types Reference\n\nAn `Interaction` response contains `steps`, an array of typed step objects\nrepresenting a structured timeline of the interaction turn. Read the current\nstep `type` rather than assuming the last step is text — the trailing step may\nbe a `function_call` or a `thought`.\n\n### Step Types\n\n**User steps:**\n\n*   `user_input`: User input (text, audio, multimodal). Contains a `content`\n    array. (This is why REST input payloads use `\"type\": \"user_input\"`, **not**\n    `\"role\": \"user\"`.)\n\n**Model\u002Fserver steps:**\n\n*   `model_output`: Final model generation. Contains a `content` array with\n    `text`, `image`, `audio`, etc. (REST responses use `\"type\": \"model_output\"`,\n    **not** `\"role\": \"model\"`.)\n*   `thought`: Model reasoning \u002F chain of thought. Has a `signature` field and\n    optional `summary`.\n*   `function_call`: Tool call request, with flat `id`, `name`, and `arguments`\n    fields (there is **no** nested `tool_calls` list).\n*   `function_result`: Tool result you send back, with `call_id`, `name`, and\n    `result` fields.\n*   `google_search_call` \u002F `google_search_result`, `code_execution_call` \u002F\n    `code_execution_result`, `url_context_call` \u002F `url_context_result`,\n    `mcp_server_tool_call` \u002F `mcp_server_tool_result`, `file_search_call` \u002F\n    `file_search_result`: built-in and remote tool steps.\n\n### Content types (inside the `content` array on `model_output` and `user_input` steps)\n\n*   `text`: Text content (`text` field).\n*   `image` \u002F `audio` \u002F `document` \u002F `video`: Content with `data`, `mime_type`,\n    or `uri`.\n\n### Convenience accessor\n\n*   `output_text`: The combined text from the trailing `model_output` steps.\n    Prefer this over hand-walking `steps[-1].content[0].text`, which breaks when\n    the last step is a tool call or a thought.\n\n### Streaming Event Types\n\n| Event                   | Description                                       |\n| ----------------------- | ------------------------------------------------- |\n| `interaction.created`   | Interaction created; includes metadata.           |\n| `step.start`            | A new step begins. Contains the step `type` and   |\n:                         : initial metadata.                                 :\n| `step.delta`            | Incremental data for the current step. Contains a |\n:                         : typed `delta` object (e.g. `delta.type == \"text\"` :\n:                         : with `delta.text`).                               :\n| `step.stop`             | The step is complete. Contains `index`.           |\n| `interaction.completed` | Interaction finished. Contains final `usage`.     |\n\n### Storage & retention\n\nInteractions are stored by default (`store=True`), which enables stateful\nfeatures like `previous_interaction_id` and background execution. Passing\n`store=False` disables server-side retention and therefore also disables\n`previous_interaction_id` and `background` — in that mode you must pass the full\nconversation history in `input` on each turn.\n","# Gemini Interactions API Skill\n\nThis skill provides instructions for authenticating, connecting to, and utilizing the stateful, server-managed **Gemini Interactions API** on Gemini Enterprise Agent Platform.\n\n\nThe Interactions API is the modern, recommended way to execute Generative AI agent conversations, background research tasks, multi-turn chats, and structured, multi-step workflows.\n\n> [!IMPORTANT] **CRITICAL: Unified SDK, Latest Models & GEAP Targeting** *\n> **Unified SDK**: Use the Google Gen AI SDK (**`google-genai >= 2.3.0`** for\n> Python, **`@google\u002Fgenai >= 2.3.0`** for JS\u002FTS). SDK versions `>= 2.0.0` are\n> the minimum floor at which the steps schema activates, but `>= 2.3.0` is the\n> supported\u002Frecommended floor. Legacy SDKs like `google-cloud-aiplatform`,\n> `@google-cloud\u002Fvertexai`, and `google-generativeai` are strictly unsupported\n> for Interactions. * *Mandatory Instruction*: When explaining client\n> initialization or writing import code, you **must** explicitly state\u002Fwarn the\n> user that legacy packages like `google-cloud-aiplatform` or\n> `google-generativeai` are strictly unsupported for interactions. * **Latest\n> Models Only**: Use `gemini-3.5-flash` (fast, balanced, multimodal — the\n> recommended default), `gemini-3.1-pro-preview` (complex reasoning, coding,\n> research), or `gemini-3.1-flash-lite` (cost-efficient, high-frequency\n> lightweight tasks). Refer to the\n> [latest model versions](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fmigrate)\n> to check for new updates. Legacy models (`gemini-3-flash-preview`,\n> `gemini-2.5-*`, `gemini-2.0-*`, `gemini-1.5-*`) are deprecated and do not\n> support interactions. * *Mandatory Instruction*: In any interaction response,\n> you **must** warn the user that legacy models like `gemini-2.5-*`,\n> `gemini-2.0-*`, or `gemini-1.5-*` are deprecated and unsupported for the\n> Interactions API. * **GEAP requires a provisioned agent (no direct base-model\n> calls yet)**: On Gemini Enterprise Agent Platform (GEAP), direct\u002Fbase-model\n> calls (`model=\"...\"`) via the Interactions API are **not supported yet**. You\n> **must** target a provisioned agent or endpoint with the `agent=\"\u003CAGENT_ID>\"`\n> parameter instead of `model=\"...\"`. The code examples in this skill use\n> `agent=...` for this reason. (This is the primary difference from the\n> [ai.google.dev](https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Finteractions)\n> documentation for Interactions, which uses `model=...` — while `model=...` is\n> valid for other Gemini API contexts, it is **not supported on the Agent\n> Platform**.) Provision an agent per the\n> [Agent Platform docs](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform)\n> and pass its ID as `agent`. * **Turn-Scoped Parameters**: Parameters like\n> `tools`, `system_instruction`, and `generation_config` are turn-scoped. They\n> **MUST** be passed with each interaction request.\n\n## 1. Authentication\n\nBefore running any code, ensure you are authenticated with Application Default Credentials (ADC) and have the necessary API enabled.\n\n1.  **Login**:\n    \n    ```bash\n    gcloud auth application-default login\n    ```\n2.  **Enable API** (if not already enabled):\n    \n    ```bash\n    gcloud services enable aiplatform.googleapis.com\n    ```\n\n---\n\n## 2. Client Initialization\n\nYou can initialize the client using environment variables (recommended) or by passing explicit configuration parameters.\n\n### Option A: Environment Variables (Recommended)\n\nConfigure environment variables to let the SDK automatically resolve settings:\n\n```bash\nexport GOOGLE_GENAI_USE_ENTERPRISE=true\nexport GOOGLE_CLOUD_PROJECT=\"your-project-id\"\nexport GOOGLE_CLOUD_LOCATION=\"global\"\n```\n\n#### Python\n\n```python\nfrom google import genai\n\n# The SDK automatically picks up the environment variables\nclient = genai.Client()\n```\n\n#### TypeScript\u002FJavaScript\n\n```typescript\nimport { GoogleGenAI } from \"@google\u002Fgenai\";\n\n\u002F\u002F The SDK automatically picks up the environment variables\nconst ai = new GoogleGenAI();\n```\n\n### Option B: Explicit Inline Parameters\n\nAlternatively, pass configuration values directly inside your code:\n\n#### Python\n\n```python\nfrom google import genai\nimport google.auth\n\n_, project_id = google.auth.default()\nclient = genai.Client(enterprise=True, project=project_id, location=\"global\")\n```\n\n#### TypeScript\u002FJavaScript\n\n```typescript\nimport { GoogleGenAI } from \"@google\u002Fgenai\";\n\nconst ai = new GoogleGenAI({\n    enterprise: {\n        project: \"your-project-id\",\n        location: \"global\"\n    }\n});\n```\n\n---\n\n## 3. Core Interactions API Usage\n\n### Quick Start (Single-Turn)\n\nSubmit a single prompt and read the final text response. Under the modern schema, output content is retrieved from the `steps` list.\n\n#### Python\n\n```python\ninteraction = client.interactions.create(\n    agent=\"your-agent-id\",  # GEAP: target a provisioned agent, not a base model\n    input=\"Explain serverless computing in one sentence.\"\n)\n# Use the output_text convenience accessor (combined text from the trailing model_output steps)\nprint(interaction.output_text)\n```\n\n#### TypeScript\u002FJavaScript\n\n```typescript\nconst interaction = await ai.interactions.create({\n    agent: \"your-agent-id\", \u002F\u002F GEAP: target a provisioned agent, not a base model\n    input: \"Explain serverless computing in one sentence.\"\n});\nconsole.log(interaction.output_text);\n```\n\n---\n\n### Stateful Conversation (Multi-Turn)\n\nInteractions are stateful by default. Store the conversation state in the cloud and reference it in the subsequent turn using `previous_interaction_id`.\n\n#### Python\n\n```python\n# Turn 1: Introduce ourselves\n# Interactions are stored by default (store=True); pass store=False to disable\n# server-side retention (which also disables previous_interaction_id and background).\nturn1 = client.interactions.create(\n    agent=\"your-agent-id\",\n    input=\"Hi! My name is John. I am working on AI agents.\",\n    store=True\n)\nprint(f\"Turn 1: {turn1.output_text}\")\n\n# Turn 2: Refer back to the stored turn state\nturn2 = client.interactions.create(\n    agent=\"your-agent-id\",\n    input=\"What is my name?\",\n    previous_interaction_id=turn1.id\n)\nprint(f\"Turn 2: {turn2.output_text}\")\n```\n\n#### TypeScript\u002FJavaScript\n\n```typescript\n\u002F\u002F Turn 1 (interactions are stored by default; pass store: false to disable)\nconst turn1 = await ai.interactions.create({\n    agent: \"your-agent-id\",\n    input: \"Hi! My name is John. I am working on AI agents.\",\n    store: true\n});\n\n\u002F\u002F Turn 2\nconst turn2 = await ai.interactions.create({\n    agent: \"your-agent-id\",\n    input: \"What is my name?\",\n    previousInteractionId: turn1.id\n});\nconsole.log(turn2.output_text);\n```\n\n---\n\n### Real-Time Streaming\n\nStream responses in real-time. Passing `stream=True` returns an iterable chunk generator.\n\n#### Python\n\n```python\n# The stream yields typed events, not full interaction snapshots. The sequence is:\n# interaction.created -> (step.start -> step.delta(s) -> step.stop)+ -> interaction.completed\nfor event in client.interactions.create(\n    agent=\"your-agent-id\",\n    input=\"Write a short poem about debugging.\",\n    stream=True\n):\n    if event.event_type == \"step.delta\":\n        if event.delta.type == \"text\":\n            print(event.delta.text, end=\"\", flush=True)\n    elif event.event_type == \"interaction.completed\":\n        print()\n```\n\n#### TypeScript\u002FJavaScript\n\n```typescript\n\u002F\u002F The stream yields typed events, not full interaction snapshots. The sequence is:\n\u002F\u002F interaction.created -> (step.start -> step.delta(s) -> step.stop)+ -> interaction.completed\nconst responseStream = await ai.interactions.create({\n    agent: \"your-agent-id\",\n    input: \"Write a short poem about debugging.\",\n    stream: true\n});\n\nfor await (const event of responseStream) {\n    if (event.event_type === \"step.delta\") {\n        if (event.delta.type === \"text\") {\n            process.stdout.write(event.delta.text);\n        }\n    } else if (event.event_type === \"interaction.completed\") {\n        console.log();\n    }\n}\n```\n\n---\n\n### Structured Output (Pydantic \u002F Polymorphic `response_format`)\n\nRetrieve structured, type-safe JSON matching a schema. Under the modern Interactions API, a polymorphic `response_format` argument directly takes the target schema structure.\n\n#### Python\n\n```python\nfrom pydantic import BaseModel, Field\n\nclass Book(BaseModel):\n    title: str = Field(description=\"The title of the book\")\n    author: str = Field(description=\"The book's author\")\n    year_published: int\n\ninteraction = client.interactions.create(\n    agent=\"your-agent-id\",\n    input=\"Recommend one famous sci-fi book.\",\n    response_format=Book\n)\n\n# The text will be a valid JSON matching the Book schema\nprint(interaction.output_text)\n```\n\n#### TypeScript\u002FJavaScript\n\n```typescript\nimport { Type } from \"@google\u002Fgenai\";\n\nconst BookSchema = {\n    type: Type.OBJECT,\n    properties: {\n        title: { type: Type.STRING, description: \"The title of the book\" },\n        author: { type: Type.STRING, description: \"The book's author\" },\n        yearPublished: { type: Type.INTEGER }\n    },\n    required: [\"title\", \"author\", \"yearPublished\"]\n};\n\nconst interaction = await ai.interactions.create({\n    agent: \"your-agent-id\",\n    input: \"Recommend one famous sci-fi book.\",\n    responseFormat: BookSchema\n});\n\nconsole.log(interaction.output_text);\n```\n\n---\n\n### Function Calling (Agent Tool Use)\n\nDefine local tools (functions) and submit execution results to the stateful interaction history.\n\n#### Python\n\n```python\nimport json\n\ndef get_stock_price(ticker: str) -> float:\n    \"\"\"Gets the stock price for a given ticker symbol.\"\"\"\n    if ticker.upper() == \"GOOG\":\n        return 175.50\n    return 100.0\n\n# Turn 1: Pass tools to the model\ninteraction = client.interactions.create(\n    agent=\"your-agent-id\",\n    input=\"What is the stock price of GOOG?\",\n    tools=[get_stock_price]\n)\n\n# In the flat steps schema, a tool request is a top-level step of type\n# \"function_call\" with flat `name` and `arguments` fields (no nested tool_calls).\nfor step in interaction.steps:\n    if step.type == \"function_call\" and step.name == \"get_stock_price\":\n        ticker_arg = step.arguments.get(\"ticker\")\n        price = get_stock_price(ticker_arg)\n\n        # Turn 2: Submit the result back as a function_result step. Reference the\n        # originating call via call_id=step.id, and pass tools again (turn-scoped).\n        final_turn = client.interactions.create(\n            agent=\"your-agent-id\",\n            input=[\n                {\n                    \"type\": \"function_result\",\n                    \"name\": step.name,\n                    \"call_id\": step.id,\n                    \"result\": [{\"type\": \"text\", \"text\": json.dumps(price)}],\n                }\n            ],\n            tools=[get_stock_price],\n            previous_interaction_id=interaction.id\n        )\n        print(final_turn.output_text)\n```\n\n#### TypeScript\u002FJavaScript\n\n```typescript\nimport { Type } from \"@google\u002Fgenai\";\n\n\u002F\u002F Define local tool\nfunction getStockPrice({ ticker }: { ticker: string }): number {\n    if (ticker.toUpperCase() === \"GOOG\") {\n        return 175.50;\n    }\n    return 100.00;\n}\n\n\u002F\u002F Turn 1: Pass tools to the model\nconst toolDeclaration = {\n    functionDeclarations: [{\n        name: \"getStockPrice\",\n        description: \"Gets the stock price for a given ticker symbol.\",\n        parameters: {\n            type: Type.OBJECT,\n            properties: {\n                ticker: { type: Type.STRING, description: \"The stock ticker symbol\" }\n            },\n            required: [\"ticker\"]\n        }\n    }]\n};\n\nconst interaction = await ai.interactions.create({\n    agent: \"your-agent-id\",\n    input: \"What is the stock price of GOOG?\",\n    tools: [toolDeclaration]\n});\n\n\u002F\u002F In the flat steps schema, a tool request is a top-level step of type\n\u002F\u002F \"function_call\" with flat `name` and `arguments` fields (no nested toolCalls).\nconst fcStep = interaction.steps.find(s => s.type === \"function_call\");\nif (fcStep && fcStep.name === \"getStockPrice\") {\n    const tickerArg = fcStep.arguments.ticker as string;\n    const price = getStockPrice({ ticker: tickerArg });\n\n    \u002F\u002F Turn 2: Submit the result back as a function_result step. Reference the\n    \u002F\u002F originating call via call_id=fcStep.id, and pass tools again (turn-scoped).\n    const finalTurn = await ai.interactions.create({\n        agent: \"your-agent-id\",\n        input: [{\n            type: \"function_result\",\n            name: fcStep.name,\n            call_id: fcStep.id,\n            result: [{ type: \"text\", text: JSON.stringify(price) }]\n        }],\n        tools: [toolDeclaration],\n        previousInteractionId: interaction.id\n    });\n    console.log(finalTurn.output_text);\n}\n```\n\n---\n\n## 4. Accessing the Interactions API via REST\n\nFor shell-based scripts, debugging, or non-Python\u002FJS environments, you can communicate with the stateful Interactions API directly using raw HTTP\u002FREST requests via `curl`.\n\n### 1. REST Endpoint\n\nThe REST API endpoint for interactions is:\n\n```http\nPOST https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F{PROJECT_ID}\u002Flocations\u002F{LOCATION}\u002Finteractions\n```\n\n*   **LOCATION**: Use `global` (or custom region if required).\n*   **PROJECT_ID**: Your Google Cloud Project ID.\n\n### 2. Set up Variables & Authentication Header\n\nSet your target agent ID (e.g., model or custom agent path) and access token generated from Application Default Credentials:\n\n```bash\nAGENT_ID=\"your-agent-id\"\nACCESS_TOKEN=$(gcloud auth print-access-token)\n```\n\n### 3. Single-Turn Interaction Payload\n\nSend a request to start an interaction using the agent variable:\n\n```bash\ncurl -X POST \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002Fglobal\u002Finteractions\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"agent\": \"'\"${AGENT_ID}\"'\",\n    \"input\": [{\n      \"type\": \"user_input\",\n      \"content\": [{\n        \"type\": \"text\",\n        \"text\": \"Explain serverless computing in one sentence.\"\n      }]\n    }]\n  }'\n```\n\n#### Response Example\nA synchronous POST request returns a JSON object containing the conversation step details and unique identifiers:\n\n```json\n{\n  \"id\": \"your-interaction-id\",\n  \"status\": \"completed\",\n  \"steps\": [\n    {\n      \"type\": \"model_output\",\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"Serverless computing is a cloud execution model where the cloud provider dynamically manages the allocation and provisioning of servers, charging customers based on actual usage rather than pre-purchased capacity.\"\n        }\n      ]\n    }\n  ],\n  \"usage\": {\n    \"total_tokens\": 24751,\n    \"total_input_tokens\": 23894,\n    \"total_output_tokens\": 857\n  },\n  \"created\": \"2026-05-08T10:44:43Z\",\n  \"updated\": \"2026-05-08T10:44:43Z\",\n  \"environment_id\": \"your-environment-id\",\n  \"object\": \"interaction\"\n}\n```\n\n### 4. Multi-Turn Stateful Interaction Payload\n\nTo continue an existing conversation statefully, specify the `previous_interaction_id` in the JSON payload:\n\n```bash\ncurl -X POST \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002Fglobal\u002Finteractions\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"agent\": \"'\"${AGENT_ID}\"'\",\n    \"store\": true,\n    \"previous_interaction_id\": \"YOUR_PREVIOUS_INTERACTION_ID\",\n    \"input\": [{\n      \"type\": \"user_input\",\n      \"content\": [{\n        \"type\": \"text\",\n        \"text\": \"Can you elaborate on that?\"\n      }]\n    }]\n  }'\n```\n\n### 5. Streaming Output Payload\nTo stream updates in real time (Server-Sent Events format), pass `\"stream\": true` in the payload:\n\n```bash\ncurl -X POST \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002Fglobal\u002Finteractions\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"agent\": \"'\"${AGENT_ID}\"'\",\n    \"stream\": true,\n    \"input\": [{\n      \"type\": \"user_input\",\n      \"content\": [{\n        \"type\": \"text\",\n        \"text\": \"Write a long story about space travel.\"\n      }]\n    }]\n  }'\n```\n\nThe endpoint will return a chunked stream where each event begins with `data: ` containing JSON updates with the `event_type` and step contents.\n\n> **How `curl` handles streaming:**\n> By default, when `\"stream\": true` is passed, the server responds with `Transfer-Encoding: chunked` and `Content-Type: text\u002Fevent-stream` (Server-Sent Events). `curl` will automatically keep the connection open and print the incoming data chunks to `stdout` in real time as they are pushed by the server. The user does not need to poll or pull further; the complete sequence of events streams continuously until completion.\n\n--------------------------------------------------------------------------------\n\n## 5. Data Model & Step Types Reference\n\nAn `Interaction` response contains `steps`, an array of typed step objects\nrepresenting a structured timeline of the interaction turn. Read the current\nstep `type` rather than assuming the last step is text — the trailing step may\nbe a `function_call` or a `thought`.\n\n### Step Types\n\n**User steps:**\n\n*   `user_input`: User input (text, audio, multimodal). Contains a `content`\n    array. (This is why REST input payloads use `\"type\": \"user_input\"`, **not**\n    `\"role\": \"user\"`.)\n\n**Model\u002Fserver steps:**\n\n*   `model_output`: Final model generation. Contains a `content` array with\n    `text`, `image`, `audio`, etc. (REST responses use `\"type\": \"model_output\"`,\n    **not** `\"role\": \"model\"`.)\n*   `thought`: Model reasoning \u002F chain of thought. Has a `signature` field and\n    optional `summary`.\n*   `function_call`: Tool call request, with flat `id`, `name`, and `arguments`\n    fields (there is **no** nested `tool_calls` list).\n*   `function_result`: Tool result you send back, with `call_id`, `name`, and\n    `result` fields.\n*   `google_search_call` \u002F `google_search_result`, `code_execution_call` \u002F\n    `code_execution_result`, `url_context_call` \u002F `url_context_result`,\n    `mcp_server_tool_call` \u002F `mcp_server_tool_result`, `file_search_call` \u002F\n    `file_search_result`: built-in and remote tool steps.\n\n### Content types (inside the `content` array on `model_output` and `user_input` steps)\n\n*   `text`: Text content (`text` field).\n*   `image` \u002F `audio` \u002F `document` \u002F `video`: Content with `data`, `mime_type`,\n    or `uri`.\n\n### Convenience accessor\n\n*   `output_text`: The combined text from the trailing `model_output` steps.\n    Prefer this over hand-walking `steps[-1].content[0].text`, which breaks when\n    the last step is a tool call or a thought.\n\n### Streaming Event Types\n\n| Event                   | Description                                       |\n| ----------------------- | ------------------------------------------------- |\n| `interaction.created`   | Interaction created; includes metadata.           |\n| `step.start`            | A new step begins. Contains the step `type` and   |\n:                         : initial metadata.                                 :\n| `step.delta`            | Incremental data for the current step. Contains a |\n:                         : typed `delta` object (e.g. `delta.type == \"text\"` :\n:                         : with `delta.text`).                               :\n| `step.stop`             | The step is complete. Contains `index`.           |\n| `interaction.completed` | Interaction finished. Contains final `usage`.     |\n\n### Storage & retention\n\nInteractions are stored by default (`store=True`), which enables stateful\nfeatures like `previous_interaction_id` and background execution. Passing\n`store=False` disables server-side retention and therefore also disables\n`previous_interaction_id` and `background` — in that mode you must pass the full\nconversation history in `input` on each turn.\n",{"name":5,"metadata":24,"description":7},{"category":25},"AiAndMachineLearning","main","e905af21e5f1e1c3ca605e9656c3a7930360a84e","Programming\u002FAI_Engineering_and_Platforms\u002FAgents_and_LLM_Platforms\u002Fgemini-interactions-api\u002Fgemini-interactions-api",1,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills","https:\u002F\u002Fhamzabellouch.github.io\u002F","https:\u002F\u002Fgithub.com\u002Fhamzabellouch","hamzabellouch.github.io","CEO & Founder of @tknoglobal | Researcher in Technology & Applied Sciences.","2026-10-17 03:20:19",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add hamzabellouch\u002Fagent-skills --skill gemini-interactions-api",{"tool":42,"command":43},"bunx","bunx skills add hamzabellouch\u002Fagent-skills --skill gemini-interactions-api",{"tool":45,"command":46},"pnpm","pnpm dlx skills add hamzabellouch\u002Fagent-skills --skill gemini-interactions-api","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FProgramming\u002FAI_Engineering_and_Platforms\u002FAgents_and_LLM_Platforms\u002Fgemini-interactions-api\u002Fgemini-interactions-api\u002FSKILL.md",true,[],[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M79FHH2H815A9TAP6WNKH4Q8","security-audit","Comprehensive security guidance, source code audit, vulnerability assessment, and penetration test review for codebases, APIs, microservices, CLI tools, libraries, and LLM-backed applications. Triggers on requests to audit a codebase, conduct security reviews, find vulnerabilities or flaws, pen-test source code, or when the user asks in Arabic (فحص أمني، تدقيق الكود أمنياً، مراجعة الثغرات، فحص أمان المشروع). Supports Guidance mode (focused review) and Full Audit mode (deterministic 6-phase harness).","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FSecurity_Audit_and_Code_Review\u002Fsecurity-audit\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M79FHBGXVBY6VQ1X7ETAZMF1","malware-analysis-reversing","Production malware analysis workflows, reverse engineering methodologies, isolated sandbox triage, static\u002Fdynamic binary analysis, memory forensics, and YARA detection rule authoring.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FOffensive_Security_and_Pentesting\u002Fmalware-analysis-reversing\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M79FH6EACDR801TZCE4R8SAC","application-security-pentesting","Production Application Security (AppSec) standards, OWASP Top 10 vulnerability remediation, SAST\u002FDAST pipeline integration, secure code review, threat modeling, and defensive security posture.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FOffensive_Security_and_Pentesting\u002Fapplication-security-pentesting\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M79FH0VKVT44FK923K520ZQA","oauth2-oidc-security-flows","Implement enterprise OAuth 2.1 and OpenID Connect (OIDC) authorization code flow with Proof Key for Code Exchange (PKCE), state and nonce verification, refresh token rotation, token revocation, and centralized IdP federation (Keycloak, Auth0, Okta). Trigger when building secure authentication, single sign-on (SSO), or third-party delegated authorization.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FIdentity_and_Access_Management_IAM\u002Foauth2-oidc-security-flows\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M79FGVVB3R4T88XXD8FRSV5B","jwt-session-management-hardening","Harden JWT-based authentication and session lifecycles using asymmetric signing (RS256\u002FEdDSA), JWKS rotation, strict claims validation, Redis-backed sliding window sessions, revocation lists, and secure HttpOnly cookie storage. Trigger when implementing token validation, session revocation, or hardening API authentication.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FIdentity_and_Access_Management_IAM\u002Fjwt-session-management-hardening\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M79FGNCPZ85CVEY0B3NE4H3B","soc2-compliance-automation","Best practices for implementing SOC 2 Type II compliance controls, continuous evidence collection, infrastructure policy-as-code, and automated security monitoring. Use when automating Trust Services Criteria (Security, Availability, Confidentiality, Processing Integrity, Privacy), audit logging, IAM least privilege, or CI\u002FCD security gates.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FGovernance_Compliance_and_Legal_Tech\u002Fsoc2-compliance-automation\u002FSKILL.md",[],[]]