[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D6VDG9VDKAF7QHM761FDQD":3,"skill-same:01M7D6VDG9VDKAF7QHM761FDQD":65},{"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":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":28,"commitSha":29,"skillDirectory":5,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7D6VDG9VDKAF7QHM761FDQD","gemini-agents-api",null,"Manages custom Agent resources on Gemini Enterprise Agent Platform. Use when the user wants to programmatically create, configure, list, update, or delete stateful, server-managed Agent resources (including mounting files, skills, and tools) before executing conversations.","tangyixiao\u002Ftangyixiao-skills","tangyixiao","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F115929632?v=4","01M7D582YK6A4M63CAK4CSY4EW","Tang Yixiao","01M7D582Z64DMRSYR872SR34SA",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgemini-agents-api\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgemini-agents-api\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: gemini-agents-api\nmetadata:\n  version: 1.0.1\n  category: AiAndMachineLearning\ndescription: Manages custom Agent resources on Gemini Enterprise Agent Platform. Use\n  when the user wants to programmatically create, configure, list, update, or delete\n  stateful, server-managed Agent resources (including mounting files, skills, and\n  tools) before executing conversations.\n---\n\n# Gemini Enterprise Agent Platform - Managed Agents API Skill\n\nThis skill provides complete instructions, REST request endpoints, and JSON payload structures to programmatically manage **custom Agent resources** on the Gemini Enterprise Agent Platform (Agent Platform).\n\nThe **Managed Agents API** forms the **Control Plane** of the platform. It allows developers to provision, retrieve, update, and delete tailored, stateful agent containers equipped with system instructions, sandboxed files, custom skill registries, and local\u002Fremote tools.\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\u002Fattribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:gemini-agents-api)\"`\nand append `agent-skills\u002F1.0 (skill:gemini-agents-api)` to `User-Agent` headers.\n\n---\n\n## 1. Authentication & Setup\n\nAll REST requests to the Control Plane must include a Bearer token derived from Application Default Credentials (ADC), and target the production global endpoint.\n\n### 1. Setup Environment Variables\n\nBefore running requests, set up the required project variables and access token:\n\n```bash\nexport PROJECT_ID=\"your-project-id\"\nexport LOCATION=\"global\"\nexport ACCESS_TOKEN=$(gcloud auth print-access-token)\n```\n\n> [!IMPORTANT]\n> **API Location Support**:\n> The `LOCATION` environment variable must be set to a regional location where the Gemini Enterprise Agent Platform's **Managed Agents API** is actively supported (e.g., `global`, or other available regional endpoints).\n\n\n### 2. Endpoint URL\n\nThe production Agents Control Plane endpoint is:\n\n```http\nhttps:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F{PROJECT_ID}\u002Flocations\u002F{LOCATION}\u002Fagents\n```\n\n---\n\n## 2. Programmatic Agent Management (Control Plane CRUD)\n\n### 1. Create Agent (Long-Running Operation)\n\nTo create a new agent resource, issue a `POST` request with the custom configuration. You can mount remote files, folders, or skills directly from **Google Cloud Storage** buckets into the agent container's workspace. Creating an agent is a Long-Running Operation (LRO) that spawns an asynchronous job.\n\n*   **Method**: `POST`\n*   **Endpoint**: `https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002F${LOCATION}\u002Fagents`\n\n#### Request Payload\n\n```bash\ncurl -X POST \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002F${LOCATION}\u002Fagents\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson; charset=utf-8\" \\\n  -d '{\n    \"id\": \"my-custom-agent\",\n    \"base_agent\": \"antigravity-preview-05-2026\",\n    \"description\": \"A professional agent configured with remote tools and mounted Cloud Storage directories.\",\n    \"system_instruction\": \"You are a helpful, domain-expert assistant.\",\n    \"tools\": [\n      {\"type\": \"code_execution\"},\n      {\"type\": \"filesystem\"},\n      {\"type\": \"google_search\"},\n      {\"type\": \"url_context\"}\n    ],\n    \"base_environment\": {\n      \"type\": \"remote\",\n      \"sources\": [\n        {\n          \"type\": \"gcs\",\n          \"source\": \"gs:\u002F\u002Fyour-agent-bucket-name\u002Fskills\",\n          \"target\": \"\u002F.agent\u002Fskills\"\n        }\n      ],\n      \"network\": {\n        \"allowlist\": [\n          { \"domain\": \"*\" }\n        ]\n      }\n    }\n  }'\n```\n\n#### LRO Operations Response\n\nSince agent provisioning takes a few moments, the endpoint immediately returns an operation tracking object:\n\n```json\n{\n  \"name\": \"projects\u002F1234567890\u002Flocations\u002Fglobal\u002Foperations\u002Foperation-987654321-abcde\",\n  \"metadata\": {\n    \"@type\": \"type.googleapis.com\u002Fgoogle.cloud.aiplatform.v1beta1.CreateAgentOperationMetadata\",\n    \"genericMetadata\": {\n      \"createTime\": \"2026-05-14T19:00:00.123456Z\",\n      \"updateTime\": \"2026-05-14T19:00:01.654321Z\"\n    }\n  }\n}\n```\n\n#### [Advanced] Mount Skill Registry Resources\n\nTo mount skills directly from the Skill Registry service instead of Cloud Storage, replace the Cloud Storage source item in the payload:\n\n```json\n\"sources\": [\n  {\n    \"type\": \"skill_registry\",\n    \"source\": \"projects\u002Fyour-project-id\u002Flocations\u002Fglobal\u002Fskills\u002Fmy-math-skill\u002Frevisions\u002F123456789012\",\n    \"target\": \"\u002F.agent\u002Fskills\"\n  }\n]\n```\n\n#### [Advanced] Configuring Model Context Protocol (MCP) Servers\n\nTo configure Third-Party MCP servers for an agent, add the server metadata directly under the `\"tools\"` parameter array inside the creation request. The platform securely routes tool execution requests to the external MCP server.\n\n> [!IMPORTANT]\n> **MCP Security Explanation**: When describing MCP tool configurations, you must explain that the platform securely routes tool requests to the specified MCP server and guarantees header confidentiality by only sending custom headers\u002Ftokens to that URL.\n\n```json\n\"tools\": [\n  {\n    \"type\": \"mcp\",\n    \"name\": \"my-mcp-server\",\n    \"url\": \"https:\u002F\u002Fmcp.yourcompany.com\u002Fapi\",\n    \"headers\": {\n      \"Authorization\": \"Bearer YOUR_MCP_AUTH_TOKEN\"\n    }\n  }\n]\n```\n\n*   **name**: A descriptive name for the MCP server.\n*   **url**: The endpoint URL of the external MCP server.\n*   **headers**: (Optional) Custom key-value pairs containing authentication tokens (e.g. API keys, bearer tokens) required to call the server. The platform guarantees that these headers are only sent to the specified MCP server URL.\n\n> [!TIP]\n> **Overriding MCP at Interaction Time (Data Plane)**:\n> You can dynamically override or supply MCP tools directly when creating a conversation interaction (Data Plane) by passing `\"type\": \"mcp_server\"` inside the `\"tools\"` payload of `interactions.create`. Refer to the Interactions API documentation for details.\n\n---\n\n### 2. Polling the LRO Status\n\nTo track the status of agent creation and obtain the final ready resource, poll the operation URL returned in the `name` field of the creation response.\n\n*   **Method**: `GET`\n*   **Endpoint**: `https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002F{OPERATION_NAME}`\n\n```bash\ncurl -X GET \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F1234567890\u002Flocations\u002Fglobal\u002Foperations\u002Foperation-987654321-abcde\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\"\n```\n\n#### In-Progress Response\n\n```json\n{\n  \"name\": \"projects\u002F1234567890\u002Flocations\u002Fglobal\u002Foperations\u002Foperation-987654321-abcde\",\n  \"metadata\": { ... }\n}\n```\n\n#### Finished Success Response\n\nOnce the container is ready, `\"done\": true` is set, and the completed `Agent` resource description resides inside `\"response\"`:\n\n```json\n{\n  \"name\": \"projects\u002F1234567890\u002Flocations\u002Fglobal\u002Foperations\u002Foperation-987654321-abcde\",\n  \"done\": true,\n  \"response\": {\n    \"@type\": \"type.googleapis.com\u002Fgoogle.cloud.aiplatform.v1beta1.Agent\",\n    \"name\": \"projects\u002Fyour-project-id\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent\",\n    \"base_agent\": \"antigravity-preview-05-2026\",\n    \"description\": \"A professional agent configured with remote tools and mounted Cloud Storage directories.\",\n    \"system_instruction\": \"You are a helpful, domain-expert assistant.\"\n  }\n}\n```\n\n---\n\n### 3. Get Agent\n\nRetrieve the configuration metadata, tools, and environment setup of an existing custom agent.\n\n*   **Method**: `GET`\n*   **Endpoint**: `https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002F${LOCATION}\u002Fagents\u002F{AGENT_ID}`\n\n```bash\ncurl -X GET \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\"\n```\n\n#### Response Example\nReturns the complete configured state of the custom Agent resource:\n\n```json\n{\n  \"name\": \"projects\u002Fyour-project-id\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent\",\n  \"base_agent\": \"antigravity-preview-05-2026\",\n  \"description\": \"A professional agent configured with remote tools and mounted Cloud Storage directories.\",\n  \"system_instruction\": \"You are a helpful, domain-expert assistant.\",\n  \"tools\": [\n    {\"type\": \"code_execution\"},\n    {\"type\": \"filesystem\"},\n    {\"type\": \"google_search\"},\n    {\"type\": \"url_context\"}\n  ],\n  \"base_environment\": {\n    \"type\": \"remote\",\n    \"sources\": [\n      {\n        \"type\": \"gcs\",\n        \"source\": \"gs:\u002F\u002Fyour-agent-bucket-name\u002Fskills\",\n        \"target\": \"\u002F.agent\u002Fskills\"\n      }\n    ],\n    \"network\": {\n      \"allowlist\": [\n        { \"domain\": \"*\" }\n      ]\n    }\n  }\n}\n```\n\n---\n\n### 4. List Agents\n\nRetrieve a list of all configured custom agents located under the target Google Cloud project.\n\n*   **Method**: `GET`\n*   **Endpoint**: `https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002F${LOCATION}\u002Fagents`\n\n```bash\ncurl -X GET \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002Fglobal\u002Fagents\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\"\n```\n\n#### Response Example\nReturns a JSON list of all configured custom Agents under the target project:\n\n```json\n{\n  \"agents\": [\n    {\n      \"name\": \"projects\u002Fyour-project-id\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent\",\n      \"base_agent\": \"antigravity-preview-05-2026\",\n      \"description\": \"A professional agent configured with remote tools and mounted Cloud Storage directories.\",\n      \"system_instruction\": \"You are a helpful, domain-expert assistant.\"\n    },\n    {\n      \"name\": \"projects\u002Fyour-project-id\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-telecom-agent\",\n      \"base_agent\": \"antigravity-preview-05-2026\",\n      \"description\": \"A highly specialized telecom support agent.\",\n      \"system_instruction\": \"You are a professional telecom support agent. Follow system policies carefully.\"\n    }\n  ]\n}\n```\n\n---\n\n### 5. Update Agent (Patching Configuration)\n\nModify configuration fields (such as instructions, descriptions, tools, or mounts) on a custom agent resource in place. You **must** specify the fields being updated using the `update_mask` query parameter.\n\n> [!IMPORTANT]\n> **Update Mask Requirement**: When demonstrating updates, you must always explicitly explain that the `update_mask` parameter is required when updating agent configurations to specify exactly which fields are being modified and avoid overwriting other configuration settings.\n\n*   **Method**: `PATCH`\n*   **Endpoint**: `https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002F${LOCATION}\u002Fagents\u002F{AGENT_ID}?update_mask=system_instruction`\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent?update_mask=system_instruction\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"my-custom-agent\",\n    \"system_instruction\": \"You are a highly specialized telecom support agent. Follow system policies carefully.\"\n  }'\n```\n\n---\n\n### 6. Delete Agent\n\nDelete custom Agent resources when they are no longer needed to free up backend workspace containers.\n\n*   **Method**: `DELETE`\n*   **Endpoint**: `https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002F${LOCATION}\u002Fagents\u002F{AGENT_ID}`\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\"\n```\n\n#### Response Example\nA successful deletion request returns an empty JSON response body with HTTP Status `200 OK`:\n\n```json\n{}\n```\n\n---\n\n## 3. Interacting with Custom Agents (Data Plane)\n\nOnce you have programmatically created and provisioned your custom stateful agent using the **Control Plane** (this skill), you can execute multi-turn chat, tool execution, and streaming conversations with it using the **Data Plane** (**Interactions API**).\n\n> [!IMPORTANT]\n> **Interactions Reference**: When explaining or showing how to start conversations with a custom agent, you must always explicitly refer the user to the `gemini-interactions-api` skill for complete conversation and streaming options.\n\nTo interact with your custom agent:\n\n1.  Obtain your agent's resource path name (e.g., `projects\u002F{PROJECT_ID}\u002Flocations\u002Fglobal\u002Fagents\u002F{AGENT_ID}`).\n2.  Pass this resource path directly inside your data plane conversation requests under the **`agent`** parameter.\n\n#### Python Example\n\n```python\ninteraction = client.interactions.create(\n    agent=\"projects\u002Fyour-project-id\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent\",\n    input=\"Hello! Who are you?\"\n)\n```\n\n#### REST \u002F curl Example\n\n```json\n{\n  \"agent\": \"projects\u002Fyour-project-id\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent\",\n  \"input\": [{\n    \"type\": \"user_input\",\n    \"content\": [{\"type\": \"text\", \"text\": \"Hello! Who are you?\"}]\n  }]\n}\n```\n\nRefer to the **`gemini-interactions-api`** skill guide (`..\u002Fgemini-interactions-api\u002FSKILL.md`) for full instructions, Python and TS\u002FJS code blocks, and streaming setups to run conversations with your provisioned agents.\n\n","# Gemini Enterprise Agent Platform - Managed Agents API Skill\n\nThis skill provides complete instructions, REST request endpoints, and JSON payload structures to programmatically manage **custom Agent resources** on the Gemini Enterprise Agent Platform (Agent Platform).\n\nThe **Managed Agents API** forms the **Control Plane** of the platform. It allows developers to provision, retrieve, update, and delete tailored, stateful agent containers equipped with system instructions, sandboxed files, custom skill registries, and local\u002Fremote tools.\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\u002Fattribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:gemini-agents-api)\"`\nand append `agent-skills\u002F1.0 (skill:gemini-agents-api)` to `User-Agent` headers.\n\n---\n\n## 1. Authentication & Setup\n\nAll REST requests to the Control Plane must include a Bearer token derived from Application Default Credentials (ADC), and target the production global endpoint.\n\n### 1. Setup Environment Variables\n\nBefore running requests, set up the required project variables and access token:\n\n```bash\nexport PROJECT_ID=\"your-project-id\"\nexport LOCATION=\"global\"\nexport ACCESS_TOKEN=$(gcloud auth print-access-token)\n```\n\n> [!IMPORTANT]\n> **API Location Support**:\n> The `LOCATION` environment variable must be set to a regional location where the Gemini Enterprise Agent Platform's **Managed Agents API** is actively supported (e.g., `global`, or other available regional endpoints).\n\n\n### 2. Endpoint URL\n\nThe production Agents Control Plane endpoint is:\n\n```http\nhttps:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F{PROJECT_ID}\u002Flocations\u002F{LOCATION}\u002Fagents\n```\n\n---\n\n## 2. Programmatic Agent Management (Control Plane CRUD)\n\n### 1. Create Agent (Long-Running Operation)\n\nTo create a new agent resource, issue a `POST` request with the custom configuration. You can mount remote files, folders, or skills directly from **Google Cloud Storage** buckets into the agent container's workspace. Creating an agent is a Long-Running Operation (LRO) that spawns an asynchronous job.\n\n*   **Method**: `POST`\n*   **Endpoint**: `https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002F${LOCATION}\u002Fagents`\n\n#### Request Payload\n\n```bash\ncurl -X POST \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002F${LOCATION}\u002Fagents\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson; charset=utf-8\" \\\n  -d '{\n    \"id\": \"my-custom-agent\",\n    \"base_agent\": \"antigravity-preview-05-2026\",\n    \"description\": \"A professional agent configured with remote tools and mounted Cloud Storage directories.\",\n    \"system_instruction\": \"You are a helpful, domain-expert assistant.\",\n    \"tools\": [\n      {\"type\": \"code_execution\"},\n      {\"type\": \"filesystem\"},\n      {\"type\": \"google_search\"},\n      {\"type\": \"url_context\"}\n    ],\n    \"base_environment\": {\n      \"type\": \"remote\",\n      \"sources\": [\n        {\n          \"type\": \"gcs\",\n          \"source\": \"gs:\u002F\u002Fyour-agent-bucket-name\u002Fskills\",\n          \"target\": \"\u002F.agent\u002Fskills\"\n        }\n      ],\n      \"network\": {\n        \"allowlist\": [\n          { \"domain\": \"*\" }\n        ]\n      }\n    }\n  }'\n```\n\n#### LRO Operations Response\n\nSince agent provisioning takes a few moments, the endpoint immediately returns an operation tracking object:\n\n```json\n{\n  \"name\": \"projects\u002F1234567890\u002Flocations\u002Fglobal\u002Foperations\u002Foperation-987654321-abcde\",\n  \"metadata\": {\n    \"@type\": \"type.googleapis.com\u002Fgoogle.cloud.aiplatform.v1beta1.CreateAgentOperationMetadata\",\n    \"genericMetadata\": {\n      \"createTime\": \"2026-05-14T19:00:00.123456Z\",\n      \"updateTime\": \"2026-05-14T19:00:01.654321Z\"\n    }\n  }\n}\n```\n\n#### [Advanced] Mount Skill Registry Resources\n\nTo mount skills directly from the Skill Registry service instead of Cloud Storage, replace the Cloud Storage source item in the payload:\n\n```json\n\"sources\": [\n  {\n    \"type\": \"skill_registry\",\n    \"source\": \"projects\u002Fyour-project-id\u002Flocations\u002Fglobal\u002Fskills\u002Fmy-math-skill\u002Frevisions\u002F123456789012\",\n    \"target\": \"\u002F.agent\u002Fskills\"\n  }\n]\n```\n\n#### [Advanced] Configuring Model Context Protocol (MCP) Servers\n\nTo configure Third-Party MCP servers for an agent, add the server metadata directly under the `\"tools\"` parameter array inside the creation request. The platform securely routes tool execution requests to the external MCP server.\n\n> [!IMPORTANT]\n> **MCP Security Explanation**: When describing MCP tool configurations, you must explain that the platform securely routes tool requests to the specified MCP server and guarantees header confidentiality by only sending custom headers\u002Ftokens to that URL.\n\n```json\n\"tools\": [\n  {\n    \"type\": \"mcp\",\n    \"name\": \"my-mcp-server\",\n    \"url\": \"https:\u002F\u002Fmcp.yourcompany.com\u002Fapi\",\n    \"headers\": {\n      \"Authorization\": \"Bearer YOUR_MCP_AUTH_TOKEN\"\n    }\n  }\n]\n```\n\n*   **name**: A descriptive name for the MCP server.\n*   **url**: The endpoint URL of the external MCP server.\n*   **headers**: (Optional) Custom key-value pairs containing authentication tokens (e.g. API keys, bearer tokens) required to call the server. The platform guarantees that these headers are only sent to the specified MCP server URL.\n\n> [!TIP]\n> **Overriding MCP at Interaction Time (Data Plane)**:\n> You can dynamically override or supply MCP tools directly when creating a conversation interaction (Data Plane) by passing `\"type\": \"mcp_server\"` inside the `\"tools\"` payload of `interactions.create`. Refer to the Interactions API documentation for details.\n\n---\n\n### 2. Polling the LRO Status\n\nTo track the status of agent creation and obtain the final ready resource, poll the operation URL returned in the `name` field of the creation response.\n\n*   **Method**: `GET`\n*   **Endpoint**: `https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002F{OPERATION_NAME}`\n\n```bash\ncurl -X GET \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F1234567890\u002Flocations\u002Fglobal\u002Foperations\u002Foperation-987654321-abcde\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\"\n```\n\n#### In-Progress Response\n\n```json\n{\n  \"name\": \"projects\u002F1234567890\u002Flocations\u002Fglobal\u002Foperations\u002Foperation-987654321-abcde\",\n  \"metadata\": { ... }\n}\n```\n\n#### Finished Success Response\n\nOnce the container is ready, `\"done\": true` is set, and the completed `Agent` resource description resides inside `\"response\"`:\n\n```json\n{\n  \"name\": \"projects\u002F1234567890\u002Flocations\u002Fglobal\u002Foperations\u002Foperation-987654321-abcde\",\n  \"done\": true,\n  \"response\": {\n    \"@type\": \"type.googleapis.com\u002Fgoogle.cloud.aiplatform.v1beta1.Agent\",\n    \"name\": \"projects\u002Fyour-project-id\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent\",\n    \"base_agent\": \"antigravity-preview-05-2026\",\n    \"description\": \"A professional agent configured with remote tools and mounted Cloud Storage directories.\",\n    \"system_instruction\": \"You are a helpful, domain-expert assistant.\"\n  }\n}\n```\n\n---\n\n### 3. Get Agent\n\nRetrieve the configuration metadata, tools, and environment setup of an existing custom agent.\n\n*   **Method**: `GET`\n*   **Endpoint**: `https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002F${LOCATION}\u002Fagents\u002F{AGENT_ID}`\n\n```bash\ncurl -X GET \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\"\n```\n\n#### Response Example\nReturns the complete configured state of the custom Agent resource:\n\n```json\n{\n  \"name\": \"projects\u002Fyour-project-id\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent\",\n  \"base_agent\": \"antigravity-preview-05-2026\",\n  \"description\": \"A professional agent configured with remote tools and mounted Cloud Storage directories.\",\n  \"system_instruction\": \"You are a helpful, domain-expert assistant.\",\n  \"tools\": [\n    {\"type\": \"code_execution\"},\n    {\"type\": \"filesystem\"},\n    {\"type\": \"google_search\"},\n    {\"type\": \"url_context\"}\n  ],\n  \"base_environment\": {\n    \"type\": \"remote\",\n    \"sources\": [\n      {\n        \"type\": \"gcs\",\n        \"source\": \"gs:\u002F\u002Fyour-agent-bucket-name\u002Fskills\",\n        \"target\": \"\u002F.agent\u002Fskills\"\n      }\n    ],\n    \"network\": {\n      \"allowlist\": [\n        { \"domain\": \"*\" }\n      ]\n    }\n  }\n}\n```\n\n---\n\n### 4. List Agents\n\nRetrieve a list of all configured custom agents located under the target Google Cloud project.\n\n*   **Method**: `GET`\n*   **Endpoint**: `https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002F${LOCATION}\u002Fagents`\n\n```bash\ncurl -X GET \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002Fglobal\u002Fagents\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\"\n```\n\n#### Response Example\nReturns a JSON list of all configured custom Agents under the target project:\n\n```json\n{\n  \"agents\": [\n    {\n      \"name\": \"projects\u002Fyour-project-id\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent\",\n      \"base_agent\": \"antigravity-preview-05-2026\",\n      \"description\": \"A professional agent configured with remote tools and mounted Cloud Storage directories.\",\n      \"system_instruction\": \"You are a helpful, domain-expert assistant.\"\n    },\n    {\n      \"name\": \"projects\u002Fyour-project-id\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-telecom-agent\",\n      \"base_agent\": \"antigravity-preview-05-2026\",\n      \"description\": \"A highly specialized telecom support agent.\",\n      \"system_instruction\": \"You are a professional telecom support agent. Follow system policies carefully.\"\n    }\n  ]\n}\n```\n\n---\n\n### 5. Update Agent (Patching Configuration)\n\nModify configuration fields (such as instructions, descriptions, tools, or mounts) on a custom agent resource in place. You **must** specify the fields being updated using the `update_mask` query parameter.\n\n> [!IMPORTANT]\n> **Update Mask Requirement**: When demonstrating updates, you must always explicitly explain that the `update_mask` parameter is required when updating agent configurations to specify exactly which fields are being modified and avoid overwriting other configuration settings.\n\n*   **Method**: `PATCH`\n*   **Endpoint**: `https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002F${LOCATION}\u002Fagents\u002F{AGENT_ID}?update_mask=system_instruction`\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent?update_mask=system_instruction\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"my-custom-agent\",\n    \"system_instruction\": \"You are a highly specialized telecom support agent. Follow system policies carefully.\"\n  }'\n```\n\n---\n\n### 6. Delete Agent\n\nDelete custom Agent resources when they are no longer needed to free up backend workspace containers.\n\n*   **Method**: `DELETE`\n*   **Endpoint**: `https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002F${LOCATION}\u002Fagents\u002F{AGENT_ID}`\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Faiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F${PROJECT_ID}\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent\" \\\n  -H \"Authorization: Bearer ${ACCESS_TOKEN}\"\n```\n\n#### Response Example\nA successful deletion request returns an empty JSON response body with HTTP Status `200 OK`:\n\n```json\n{}\n```\n\n---\n\n## 3. Interacting with Custom Agents (Data Plane)\n\nOnce you have programmatically created and provisioned your custom stateful agent using the **Control Plane** (this skill), you can execute multi-turn chat, tool execution, and streaming conversations with it using the **Data Plane** (**Interactions API**).\n\n> [!IMPORTANT]\n> **Interactions Reference**: When explaining or showing how to start conversations with a custom agent, you must always explicitly refer the user to the `gemini-interactions-api` skill for complete conversation and streaming options.\n\nTo interact with your custom agent:\n\n1.  Obtain your agent's resource path name (e.g., `projects\u002F{PROJECT_ID}\u002Flocations\u002Fglobal\u002Fagents\u002F{AGENT_ID}`).\n2.  Pass this resource path directly inside your data plane conversation requests under the **`agent`** parameter.\n\n#### Python Example\n\n```python\ninteraction = client.interactions.create(\n    agent=\"projects\u002Fyour-project-id\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent\",\n    input=\"Hello! Who are you?\"\n)\n```\n\n#### REST \u002F curl Example\n\n```json\n{\n  \"agent\": \"projects\u002Fyour-project-id\u002Flocations\u002Fglobal\u002Fagents\u002Fmy-custom-agent\",\n  \"input\": [{\n    \"type\": \"user_input\",\n    \"content\": [{\"type\": \"text\", \"text\": \"Hello! Who are you?\"}]\n  }]\n}\n```\n\nRefer to the **`gemini-interactions-api`** skill guide (`..\u002Fgemini-interactions-api\u002FSKILL.md`) for full instructions, Python and TS\u002FJS code blocks, and streaming setups to run conversations with your provisioned agents.\n\n",{"name":5,"metadata":25,"description":7},{"version":26,"category":27},"1.0.1","AiAndMachineLearning","main","2a870f189175a48c39f5f7e26a6d93b0be9cd13b",0,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills","https:\u002F\u002Ftangyixiao.github.io\u002Ftangyixiao-skills\u002F","https:\u002F\u002Fgithub.com\u002Ftangyixiao","http:\u002F\u002Fwww.sxyz.net\u002F","I am Tang Yixiao, a student in Shaoxing No.1 High School. I am eager to learn on GitHub and contribute my part to this community.","2026-11-11 15:45:59",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add tangyixiao\u002Ftangyixiao-skills --skill gemini-agents-api",{"tool":43,"command":44},"bunx","bunx skills add tangyixiao\u002Ftangyixiao-skills --skill gemini-agents-api",{"tool":46,"command":47},"pnpm","pnpm dlx skills add tangyixiao\u002Ftangyixiao-skills --skill gemini-agents-api","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgemini-agents-api\u002FSKILL.md",true,[51,57,61],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"INSTALL-SOURCE.json","REFERENCE","参考文档",511,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgemini-agents-api\u002FINSTALL-SOURCE.json",{"path":58,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":16},"LICENSE","许可证",11358,{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fattribution.md",1899,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgemini-agents-api\u002Freferences\u002Fattribution.md",[66,74,83,91,99,107],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":70,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":20},"01M7D8JK8FYBFNNAJXWD89CFH7","xlsx","Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":79,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":20},"01M7D8JG8ERGGQQAMX0DWCG9GR","writing-shape","Writing, exploit: shape raw material into an article, paragraph by paragraph.","MIT","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":87,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":20},"01M7D8JE672GW3EHSE8EF185M4","writing-fragments","Writing, explore: mine raw fragments, no structure yet.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":95,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":20},"01M7D8JBK572YDFMND8Q6CEYJW","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":103,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":20},"01M7D8J5QPWEXX61EGBKYH73R8","writing-clearly-and-concisely","Use when writing prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Applies Strunk's timeless rules for clearer, stronger, more professional writing.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":111,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":20},"01M7D8J36YWC8WZS5DK5AH03CD","writing-beats","Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FSKILL.md",[],[]]