gemini-agents-api
A skill to manage Gemini Enterprise Agent resources like files, skills, and tools through the Control Plane API.
Install
mkdir -p .claude/skills/gemini-agents-api && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14991" && unzip -o skill.zip -d .claude/skills/gemini-agents-api && rm skill.zipInstalls to .claude/skills/gemini-agents-api
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
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.Key capabilities
- →Create custom agent resources
- →Update agent configurations
- →List existing agent resources
- →Delete agent resources
- →Mount files and skills to agents
How it works
The skill uses REST requests with JSON payloads to perform CRUD operations on custom agent resources on the Gemini Enterprise Agent Platform.
Inputs & outputs
When to use gemini-agents-api
- →Provisioning new custom agents
- →Updating agent system instructions
- →Mounting sandboxed files to agents
- →Configuring custom skill registries
- →Managing agent lifecycle via API
About this skill
Gemini Enterprise Agent Platform - Managed Agents API Skill
This 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).
The 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/remote tools.
1. Authentication & Setup
All REST requests to the Control Plane must include a Bearer token derived from Application Default Credentials (ADC), and target the production global endpoint.
1. Setup Environment Variables
Before running requests, set up the required project variables and access token:
export PROJECT_ID="your-project-id"
export LOCATION="global"
export ACCESS_TOKEN=$(gcloud auth print-access-token)
[!IMPORTANT] API Location Support: The
LOCATIONenvironment 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).
2. Endpoint URL
The production Agents Control Plane endpoint is:
https://aiplatform.googleapis.com/v1beta1/projects/{PROJECT_ID}/locations/{LOCATION}/agents
2. Programmatic Agent Management (Control Plane CRUD)
1. Create Agent (Long-Running Operation)
To 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.
- Method:
POST - Endpoint:
https://aiplatform.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents
Request Payload
curl -X POST "https://aiplatform.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "Content-Type: application/json; charset=utf-8" \
-d '{
"id": "my-custom-agent",
"base_agent": "antigravity-preview-05-2026",
"description": "A professional agent configured with remote tools and mounted Cloud Storage directories.",
"system_instruction": "You are a helpful, domain-expert assistant.",
"tools": [
{"type": "code_execution"},
{"type": "filesystem"},
{"type": "google_search"},
{"type": "url_context"}
],
"base_environment": {
"type": "remote",
"sources": [
{
"type": "gcs",
"source": "gs://your-agent-bucket-name/skills",
"target": "/.agent/skills"
}
],
"network": {
"allowlist": [
{ "domain": "*" }
]
}
}
}'
LRO Operations Response
Since agent provisioning takes a few moments, the endpoint immediately returns an operation tracking object:
{
"name": "projects/1234567890/locations/global/operations/operation-987654321-abcde",
"metadata": {
"@type": "type.googleapis.com/google.cloud.aiplatform.v1beta1.CreateAgentOperationMetadata",
"genericMetadata": {
"createTime": "2026-05-14T19:00:00.123456Z",
"updateTime": "2026-05-14T19:00:01.654321Z"
}
}
}
[Advanced] Mount Skill Registry Resources
To mount skills directly from the Skill Registry service instead of Cloud Storage, replace the Cloud Storage source item in the payload:
"sources": [
{
"type": "skill_registry",
"source": "projects/your-project-id/locations/global/skills/my-math-skill/revisions/123456789012",
"target": "/.agent/skills"
}
]
[Advanced] Configuring Model Context Protocol (MCP) Servers
To 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.
"tools": [
{
"type": "mcp",
"name": "my-mcp-server",
"url": "https://mcp.yourcompany.com/api",
"headers": {
"Authorization": "Bearer YOUR_MCP_AUTH_TOKEN"
}
}
]
- name: A descriptive name for the MCP server.
- url: The endpoint URL of the external MCP server.
- 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.
[!TIP] Overriding MCP at Interaction Time (Data Plane): 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 ofinteractions.create. Refer to the Interactions API documentation for details.
2. Polling the LRO Status
To 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.
- Method:
GET - Endpoint:
https://aiplatform.googleapis.com/v1beta1/{OPERATION_NAME}
curl -X GET "https://aiplatform.googleapis.com/v1beta1/projects/1234567890/locations/global/operations/operation-987654321-abcde" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "Content-Type: application/json"
In-Progress Response
{
"name": "projects/1234567890/locations/global/operations/operation-987654321-abcde",
"metadata": { ... }
}
Finished Success Response
Once the container is ready, "done": true is set, and the completed Agent resource description resides inside "response":
{
"name": "projects/1234567890/locations/global/operations/operation-987654321-abcde",
"done": true,
"response": {
"@type": "type.googleapis.com/google.cloud.aiplatform.v1beta1.Agent",
"name": "projects/your-project-id/locations/global/agents/my-custom-agent",
"base_agent": "antigravity-preview-05-2026",
"description": "A professional agent configured with remote tools and mounted Cloud Storage directories.",
"system_instruction": "You are a helpful, domain-expert assistant."
}
}
3. Get Agent
Retrieve the configuration metadata, tools, and environment setup of an existing custom agent.
- Method:
GET - Endpoint:
https://aiplatform.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents/{AGENT_ID}
curl -X GET "https://aiplatform.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/global/agents/my-custom-agent" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "Content-Type: application/json"
Response Example
Returns the complete configured state of the custom Agent resource:
{
"name": "projects/your-project-id/locations/global/agents/my-custom-agent",
"base_agent": "antigravity-preview-05-2026",
"description": "A professional agent configured with remote tools and mounted Cloud Storage directories.",
"system_instruction": "You are a helpful, domain-expert assistant.",
"tools": [
{"type": "code_execution"},
{"type": "filesystem"},
{"type": "google_search"},
{"type": "url_context"}
],
"base_environment": {
"type": "remote",
"sources": [
{
"type": "gcs",
"source": "gs://your-agent-bucket-name/skills",
"target": "/.agent/skills"
}
],
"network": {
"allowlist": [
{ "domain": "*" }
]
}
}
}
4. List Agents
Retrieve a list of all configured custom agents located under the target Google Cloud project.
- Method:
GET - Endpoint:
https://aiplatform.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents
curl -X GET "https://aiplatform.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/global/agents" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "Content-Type: application/json"
Response Example
Returns a JSON list of all configured custom Agents under the target project:
{
"agents": [
{
"name": "projects/your-project-id/locations/global/agents/my-custom-agent",
"base_agent": "antigravity-preview-05-2026",
"description": "A professional agent configured with remote tools and mounted Cloud Storage directories.",
"system_instruction": "You are a helpful, domain-expert assistant."
},
{
"name": "projects/your-project-id/locations/global/agents/my-telecom-agent",
"base_agent": "antigravity-preview-05-2026",
"description": "A highly specialized telecom support agent.",
"system_instruction": "You are a professional telecom support agent. Follow system policies carefully."
}
]
}
5. Update Agent (Patching Configuration)
Modify 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.
- Method:
PATCH - Endpoint:
https://aiplatform.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents/{AGENT_ID}?update_mask=system_instruction
curl -X PATCH "https://aiplatform.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/global/agents/my-custom-agent?update_mask=system_instruction" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "my-custom-agent",
"system_instruction": "You are a highly specialized telecom support agent. Follow system policies carefully."
}'
6. Delete Agent
Delete custom Agent resources when they are no longer needed to free up backend workspace containers.
- Method:
DELETE - Endpoint: `https://aiplatform.googleapis.com/
Content truncated.
When not to use it
- →When interacting with provisioned agents for conversations
- →When dynamic MCP server overrides are needed at interaction time
Prerequisites
Limitations
- →Requires a regional location where the Managed Agents API is supported
- →Agent creation is a Long-Running Operation (LRO)
- →Interaction with custom agents occurs via the Data Plane (Interactions API)
How it compares
This skill programmatically manages agent provisioning and configuration, which differs from manual setup or direct conversational interaction.
Compared to similar skills
gemini-agents-api side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| gemini-agents-api (this skill) | 0 | 2mo | Review | Intermediate |
| mcp-builder | 136 | 3mo | Review | Advanced |
| mcp-integration | 21 | 9mo | Review | Intermediate |
| opencode-orchestrator-creator | 8 | 9mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by YanBerdin
View all by YanBerdin →You might also like
mcp-builder
anthropics
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
mcp-integration
anthropics
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context Protocol", "connect external service", mentions "${CLAUDE_PLUGIN_ROOT} with MCP", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.
opencode-orchestrator-creator
IgorWarzocha
Creates universal OpenCode orchestrator folder structure with specialized agent that can manage swarm servers via curl commands
claude-opus-4-5-migration
anthropics
Migrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5. Use when the user wants to update their codebase, prompts, or API calls to use Opus 4.5. Handles model string updates and prompt adjustments for known Opus 4.5 behavioral differences. Does NOT migrate Haiku 4.5.
mcp-management
mrgoonie
Manage Model Context Protocol (MCP) servers - discover, analyze, and execute tools/prompts/resources from configured MCP servers. Use when working with MCP integrations, need to discover available MCP capabilities, filter MCP tools for specific tasks, execute MCP tools programmatically, access MCP prompts/resources, or implement MCP client functionality. Supports intelligent tool selection, multi-server management, and context-efficient capability discovery.
n8n-mcp-orchestrator
manutej
Expert MCP (Model Context Protocol) orchestration with n8n workflow automation. Master bidirectional MCP integration, expose n8n workflows as AI agent tools, consume MCP servers in workflows, build agentic systems, orchestrate multi-agent workflows, and create production-ready AI-powered automation pipelines with Claude Code integration.