For agents
Set up WorkerKit in Grok Bot.
Connect WorkerKit to discover kits and manage workers. You approve access and enter the key in protected settings. Grok Bot prepares the job and returns the result.
Before you start
What you need.
A WorkerKit account with admin access to create a manager key. The Free plan is enough; no card needed.
Grok Bot with support for custom MCP servers and protected credential settings for the key.
To run workers: connected apps, an enabled deployment, model funding and available budget.
| What | Address | Why |
|---|---|---|
| WorkerKit MCP | https://mcp.workerkit.ai/workers | The default connection for kit discovery and worker management. Requires a scoped manager key. |
| Knowledge MCP | https://mcp.workerkit.ai/knowledge | Search and read published worker reports. Uses the same key with readKnowledge; configuration needs manageKnowledge. |
| AI access | https://workerkit.ai/fleet-access | Where an account admin creates the manager key. Admin only. |
| Skill file | https://workerkit.ai/grok-bot/SKILL.md | The tool reference and the operating rules the agent keeps after setup. |
| Kit-authoring skill | https://workerkit.ai/build/SKILL.md | The procedure for building, validating and publishing a kit of your own. Load it when the person wants a custom worker. |
| This guide as markdown | https://workerkit.ai/grok-bot/setup.md | The same steps, for an agent that reads markdown rather than a page. |
Grok Bot connects to the hosted WorkerKit MCP server. See AI workers for Grok Bot for use cases.
workerkit.ai/mcp is documentation. Use the MCP server addresses in the table above.
Step 1. Human
Create the manager key.
An account admin creates a key at workerkit.ai/fleet-access, picks its scopes and copies it once. The agent cannot do this part.
- 01
Sign in as the account that owns the fleet
At workerkit.ai. Someone who belongs to several accounts confirms the active one first: a key created in the wrong account shows up later as an empty fleet, and checking now saves that round trip.
- 02
Open AI access
workerkit.ai/fleet-access is an admin-only page. A member sees a notice saying so rather than a broken page.
- 03
Create a manager key named for its purpose
"Grok Bot" is a good name. A purpose-specific name makes the key easy to audit, and easy to revoke later without touching anything else.
- 04
Pick its scopes
The table below says what each one grants. Start with the reads and add only the scopes needed for the approved task. Choose an expiry and request fresh approval when more access is needed.
- 05
Copy the key once
It is shown at creation and never again, so keep it to hand for step 2. It becomes the Authorization header on the fleet mount. No scope gives it app credentials, but invokeActions returns an Action worker's tool results, so grant it only where an agent should call those tools.
| Scope | What it grants |
|---|---|
readWorkers | The fleet list, worker detail, fleet health, account usage, an Action worker's tools, and reads of memory, schedules and the instruction. |
readRuns | Run 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. |
runWorkers | Run now, one worker or up to 20 in one call, and cancel. |
invokeActions | Call 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. |
manageMemory | Add, edit, retire and delete rules and facts; clear a run's report; grade a run. |
manageSchedules | Create, edit and delete schedules, and set a worker's own time zone. |
manageInstructions | Create or replace a language worker's instruction, and answer a decision worker's install questions. |
manageState | Start and stop a worker. |
installKits | Preview and install a directory kit as a new worker. |
manageAppsAndWorkers | Change 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. |
manageDeliveries | Create, 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. |
manageBudgets | Read 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. |
createWorkers | Create 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. |
publishKits | Author 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. |
manageConnections | Connect 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. |
manageDeployments | Deploy 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. |
deleteWorkers | Delete 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. |
readWallet | Read spendable wallet balance, fees and account checkout status. |
requestWalletTopUp | Create a human-confirmed Stripe Checkout link and inspect purchases requested by this key. Does not authorize charging a saved card. |
discoverAppResources | Discover 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. |
managePrivateApiApps | Define account-private API operations, worker bindings and private kits. Connection changes also require manageConnections. |
readKnowledge | Discover sources, search published reports, read evidence and reconcile changes. Publication, reader grants and credential worker limits still apply; no transcript or source-app access. |
manageKnowledge | Read and replace company Knowledge settings. Requires current account Admin authority and an unrestricted worker ceiling. Existing keys need explicit re-scoping. |
| Key | Scopes | What Grok Bot can then do |
|---|---|---|
| Observer | readWorkers, readRuns | Describe the fleet and everything it has done, and change nothing. Most of the first session's value is here. |
| Operator | add runWorkers, invokeActions, manageState, manageDeliveries | Run workers now, call Action worker tools, start and stop them, and route their reports. |
| Full automation | add manageSchedules, manageMemory, manageInstructions, manageBudgets, createWorkers | Schedule, teach, rewrite, cap and clone workers, and create Action or decision workers from scratch. manageInstructions rewrites a worker's tested method, so it is the one to add last. |
| Builder | add installKits, publishKits, manageConnections, manageDeployments, deleteWorkers | Install directory kits as new workers, author and publish kits, connect apps by credential and register your own MCP servers. installKits is the one a brand-new account wants first, because it is what puts a worker in an empty fleet. manageDeployments is what puts an installed worker on the hosted runtime: without it the worker exists but never runs, and worker_run answers not_deployed. |
A key carries the scopes it was granted when it was created. Granting a scope later never reaches an existing key: if a call answers 403 OPERATION_NOT_ALLOWED, an admin re-scopes the key at AI access or creates a new one, and the new key drops into the same header. Read key_info rather than assuming.
Step 2. Human and agent
Add WorkerKit.
Connect WorkerKit with the key from step 1 to discover kits and manage workers. Grok Bot asks you to confirm before adding it.
- 01
Add WorkerKit with the key
Name the connection WorkerKit and use https://mcp.workerkit.ai/workers. Enter Authorization: Bearer pe_mgr_... in protected credential settings using the key from step 1. Call key_info to verify the account and scopes.
- 02
Add Knowledge MCP when needed
Add WorkerKit Knowledge at https://mcp.workerkit.ai/knowledge to search and read published reports. Use the same key with readKnowledge. To configure publication and reader access, also grant manageKnowledge.
- 03
Confirm each add when Grok Bot asks
Grok Bot asks for an explicit yes before adding each connection. Review its name, URL and authentication, then confirm.
- 04
Where the key lives afterwards
Keep the key out of chat. If the client accepts keys only in chat, stop fleet setup and use another client. Check that protected credential settings exist; never assume. Revoke exposed keys at AI access.
- Paste into Grok Bot
Help me connect WorkerKit: Add WorkerKit at https://mcp.workerkit.ai/workers for kit discovery and worker management. I will enter the scoped manager key in protected credential settings, outside chat. Ask me to confirm the connection, then call key_info and workers_list. Report the account, scopes and worker count.
Use streamable HTTP.
Step 3. Agent
Verify the scopes.
Call key_info on WorkerKit to check the account and granted scopes.
- Verify WorkerKit access (no arguments)
key_info
key_info returns the account, key name, scopes, expiry and serverTimeUtc. Confirm the account and scopes match the approved access. If a scope is missing, an admin must re-scope or replace the key at AI access.
Step 4. Agent
Keep the WorkerKit skill.
Save https://workerkit.ai/grok-bot/SKILL.md the way this bot saves skills, or re-read the URL at the start of any session that touches the fleet.
- Save this as a bot skill named WorkerKit
https://workerkit.ai/grok-bot/SKILL.md
Save the reference as a Grok Bot skill named WorkerKit. It contains the tools, cost fields and operating rules. Grok Bot does not load skills from local folders.
If the bot cannot save skills, fetch the reference at the start of each WorkerKit session.
Step 5. Agent
Run the smoke test.
Verify the connection with fleet reads. For the first job, review the worker, deployment, funding and budget, run the approved task and inspect its result and delivery.
If the fleet is empty, the successful reads confirm the account connection. Continue to step 6 to install the first worker, connect its apps and prepare its deployment and funding. Report connection success separately from the first completed job.
Choose a small job that represents the intended use. Inspect its instructions and effective app grants, then confirm the input, expected output and any app changes with the person. For a read-only test, use a worker whose grants permit reads only; for an action kit, review and approve the specific writes. A prompt is an instruction, while app grants enforce access.
- 1. The directory is alive: confirm a kit count comes back
directory_overview - 2. The fleet list: report how many workers Grok Bot can see
workers_list - 3. Recent runs across the fleet: confirms readRuns
runs_feed { "limit": 5 } - 4. Read the job and grants, then check deployment, funding and budget headroom
instruction_get worker_permissions_get onboarding_get account_usage deployments_list budget_get fleet_budget_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 identifies a readiness or budget step through skipReason. Complete that step before another attempt. A first job succeeds when its output matches the request and the intended destination receives the result. Report the run ID, outcome and cost separately from connection status, and inspect the existing run after a timeout before starting another.
Step 6. Human and agent
Give the fleet its first worker.
A new account starts empty. Install a kit from its page in one click, or let the agent preview and install one with kit_install_preview and kit_install once the person approves.
A new WorkerKit account starts with no workers, so the last step of setup is getting one. A kit is a ready-made worker: its instruction, its exact app permissions and its schedule, written and reviewed in advance, so installing one is how a fleet usually starts rather than a shortcut. There are two paths, and either ends with something to operate.
- 01
The one-click path: install a kit from its page
Browse the catalog at workerkit.ai/kits, open a kit whose job you recognise, and install it. It arrives pre-instructed, pre-permissioned and pre-scheduled, and asks for whatever it needs to connect. This path needs no scope on the manager key at all, so it works on the first session whatever the key can do.
- 02
The agent path: shortlist, preview, approve, install
With installKits on the key, Grok Bot can do the whole thing in chat: shortlist with kits_search, read the candidate with kit_get, then call kit_install_preview to surface its setup questions and exactly what the new worker would be allowed to touch. Put that in front of the person in plain words, and call kit_install once they approve, with deploy set to true so the new worker is actually able to run (that half needs manageDeployments on the key; without it the worker is installed but inert until worker_deploy). The new worker's key is shown once in the response.
- 03
Check readiness and funding
Confirm the worker and model deployment are enabled, the required apps are connected, model funding is usable and per-run, daily and account budgets permit the job. Use onboarding_get and account_usage to find the next setup action. The person completes app sign-in and any wallet checkout in the trusted page.
- 04
Then run it once and read the receipt
Trigger the approved job with worker_run and keep its run ID. Follow run_events to completion and inspect the output and cost from run_get. Verify delivery to the selected destination. Once the result is useful, create the approved schedule with its time zone and inspect the first scheduled run.
Browse the kit catalog or ask Grok Bot to shortlist kits through WorkerKit.
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.
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.
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.
| Rule | What it means |
|---|---|
| Read the key before planning | Call 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 adding a server | Grok Bot asks for an explicit yes before it adds an MCP server. State the name, the URL and whether a header is attached, then wait for it: an instruction pasted earlier in the conversation is a request, not the approval. |
| Confirm before changing the fleet | Running, 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 it | A 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. |
| Let the header carry the key | Enter the key only in protected credential settings. If the client accepts keys only in chat, use another client or browse workerkit.ai/kits. Never print, log or save keys in memory, skills or shared files. Revoke exposed keys at AI access. |
| An empty fleet has a next step | A new account has no workers until someone installs a kit 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 account | The 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 runs | Poll 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_health | When 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 spending | Before 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_found | The worker is missing or belongs to another account, and the two are indistinguishable by design. Never claim which. |
| 403 OPERATION_NOT_ALLOWED | The key lacks a scope, and the message names it. A wider key is the fix, not a retry. |
| Time | Compute 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 working | A 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. |
| Money | Read 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 ceilings | A 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.
| Symptom | Cause and fix |
|---|---|
HTML instead of tools | workerkit.ai/mcp is the documentation page. Use https://mcp.workerkit.ai/workers for WorkerKit or https://mcp.workerkit.ai/knowledge for published reports. |
401 on the Workers mount | Read 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-add the server with the header spelled Authorization: Bearer pe_mgr_... and it connects. |
403 OPERATION_NOT_ALLOWED | A 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 header (the snapshot rule). |
404 not_found on a worker | Missing, or on another account. Verify the id, and that the key belongs to the account that owns the fleet. |
429 | Rate limited. Honour Retry-After; the per-account windows are in the operating rules above. |
Empty fleet on a new account | Expected, and not a fault: an account has no workers until someone installs a kit or clones one. The setup is proved already, because the key authenticated and the reads answered. Install a kit with kit_install to fill it. |
Empty fleet, or the wrong workers, on an account that has some | The key was created in a different WorkerKit account. Create it in the account that owns the fleet. |
Each 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.