WorkerKit

For agents

Set up WorkerKit in Gemini Enterprise.

Have an administrator configure a custom MCP connector, enable the actions your agent needs and verify access. Keep worker instructions, permissions and budgets in WorkerKit.

Before you start

What you need.

A Gemini Enterprise app and an administrator who can manage its connectors and organization policies. Business edition uses a separate team administration interface.

A WorkerKit account admin who can approve the connection and choose its access.

A compatible OAuth client registered for the Enterprise callback, with its authorization URL, token URL, client ID, client secret and scopes available to the administrator.

A remote HTTPS MCP endpoint using StreamableHTTP. A bearer manager key alone does not satisfy Google’s manual OAuth client form.

WhatAddressWhy
WorkerKit MCPhttps://mcp.workerkit.ai/workersFleet operations and kit discovery, after compatible OAuth is configured.
Knowledge MCPhttps://mcp.workerkit.ai/knowledgeOptional separate connection for published reports, with the same OAuth prerequisite.
Google’s Enterprise MCP guidehttps://docs.cloud.google.com/gemini/enterprise/docs/connectors/custom-mcp-server/set-up-custom-mcp-serverCloud console setup and administrator requirements.
Google’s Business edition guidehttps://support.google.com/g/answer/17106276The team-managed setup; Google labels this connector Pre-GA.
AI accesshttps://workerkit.ai/fleet-accessWhere an account admin creates the manager key. Admin only.
Skill filehttps://workerkit.ai/gemini-enterprise/SKILL.mdThe tool reference and the operating rules the agent keeps after setup.
Kit-authoring skillhttps://workerkit.ai/build/SKILL.mdThe procedure for building, validating and publishing a kit of your own. Load it when the person wants a custom worker.
This guide as markdownhttps://workerkit.ai/gemini-enterprise/setup.mdThe same steps, for an agent that reads markdown rather than a page.

Gemini Enterprise exposes custom tools and APIs through MCP connectors. Use the WorkerKit MCP server for fleet operations and kit discovery.

For an eligible personal Google Account, the Gemini app guide covers custom Connected Apps. Enterprise is not the only Gemini product with custom MCP support.

The case for connecting at all is on the Gemini Enterprise page.

Step 0. WorkerKit and Google administrators

Prepare connector authentication.

Have an administrator register a compatible client and keep its credentials in protected settings.

A compatible client must accept https://vertexaisearch.cloud.google.com/oauth-redirect. Google’s form asks for authorization and token URLs, a client ID, client secret and scopes; confirm PKCE and token authentication compatibility with the server as well.

Use the OAuth client credentials supplied for this connector. Keep secrets out of chats, agent instructions and knowledge files.

Step 1. Google administrator

Create the custom MCP connection.

Use your edition’s administrator flow and the credentials prepared in step 1.

  1. 01

    Google Cloud-managed Enterprise

    In the Gemini Enterprise console, select your app, then Connected Data Stores, New data store and Custom MCP Server. Follow Google’s guide for the required role and organization policy allowances.

  2. 02

    Business edition

    Use Settings and help, your team, Manage team, Connected apps, then Add MCP server. Follow the Business edition guide for its OAuth form; this flow is Pre-GA.

Use https://mcp.workerkit.ai/workers with OAuth and the confirmed client configuration. Keep credentials in the connector’s protected configuration.

Step 2. Google administrator

Enable only the required actions.

A created data store does not automatically make its tools available.

In the Cloud console data store, open Actions, reload custom actions and enable the tools needed for the job. Start with key_info and read operations. Enabling a tool does not grant its WorkerKit scope.

For workflows, an administrator must enable Workflow Builder. An agent step can authorize connectors through Tools & Integrations; deterministic MCP steps are another option. See Google’s workflow instructions.

Step 3. Agent, only after connection succeeds

Check scopes and read the fleet.

Prove authenticated read access before asking a worker to act.

If the fleet is empty after workers_list and runs_feed, the connection is working. New accounts have no workers yet. Skip the run commands and continue to the first-worker step.

If the fleet has workers, pick one whose effects are reads. Judge it from the instruction and the permissions, never from the name: a worker whose apps are all read-level and whose instruction only gathers, summarises or reports is safe to run; one that sends, posts, writes, orders or pays is not, whatever it is called. If none is clearly read-only, run one with an explicit prompt for that run bounding it to a read.

  • 1. The directory is alive: confirm a kit count comes back directory_overview
  • 2. The fleet list: report how many workers the assistant can see workers_list
  • 3. Recent runs across the fleet: confirms readRuns runs_feed { "limit": 5 }
  • 4. Before running anything, read what that worker does and what it may touch. Both ride on readWorkers, and this is the step that decides whether the run is safe instruction_get worker_permissions_get
  • 5. Run it with the person's approval, then poll every 3 to 5 seconds until a terminal event arrives: run.succeeded, run.failed, run.blocked or run.awaiting_input worker_run run_events { "afterSeq": <lastSeq> }
  • 6. Read the receipt: costAuthority first, then modelCostUsd run_get

Read costAuthority first, then modelCostUsd beside it, and report both. A null finalDigest is not a failure: a run produces one only when its harness wrote a report. A costAuthority of unbilled_estimate, none or in_flight is not a failure either; it says how far to trust the number, and the operating rules below say what each value means.

A Skipped run is also a pass, and it is the cost brake working: the gate refused the run before any money moved. Report the skipReason rather than retrying. Then report the fleet size, the active scopes, and what the test cost, and the fleet is live.

Step 4. Agent author

Keep the operating instructions.

Make the WorkerKit rules available to the connected agent.

Read https://workerkit.ai/gemini-enterprise/SKILL.md. Put the relevant operating rules into the agent’s instructions without the YAML header, and keep the tool reference available through supported knowledge or retrieval. Linking the URL alone does not install a skill.

Require key_info at the start of a fleet session and approval before running, installing or changing workers. An enabled Enterprise action still cannot exceed the WorkerKit access granted at consent.

Classification on demand

Create a decision worker from your questions.

Categorize, score or triage connected data, then reuse and adjust the worker.

Reuse an existing worker or decision kit when its questions fit. For a custom classification task, creation compiles a supported source recipe and typed questions into a private kit and an installed decision worker. Optional deploy:true adds deployment; creation never starts a run or adds a schedule. The kit can be edited and published later through the normal kit lifecycle.

On the workers connection, call kit_app_tools(purpose:"decision") for recipes, argument schemas, permissions and examples, then kit_authoring_guide(section:"decision"). Check account connections with apps_list; public discovery does not check them. Send the request to decision_worker_create, follow nextCall, then use worker_run and run_get. Running needs runWorkers; results need readRuns. Use instruction_get / instruction_set for saved category or level answers, or answers on one run. Structural question/source changes need a revised kit and a replacement install. Check receipt status, coverage, omissions, warnings and cost before claiming completion.

Start with email-previews, calendar-events or sheets-rows. These recipes return judgments without app writes. Email previews do not include full threads; calendar events are invitation data, not transcripts; Sheets needs a Google file ID, a finite tab-qualified range and a columns map. A connected app alone does not make every tool a supported source. Source filters select evidence, not permissions: the Sheets recipe grants spreadsheet reads across the linked Drive account.

Supply 1–8 questions: choice with named options, score with ordered levels, or noul for the probability of a statement. Choice adds unclear automatically. Set an explicit confidenceFloor between 0 and 1; it routes uncertainty and does not promise accuracy. maxItems is 1–50, default 20. Creation requires createWorkers; optional deployment also needs manageDeployments.

Use a fresh requestId for each new worker. Retry with the same ID and identical body to recover the original receipt; a changed body returns 409. The response includes tokenId for MCP/CLI worker commands, stable workerId, kitSlug, readiness and nextCall. A deploymentError means the worker already exists: fix deployment on that worker. The receipt is a snapshot; check current worker readiness before running. No worker API secret is returned.

The workers connection includes discovery and authoring, so classification needs one MCP connection. Its full profile includes fleet management, app resource discovery, kit authoring and public directory reads. For a smaller list, a client that supports custom headers can send X-WorkerKit-Profile: decision on every request, including initialization, listing and calls, to select the smaller workflow tool set. A server operator can instead set MCP_WORKERS_PROFILE=decision. The endpoint and existing sign-in stay the same; a profile grants no additional permissions. Reconnect and relist after changing profiles. Use the advertised tool list: fleet administration, publishing, Action worker and event-stream tools require the full profile. Successful responses include structured content and a text fallback; creation declares an output schema.

Read the request example and full contract.

App tools, no model

Call app tools through an Action worker.

One exact app operation per call, with the inputs you supply.

An Action worker (modelType: "none") exposes 1 to 64 selected app tools and has no model, instruction, schedule or deployment. Each call invokes one tool with the arguments the caller sends, under the worker's own app access, and readiness.canInvoke on worker_get says whether its tools can be called now. Run and deploy requests answer 400 action_worker_requires_invoke.

On the workers connection's full profile: action_worker_options lists apps with no tools selected; pass an explicit app for schemas and defaults (readWorkers). action_worker_create requires an explicit app or actionSpec and copies the selected app's default tools, or takes an actionSpec of 1 to 64, plus a slackConnectionId for Slack tools when the account has more than one Slack bot (createWorkers); worker_tools lists the saved tools (readWorkers); worker_tool_call calls one with arguments, plus an idempotencyKey on a write (invokeActions); worker_tool_invocation reads a write's receipt (invokeActions). Pass the returned tokenId. kits_search(modelType:"none") finds Action kits; install one with kit_install and no deploy.

An explicit actionSpec needs no app and can span native or reviewed MCP apps. Private API tools require a dashboard binding to a published version; they are not actionSpec refs.

A write tool (readOnly: false) needs an idempotency key. Repeating the key with the same arguments returns the stored receipt (a confirmation, not the app's response) without calling the app again; with other arguments it is a 409. A call answers with status succeeded, denied, failed, in_progress or outcome_unknown; branch on it, not on the HTTP code. On outcome_unknown the write may have happened: never resend it automatically, under any key; read the receipt and check the app. Each call counts toward the worker's daily request limit; a refusal marked retryable, such as usage_limit, is retried later under a new key. Only the owner changes the selected tools, in the dashboard.

Read the call examples.

Least privilege

What each scope grants.

The key's scopes are exactly its reach, and a refusal names the scope it wanted. Start with the reads and add scopes as the work asks for them.

ScopeWhat it grants
readWorkersThe fleet list, worker detail, fleet health, account usage, an Action worker's tools, and reads of memory, schedules and the instruction.
readRunsRun history, run detail, run events, a run's stored transcript, and activity feeds and counts of runs, app calls and configuration changes. A receipt returned by a waiting run request is run content too: without this scope the run still starts and the receipt comes back with contentWithheld.
runWorkersRun now, one worker or up to 20 in one call, and cancel.
invokeActionsCall an Action worker's selected tools and read the receipts of its writes. Cannot change the tools, connection or permissions. Existing keys need explicit re-scoping.
manageMemoryAdd, edit, retire and delete rules and facts; clear a run's report; grade a run.
manageSchedulesCreate, edit and delete schedules, and set a worker's own time zone.
manageInstructionsCreate or replace a language worker's instruction, and answer a decision worker's install questions.
manageStateStart and stop a worker.
installKitsPreview and install a directory kit as a new worker.
manageAppsAndWorkersChange what an existing worker may reach: replace its app set (account Admin) and fill, re-point or clear its grants to call other workers. Rules, identities and MCP tool bindings stay in the dashboard.
manageDeliveriesCreate, edit and delete run-result delivery destinations: where the platform sends a run report when the worker finishes. Reading them rides on readWorkers. Availability is judged per account, so ask the channels operation rather than inferring it from the worker apps.
manageBudgetsRead and change a worker's spend and run ceilings and the fleet ceiling; read spend by worker, day and model, plus wallet charges with whole-account reach. Its own scope because raising a dollar cap is the one management action that can cost money without starting anything.
createWorkersCreate an Action worker or a decision worker from scratch in one call, and clone a worker into new ones, singly or in bulk, with a dry-run preview. A clone carries only permissions a person already approved on the source, while a worker created from scratch gets the app access its request asks for, so this is a separate power from installing a reviewed kit.
publishKitsAuthor kits: validate (a dry run that reports every gate at once), publish from content or from an owned worker, edit, replace, unlist, relist, make private, delete, and edit the publisher profile. A private kit installed with installKits is how a worker is built from scratch through the reviewed manifest pipeline. The anonymous Directory API serves the authoring guide, the live permission vocabulary and the per-app tool explorer; reads of your own kits ride on readWorkers.
manageConnectionsConnect and disconnect apps for your operators by credential: every family the Apps page accepts by paste (bot tokens, API keys, private-app tokens), validated live against the provider, stored encrypted, never returned; register your account's own MCP servers as custom MCP apps (with their credentials) and enable their tools; and set or remove your account's own model-provider keys. Reading which apps are connected, with a recipe for connecting each, rides on readWorkers. Google, Microsoft, GitHub and Reddit are browser sign-ins and stay on the Apps page.
manageDeploymentsDeploy a worker onto the hosted runtime and manage that deployment: its model and reasoning, its transcript setting, its spend ceilings, pause and resume, and undeploy. This is the step that makes an installed worker run at all: without a deployment it fires no schedule and a run request is refused with not_deployed. An Action worker is never deployed. Reading the deployment and the model catalog rides on readWorkers.
deleteWorkersDelete a worker permanently: its key stops working, its schedules stop firing, and its instruction, memory, deployment and delivery destinations go with it — as do its sub-workers, because a dead orchestrator must never leave live workers behind. Not reversible by any call, which is why it is its own scope rather than part of start/stop: stopping a worker is reversible and this is not. Run receipts survive, and the freed worker slot is what clears a 402 limit_exceeded on install.
readWalletRead spendable wallet balance, fees and account checkout status.
requestWalletTopUpCreate a human-confirmed Stripe Checkout link and inspect purchases requested by this key. Does not authorize charging a saved card.
discoverAppResourcesDiscover private setup metadata across your workspaces: connected GitHub accounts, repositories and branches, and Slack workspaces and conversation IDs. Does not read contents or grant worker access. Existing keys need explicit re-scoping.
managePrivateApiAppsDefine account-private API operations, worker bindings and private kits. Connection changes also require manageConnections.
readKnowledgeDiscover sources, search published reports, read evidence and reconcile changes. Publication, reader grants and credential worker limits still apply; no transcript or source-app access.
manageKnowledgeRead and replace company Knowledge settings. Requires current account Admin authority and an unrestricted worker ceiling. Existing keys need explicit re-scoping.

Operating rules

What the agent follows on every call.

The same rules the skill file carries, so a session that read neither still has them. Every row is a fact of the platform, not advice.

RuleWhat it means
Two access controlsGoogle controls which connector actions an agent may use. WorkerKit separately checks the connection’s scopes and each worker’s app permissions. Both must allow the operation.
Credentials stay in configurationNever paste a manager key or OAuth client secret into a chat, agent instructions or knowledge file.
Read the key before planningCall key_info first in any session that touches the fleet, and plan against the scopes it returns. It also carries serverTimeUtc, which every age and deadline below is measured against.
Confirm before changing the fleetRunning, stopping, deleting or editing a worker changes the person's fleet: state the exact worker and action in plain words and get approval first, unless the person already approved that exact action. Publishing, unlisting or deleting a kit affects the directory and other installers, so confirm those too. An Action tool call that writes needs the same approval, naming the tool and its arguments.
Know what a run will do before you start itA run can send mail, post, write or spend, and the person approving it is trusting your reading of the worker. Read instruction_get and worker_permissions_get first (both ride on readWorkers) and say what the run will touch.
The key is not a secret to repeatIt travels once, where the platform takes credentials, and after that it is sent for you. Never repeat it in a later message, print it, log it, or write it into memory, a skill or a shared file. A key that has been somewhere it should not be is revoked and replaced at AI access in under a minute.
An empty fleet has a next stepA new account has no workers until someone installs a kit, creates a decision worker or clones one. Say so plainly, then offer the two paths: the person installs a kit from its page in one click, or, with installKits, you shortlist with kits_search, preview with kit_install_preview and install with kit_install once they approve. Never invent a worker id to have something to run.
Rate limits, per accountThe fleet surface allows 120 requests a minute and 1,200 an hour; run triggers 30 a minute; run-event polls 120 a minute and 2,400 an hour, exempt from the surface windows; the kits surface 60 a minute; kit installs 10 an hour; Action routes 120 a minute in a window of their own. On a 429, wait out Retry-After. Extra machines buy no extra budget.
Watching runsPoll run_events every 3 to 5 seconds and pass afterSeq so each call returns only what is new. To watch the whole fleet, hold runs_feed with wait: one connection covers every worker, up to four held per account, and it always returns within the wait. fleet_pulse gives the in-flight rows beside it.
Brief from fleet_healthWhen the person asks how the fleet is doing, call fleet_health once instead of crawling workers_list, worker_get and runs_feed: it lists the workers that are blocked, the ones installed but never deployed, the schedules the runtime is not picking up, the runs waiting on an answer, and the last runs that did not end clean. Empty sections are the healthy answer; paused workers are counted, not listed, because stopping one is a decision.
Check account_usage before spendingBefore an install, a deploy or a run, read account_usage: worker slots, hosted slots, spendable wallet balance and request windows. With requestWalletTopUp and permission for the amount, request a wallet_checkout_create link for the person to pay. Otherwise hand them topUpUrl. Only credited confirms committed funds.
404 not_foundThe worker is missing or belongs to another account, and the two are indistinguishable by design. Never claim which.
403 OPERATION_NOT_ALLOWEDThe key lacks a scope, and the message names it. A wider key is the fix, not a retry.
TimeCompute every age, deadline and countdown against the response's serverTimeUtc (on key_info, workers_list, fleet_pulse and fleet_health), never against your own clock.
Skipped is the brake workingA Skipped run is a receipt, not a transport error: the gate refused it before any money moved. Read skipReason (DailyRunCap, DailySpendCap, FleetSpendCap, ConcurrencyLimit, InsufficientCredits, DeploymentPaused, TokenDisabled or a readiness reason) and retry only when the reason clears on its own.
MoneyRead costAuthority before the number beside it: settled, unbilled_estimate, none or in_flight. modelCostUsd is the settled figure; costSoFarUsd exists only while a run is Running.
Cloning multiplies ceilingsA clone carries the source worker's per-run and per-day ceilings, so read fleet_budget_get before worker_clone_bulk and size the fleet ceiling for the copies you are about to make.

Quick answers

Symptoms, causes, fixes.

SymptomCause and fix
Authentication does not completeCheck the registered redirect URL, authorization and token URLs, client credentials, scopes, PKCE and token authentication method with your administrator.
The connector exists but no tool is availableCheck Google’s enabled actions and, for a workflow agent step, Tools & Integrations authorization. Then check WorkerKit scopes with key_info.
No authentication returns an authorization errorThe WorkerKit fleet endpoint is protected. Google’s No authentication option does not bypass that requirement.
401 on the fleet surfaceRead the code rather than guessing: auth_required means the Authorization header never arrived, which is a wiring problem and not a key problem, and auth_failed means the key is unknown or revoked. Re-send it spelled exactly Authorization: Bearer pe_mgr_... and it connects.
403 OPERATION_NOT_ALLOWEDA scope is missing. Read key_info; an admin re-scopes the key at AI access or creates a new one, and the new key drops into the same place (the snapshot rule).
404 not_found on a workerMissing, or on another account. Verify the id, and that the key belongs to the account that owns the fleet.
429Rate limited. Honour Retry-After; the per-account windows are in the operating rules above.
Empty fleet on a new accountExpected, and not a fault: an account has no workers until someone installs a kit, creates a decision worker or clones one. The setup is proved already, because the key authenticated and the reads answered. Install a kit to fill it.
Empty fleet, or the wrong workers, on an account that has someThe key was created in a different WorkerKit account. Create it in the account that owns the fleet.

Each WorkerKit failure names itself in the response, so an agent never has to guess which one it met: read the code, apply the row, and carry on.