MCP server

Use this when: you want to call your AgentSky agents from a Model Context Protocol client — Claude Desktop, Cursor, Zed, or any MCP-compatible host.

Don't use this when: you are building an application that calls agents directly via HTTP (use the Agent API instead). MCP is for connecting an agent to another agent or tool host, not for building your own product on top of agents.

AgentSky exposes your agents as tools over the Model Context Protocol. Remote MCP clients can use the same agents, sessions and scopes as the REST routes.

  • Server URL: https://api.agentsky.dev/v1/mcp
  • Transport: Streamable HTTP. Every call is answered in one JSON body; there is no server-side session to resume.
  • Auth: Authorization: Bearer ast_… — an API key from Developer → API keys, or sky auth login. Clients that only speak OAuth can sign in instead
  • Scopes: read lists and reads; write also starts sessions and sends messages

Tools

ToolWhat it doesScope
list_workspacesAll workspaces you belong to: slug, name, role, is_personal, is_current. Pass a slug as workspace to any list or create toolread
describe_workspaceWhat the workspace has and what you may do there, read live: agents, company skills, routines and their triggers, installed connectors and their tools, policies, remaining budget, your role and route groups, each with a one-line usage example. Optional workspaceread
helpHelp generated from the server's own API document: without topic, the topics; with one (routines, sessions, connectors/<kind>, workflow, …), its operations, required fields, a skeleton body and a usage line. Optional workspaceread
list_agentsYour agents in the workspace: id, name, harness, model, session count. Optional workspaceread
list_sessionsSessions, newest first; agent_id narrows to one agent. Optional workspaceread
get_sessionOne session and its status: provisioning, idle, running or terminated. Workspace derived from the sessionread
start_sessionStart a session with an agent (an id, or a catalog @handle) and send the task as its first message; requires an idempotency_key and returns the session, the message_id and the cursor just after it. task_id joins an existing task (workspace derived from it; omit workspace); budget_cents caps what the session may spend; model runs another model than the agent's own. Optional workspacewrite
send_messageSend the next message into an idle session, with optional uploaded files; requires an idempotency_key. Workspace derived from the sessionwrite
interrupt_sessionAbort the session's in-flight turn, as the Stop button does; on a chat that runs on your Mac it stops it there, for a key paired with that Macwrite
update_threadRename, pin, archive or mark a thread read or unread, as the rail's row menu doeswrite
read_session_secrets / save_session_secretA conversation's secret names; save a credential the person gave you in that conversation's own vault and get the reference to send instead of the valueread / write
interrupt_threadStop what a thread's agents are doing, as its Stop button does: every agent, or one column_idwrite
get_thread_options / start_thread / send_thread_messageWhat a new thread can start on; start a thread with one agent or several side by side (request_id makes a retry safe); send one message to every agent of a thread or to column_ids (delivery_id names the send) — the web composerread / write
add_thread_agent / remove_thread_agent / fork_threadAdd one more agent beside a thread's others, take one out (its session stays), or continue one agent's conversation in a thread of its own — the thread's column menuwrite
search_threads / list_joinable_threads / join_threadSearch the words of your conversations; the teammates' and shared threads you can open; open one by its session_idread / write
pick_comparison_winnerRecord the winner of a side-by-side comparison, or outcome tie / both_badwrite
list_projects / remember_projectThe GitHub repositories a new thread can start on with the remembered choice, and remembering one (or null) for the next threadread / write
open_skyOpen your Sky without sending anything, making it on first usewrite
open_tracking_board / start_trackingOpen your own or the team tracking board, making it on first use; start a board about one scopewrite
set_session_accessMake a session private or workspace-visible, edit its viewers, and share the owner's logins with it; the owner onlywrite
request_mac_reachAsk one of your Macs to lend a folder, browser, Chrome tab, screen or its apps; the owner's Mac permission mode applieswrite
take_back_macRevoke a lent Mac mountwrite
read_sessionThat message's replies after the cursor, one page at a time; with wait_seconds (up to 50) waits until the turn's idle mark. Workspace derived from the sessionread
search_contextThe one search over everything you can open in the workspace (chats, traces, memory and notes, artifacts, files, meeting notes, skills, agents, help). query is plain words, "exact phrase" or /regex/ (every matching line, with its path and line); scope narrows to a folder such as skills/review/; a page at a time (nextCursor → cursor). Optional workspaceread
read_contextRead a search_context hit in full: pass its ref unchanged; nextOffset → offset continues a long messageread
collect_resultWhat a session produced: its last reply, the task files it wrote, and the task_id they live in. Workspace derived from the sessionread
switch_modelChange a session's model, thinking level or both; its next turn uses them and the conversation and files stay. Workspace derived from the sessionwrite
set_permission_modeSet a cloud chat's permission mode: ask holds each tool call for the person's approval, allow allows all. It can make the agent's own setting stricter, never looser. Owner only; Ask works on Claude Code and Codexwrite
hand_off_sessionSwitch the agent and engine that take this session's next turn (agent_id, an id or @handle; message, that turn), optionally on a chosen model and thinking level, in the same session: the same engine continues its native conversation, another one gets a written summary of the conversation and memory. An engine with no run-scoped execution (anything but Claude Code, Codex, OpenClaw and Pi) is refused with harness_unsupported. Requires an idempotency_key; returns the completed handoffwrite
fork_sessionFork a session into a new one on an agent (agent_id, an id or @handle), optionally up to a completed reply (last_message_id) and on a chosen model and thinking level; the original stays as it is. Requires an idempotency_key; returns the operation to poll with get_handoff until target_session is readywrite
continue_on_computerMove an idle Claude Code or Codex session you own onto your own computer: its exact conversation (and its workspace, where carried) is exported for download. On that computer sky session continue-here or AgentSky for Mac restores and resumes it. Until a computer downloads it, a new cloud message cancels the move; after that the session takes no cloud turns until return_to_cloud. Requires an idempotency_key; returns the handoffwrite
return_to_cloudBring a session continued on your own computer back to the cloud; it takes messages again from where the cloud last left it, and anything done on the computer since stays therewrite
get_handoffWhere a handoff stands; once completed, target_session is the session to continue withread
get_cloud_copyWhat is kept in the cloud for a chat synced from your own computer: its working folder and native session, so continuing it in the cloud needs no computerread
stop_sessionArchive a session you are done with; its transcript, files and artifacts stay. Workspace derived from the sessionwrite
list_session_ports / expose_session_port / open_session_portA session's exposed local servers; expose a port at its own origin (private or public); a one-minute entry link for a private port — the session's Ports panelread / write
stop_session_browserStop a session's browser and release it; the agent's turn goes on (interrupt_session stops that)write
take_over_session_browserAsk the person to take over the session's cloud browser (an optional reason is shown to them); over MCP it never takes the browser itself and answers asked: truewrite
hand_back_session_browserHand the session's cloud browser back to the agent; only the person holding it may (not_holder for anyone else); the agent is told in the chat and carries onwrite
ask_side_chatAsk one question about a session's conversation, answered beside it and never sent to its agent — the web's Side chatwrite
search_catalogEvery agent you can start, by @handle, with what it does, its categories, pricing and requirements. Optional workspaceread
get_catalog_agent / publish_catalog_listing / unpublish_catalog_listingOne catalog agent by handle; list one of the workspace's agents under a @handle (409 handle_taken); take a listing down, the agent untouchedread / write
list_tasks / get_taskYour tasks and what each is waiting on; one task's sessions, open requests and cost. list_tasks accepts optional workspace; get_task derives workspace from the taskread
set_task_completion_answer / dispute_agent_feeSay whether a task did the job (did_the_job, replacing an earlier answer); dispute a paid agent's fee within 72 hours of the task's first resultwrite
read_task_storyEverything that happened in one task, each entry with who did it: messages by person and agent, the agents' tool calls, helpers and handoffs, requests and answers, mentions, file versions, artifacts and comments, connector calls (named by the person whose turn made them), meetings, the task's work graph events by their own kind (connector and context results with a link to the stored reply, stored files, GitHub pull requests and checks), and each session's cost. No size limit: cursor reads the next page, order asc from the start or desc from now. by_session lets task_id name any session of the taskread
read_timeline_dayOne day of what your own Mac recorded, as stretches of work or time away, with the day's pauses and digests. Pass date and tz; each stretch's raw range goes to search_events. Only your own key reaches it.
read_timeline_pauseWhether your work timeline is paused now, since when and until when.
pause_timelineStop recording your work on every Mac of yours, until resume_timeline or a time you name in until. Nothing they send is stored meanwhile.
resume_timelineStart recording your work again on every Mac of yours.
read_work_digestShort summaries of your own recorded work, one per hour or local day, newest first: what you worked on and where, decisions, outputs and tasks. Read it before searching the raw log; every activity cites event ids that read_event opens, and raw is the search_events query for the window's original records.
read_task_graphThe task's events and inferred cross-thread associations, each with confidence and exact object evidence. Follow next_cursor; source permissions still applyread
correct_task_linkConfirm, remove or move an association in your task view. Use expected_version from the graph, or 0 before its first correction. Moving stays within the same workspace; source permissions do not changewrite
find_task_email_threads / attach_email_threadSearch the person's Gmail (or a Gmail a teammate shared with the task's workspace) for a thread, and keep one in the task's files as plain text; the story names who attached it. Read-only on Gmail; each read is a billed connector callwrite
list_task_files / read_task_file / write_task_fileA task's shared folder, as text up to 256 KiB per file. Workspace derived from the taskread / write
request_artifact_adoption / read_artifact_adoption / prepare_artifact_adoption / proof_artifact_adoption / verify_artifact_adoption / cancel_artifact_adoption / cancel_source_artifact_adoptionInactive legacy artifact owner handshake. Requires the actual owner's unrestricted write bearer, including read/proof. Request → prepare → verify establishes provenance only; cancel canonical before cancel source. No content transfer or activationwrite
list_artifact_adoptions / read_artifact_upgrade / advance_artifact_upgrade / cancel_artifact_upgradeUpgrade one older consumer file with one repeated call: check the gate, run each idempotent step until active, or cancel before copying finishes. A complete copy cannot be undone, so copying needs accept_one_way.
read_artifact_activation / prepare_artifact_activation / import_artifact_activation / revisions_artifact_activation / activate_artifact_activation / cancel_artifact_activationExplicit owner-only legacy cutover. Import one retained raw revision per call until imported; then source-forward and activate the same request. Imported is a one-way boundary; default-off starting gate does not block exact recoverywrite
original_source_artifact_activationExact retained raw revision during activation, bound to source/target/request/version. MCP returns binary metadata; use sky artifact activation source-original or REST for byteswrite
prepare_source_artifact_activation / proof_source_artifact_activation / history_source_artifact_activation / forward_source_artifact_activation / cancel_source_artifact_activationOriginal source fence and bounded retained history, same unrestricted owner bearer. No second content writer or source fallbackwrite
list_adopted_artifactsExplicit active adopted-file discovery with real current grants, SQL pagination, live total, row/next cursors and scope/visibility/name/kind filters. Shared URL grants do not expand discovery; task listing stays separateread
read_artifact_resource / read_artifact_originalExplicit task/adopted owner metadata and exact original raw endpoint. Task shape stays unchanged; adopted shape declares consumer_adopted and null task_id. MCP reports binary metadata; use REST or sky artifact original for bytesread
prepare_artifact_content / read_artifact_content_request / commit_artifact_content / close_artifact_content_requestExact UUID/base/hash/size raw-byte mutation and recovery. Current policy/edit/base and source claim are rechecked. Uncertain responses recover the same request; no silent rebase or duplicate chargeread / write
reserve_source_artifact_content / claim_source_artifact_content / settle_source_artifact_content / close_source_artifact_contentOriginal source admission owner verifies the exact canonical eligible purpose. Claimed capacity stays charged until actual canonical generation reclamationwrite
read_artifact_reclamation / reclaim_artifactActual retired owner-only exact UUID reclamation and progress. Close pending work, delete/check real canonical objects, then release original source admissions. Unknown deletion retains capacity; both operations require write scopewrite
read_artifact_policy / change_artifact_policyActual owner-only policy read/change; exact UUID/current policy and content bases. Preserve workspace incarnation, independent alias grants and common public pin. Ordinary readers cannot inspect policy; public links never grant discussionread / write
list_artifacts / publish_artifact / share_artifactPublished results from a task, and their public link. list_artifacts accepts optional workspace (or task_id); the others derive workspace from the task or artifactread / write
list_artifact_comments / add_artifact_commentPrivate artifact feedback: read roots and replies; append text at the viewed base_version, optionally replying with parent_id. Does not publish or start an agent. After an uncertain write response, read before resubmittingread / write
set_artifact_thread_resolutionResolve or reopen a root with current base_version and base_resolution_version (0 when absent). Same-state requests preserve metadata; stale transitions return 409. Replies inherit root statewrite
list_browser / share_browser / stop_sharing_browserYour saved browser (yours in every workspace) with its sites and whom you shared it with, plus the browsers shared with you here; share it with one member (user_id) or everyone here, for every site or only sites; stop a share by its id. Never returns cookies, passwords or stored state. Optional workspace; not with a workspace keyread / write
remove_browser_siteSign your saved browser out of one site, in running sessions toowrite
open_browser_tabsOpen pages in the browser of a session you own, at once or at its next start. Where browser sync is on for the workspace.
import_artifactBring in a file (file_name and content_base64, up to 16 MiB) or a public https page (url) as a new artifact, its original as version 1's file in a task's folder. No task_id uses the person's own imports folderwrite
export_artifactAn artifact's bytes in one of its export_formats, up to 16 MiB, as an embedded resource; format zip or none is every file as one archiveread
convert_artifactMake a Markdown, Word or PDF artifact into a page as its next version; restoring the earlier version undoes itwrite
save_artifact_fileSave one file of a published artifact as its next version: content text, content_base64 bytes, or restore_version, against the base_version you read. A newer version is refused with a conflict; identical content makes no version. Design systems use save_design_system_filewrite
update_artifact / copy_artifactRename a published artifact, or copy one version of it into a new artifact in the same task or a task of another workspace.
read_artifact_fileOne text file of a published artifact. list_artifacts with kind: "design_system" lists the workspace's design systems; read one's project/README.md before designing with itread
import_design_system / save_design_tokensImport a design system's file table into a task and publish it; save its whole tokens.json as the next version against the base_version you readwrite
save_design_system_fileSave one of a design system's editable_files (its brand book project/README.md, guidelines, tokens) with new content, or restore it from an earlier version, as the next version against the base_version you readwrite
buy_creditAdd 10, 20, 50 or 100 dollars of credit to your own balance: card charges the saved card; alipay or wechat_pay returns a checkout_url the person opens and pays. request_id never charges twice. Not with a workspace keywrite
get_billing / set_auto_topup / start_card_setup / claim_credit_inviteYour balance split into purchased and bonus credit with the latest payments; turn auto top-up on or off and set its threshold and amount; a hosted link to save a card; redeem a credit invite code — Billingread / write
list_api_keys / create_api_key / reveal_api_keyYour own API keys; create one (its secret is in the answer); read a key's secret again. The person's own admin key, not fixed to a workspaceadmin
delete_workspacePermanently delete a workspace you own and everything in it; confirm must repeat the slug. Sessions are stopped and the wallet's credit goes back to you. Not your default workspace; not with a workspace keywrite
answer_requestAnswer a question, approval or connection a task is waiting on. Workspace derived from the taskwrite
list_reflection_proposals / decide_reflection_proposalSkill and lesson changes suggested after finished tasks (default: pending), and approving (decision: "approve", writes it for the workspace) or rejecting one. Owner or admin decides. Optional workspaceread / write
get_goal / set_goal / clear_goalA session's standing goal: an objective (with optional criteria, each text or {text, command}) the session keeps working toward on its own, checked after every turn, within max_iterations, max_spend_cents and max_minutes. The writes need an idempotency_key. Workspace derived from the sessionread / write
list_plugins / get_pluginEverything the agents can use as one list of plugins (GET /plugins?view=…): view yours (added, off or needing the person) or discover (everything that can be added), optional q, use and cursor; each plugin is an app, tool, chat app, plugin bundle (a skill pack, which people add in Plugins › Skills; use: "skills" lists packs and skills), skill, MCP server, browser login or Mac feature with its provider, price, status and what it gives agents. get_plugin takes a plugin_id (app:gmail, bundle:review-kit, …). Without view, list_plugins answers the installed plugin bundles as beforeread / read
install_plugin / uninstall_pluginClaude Code plugin bundles in the workspace (RFC-0155): install_plugin takes source (github:owner/repo[/path][@ref] or a github.com URL) and installs or updates its skills and commands as workspace skills every new session gets, answering the connectors it uses and which to connect; uninstall_plugin takes the bundle's namewrite / write
update_plugin / start_plugin_session / set_plugin_policy / list_plugin_marketplaces / add_plugin_marketplace / remove_plugin_marketplaceRFC-0155 phase 2: update_plugin switches a plugin on or off; start_plugin_session starts a session with only that plugin's skills and MCP servers, its calls to connected apps limited to the apps the plugin declared; set_plugin_policy (owners and admins) marks it recommended, default (installs it) or blocked; the marketplace tools browse and manage the workspace's Claude Code marketplaces. install_plugin also takes mcp_tokenswrite / write / write / read / write / write
list_routines / create_routine / run_routine / delete_routineAgents on a schedule: each fire starts a new session of agent_id or sends message into session_id, on a 5-field cron in timezone or only when run_routine fires it; budget_cents caps each run. A routine whose paying wallet is empty pauses itself after three failed runs (paused_reason). run_routine needs an idempotency_key; delete_routine removes one for good. Optional workspace on list and createread / write
get_usageYour balance, whether a card is saved, and what you spent across sessions and API keys over UTC days from–to grouped by group_by; with session_id, that session's totals and newest entriesread
share_sessionTurn a session's share link on (view_only for a read-only link) or off; returns share_url. Workspace derived from the sessionwrite
get_session_share / rotate_session_shareA session's share link (token null when off), and replacing it with a new one at the same access level; the owner onlyread / write
send_link_message / interrupt_linkSend a message or stop the turn through a guest share link's token, as the guest page does; billed to the session's ownerwrite
list_session_people / read_session_presenceEveryone who may send a session turns (the people a turn can name with @, by name or email local part, and the people it can be assigned to), and who has it open right nowread
assign_sessionAssign a session to one of its people (user_id from list_session_people), or clear it with null; they see it waiting on them and are notified — the thread's "Assign to…" on the web and the Macwrite
list_notificationsYour latest notices, at most 20 from the last day or after afterread
read_session_threadsThe threads of a session's task: root first, then helpers, handoffs and children, each with its agent, model, status and spend. Workspace derived from the sessionread
read_session_recordThe human decisions (adopted, rerun, revise, discard, vote, did_the_job, approve) and observed outcomes (pr_merged, deployed, reopened, later_failure, shipped) recorded about a session's result. Empty means nobody decided yetread
read_agent_performanceDecisions, outcomes, spend and undecided count for every harness and model the caller's sessions ran on, over a since–until range (default last 30 days). A read model rebuilt from the session recordread
help_search / help_getSearch the AgentSky Help Center in English or Chinese, then read one article by its slug; answer with the article's link, agentsky.dev/help/<slug>read
update_agent / archive_agentChange an agent's name, description, prompt, instruction files, custom data, engine, model or reasoning effort (only the fields passed; an unknown field is refused), or archive it — the Library's agent folderwrite
export_agent_manifest / apply_agent_manifest / create_agent_from_manifestRead an agent as an agentsky/v1 manifest, make an agent what a manifest declares (only changed fields are written; the answer lists each change; dry_run previews; expected_version refuses a stale apply), or create an agent from oneread / write
list_agent_templatesThe agents a plugin pack ships, each with the ref create_agent_from_manifest takes as template to create an agent from it; the agent keeps the plugin, template and revision as templateread
delete_agentDelete a saved agent with no live sessions (409 agent_has_sessions); one whose sessions were all deleted is archived insteadadmin
set_agent_secret / unset_agent_secretSet (write-only) or clear the value of a secret an agent declareswrite
add_vault_secretAdd a secret to a vault: an MCP server's bearer or OAuth token, or an environment variable for the pod; never returnedwrite
list_plugin_revisions / read_plugin_fileA skill plugin's saved versions (GET /plugins/skill:{id}/revisions) and one UTF-8 file (e.g. SKILL.md) of a version — the Library's skills folders. List the skills themselves with list_plugins (use skills)read / read
export_plugin / export_plugin_marketplaceOne plugin as a package, or every plugin the workspace has switched on as a marketplace folder, for Codex (format: codex, the default), Claude Code (claude) or Grok (grok, the same folder as claude); no tokens, an API-key server reads its key from an environment variable. Add the folder with codex plugin marketplace add, claude plugin marketplace add or grok plugin marketplace add; sky setup plugins does it for every agent on the computerread / read
list_memory_stores / list_memory_notes / read_memory_noteThe Library's memory stores, the notes in one (optionally under a folder), and one note with its contentread
delete_memory_noteDelete one note from a workspace memory store, as Delete note doeswrite
save_memory_noteCreate a note at a path, or save a new version of note_id; every save keeps the earlier version; pass the read's content_sha256 as precondition to refuse a concurrent change with 409write
export_memory_store / import_memory_notesPage through a store's current notes at one consistent revision (next_cursor; a concurrent edit returns 409 export_changed), and import up to 100 notes as one atomic batch whose request_id replays the original receipt instead of writing twice. An existing path needs its current expected_sharead / write
list_library_artifacts / list_filesThe person's Library outputs, and the workspace Drive's filesread
get_library_artifact_share / set_library_artifact_shareA Library output's public link and the version it serves, and turning it on or off at the current revision — the Share dialogread / write
place_library_artifact / delete_library_artifactPlace your own Library output in a workspace (or null for only you); delete it with every version at the revision you sawwrite
read_library_file_linksRead any Library file's sharing, current revision and real available members without creating a link; pass ref and optional audience workspaceread
share_library_fileChange workspace_access or member_changes: [{user_id, access: none/view/edit}]; none clears the individual override and restores workspace access; reads first, preserves every unmentioned grant and public access. Optional reviewed revisionwrite
publish_library_fileSet enabled to create or revoke public view-only access; reads first and preserves workspace/member grants. Optional reviewed revisionwrite
revoke_library_file_linksRevoke all sharing of ref at an explicit revision from a prior read; stale revisions fail without retrywrite
read_shared_library_fileRead a native snapshot directly from a 43-character shared URL token; optional public: true chooses the public view-only route. Returns editable, source revision and native content/historyread
save_shared_library_fileSave through the original source writer with a shared token, opaque revision, exactly one text / html / office / docx / restoreRevision, and optional requestId UUID. Live edit grant required; no public writer; 403/409 remain tool errors without retrywrite
read_workspace_contextWhat every session in the workspace loads at start: AGENTS.md, MEMORY.md, the indexes and the caller's member page, with sizes and limitsread
rename_workspaceRename a workspace the caller owns; the slug stayswrite
list_workspace_members / invite_workspace_members / accept_workspace_invite / revoke_workspace_invite / set_workspace_member_role / remove_workspace_memberA workspace's people and waiting invitations; invite up to 50 emails; join through an invitation token; withdraw an invitation; make someone an admin or a member; remove someone, or leave with me — Settings › Membersread / write
connect_workspace_appStart connecting an app the workspace itself owns; share one of your own connected apps with share_pluginwrite
list_external_accounts / connect_external_account / disconnect_external_accountThe workspace's vendor accounts (never credentials); connect one from a credential the person gave, or disconnect itread / write
show_in_panelShow an artifact, browser, pull request, changes, story, automations, notes, status board, background tasks or shared files in a session's right panelwrite
list_channel_connections / set_chat_app_agent / unlink_chat_identityChat app connections and the session each answers through; choose which agent or chat answers a chat app; unlink a chat identityread / write
list_hook_rules / set_hook_rules / create_webhookThe workspace's hook rules in order; replace the whole list (owner only, at most 20); register a webhook endpoint for notify rules, its secret only in the answerread / write
whoamiCaller, resolved workspace and scopesread
create_workspaceCreate a workspace; personal keys onlywrite
create_agentCreate a saved agent for start_sessionwrite
get_agentOne saved agent's full specread
update_routineChange a routine; omitted fields keep their valuewrite
set_routine_pausedPause or resume a routinewrite
list_routine_runsEvery fire attempt of the workspace's routines, with whether each is running, succeeded or failedread
list_referral_linksYour customer discount links and what they earnedread
create_referral_linkCreate a customer discount linkwrite
disable_referral_linkDisable a customer discount linkwrite
list_model_subscriptionsConnected model plans, metadata onlyread
begin_model_subscription_loginStart a plan's browser sign-in; returns the link for the person to openwrite
get_model_subscription_loginHow a plan sign-in standsread
submit_model_subscription_login_codeHand over the code the sign-in page showedwrite
cancel_model_subscription_loginAbandon a plan sign-inwrite
connect_model_subscriptionAdd an account from a credential, or replace one's credentialwrite
update_model_subscriptionRename an account or make it the default for new taskswrite
read_model_subscription_usageThe allowance left on an accountread
switch_model_subscription_agents_to_creditsMove an account's agents onto creditswrite
copy_model_subscriptionCopy an account into another workspace you administeradmin
remove_model_subscriptionDelete an account so it leaves every listwrite
list_machinesThe person's connected Macsread
create_environmentCreate a reusable session environmentwrite
list_session_filesOne directory of a session's working folderread
search_apiFind the AgentSky API operation for anything a person can do on agentsky.dev or in the Mac app that no tool above covers (threads, the Library's artifacts, files, skills and memory notes, agents, workspaces, connectors, vaults, channels, routines, billing, …): words match method, path, summary, operation id, field names and description; deprecated operations come lastread
describe_apiOne operation from search_api: its description, parameters and request body schemaread
call_apiRun one documented operation as the person with this connection's own key: the same route, checks and answer as REST at https://api.agentsky.dev/v1. method, concrete path, query, JSON body, optional workspace and idempotency_key; returns status and body. Only operations in the API reference are reachable; file bytes go through download_api_content and upload_api_contentread for GET, write otherwise
download_api_contentThe bytes of a documented GET operation that answers with a file, up to 16 MiB, as an embedded resource (base64 blob) beside its type, size and filenameread
upload_api_contentSend file bytes to a documented operation that takes them, as files (multipart, with text fields) or raw, up to 16 MiBwrite

Errors carry the API's own codes (not_found, insufficient_scope, insufficient_credits, …) as tool errors, so a client sees the same contract it would over HTTP.

Workspaces

Every list and create tool accepts an optional workspace slug. Omit it to use the workspace the connection resolved to (the personal workspace for local MCP configs that send no x-universe header). Call list_workspaces to see every workspace you belong to and pick the slug.

Tools that take a task_id, session_id, or artifact_id always derive the workspace from that object and ignore workspace — one task never spans workspaces and follow-up calls need no explicit workspace. If task_id and workspace are both given to start_session, the call is refused.

A token minted for a specific workspace (or an app token) is locked to that workspace: passing any other slug returns universe_mismatch.

The Library link tools use GET/PUT/DELETE /library/links through the same public API with this connection's bearer key. Their workspace selects the team audience without moving the original file and is never inferred from the connection workspace. The owner's native source permission and each recipient's precise workspace membership are checked independently. The reference is one of {kind:"agent_prompt",agentId} (the agent's user-authored AGENTS.md only), {kind:"file",fileId,sessionId?}, {kind:"task_file",taskId,path}, {kind:"memory_note",storeId,memoryId}, {kind:"skill_file",skillId,path}, {kind:"artifact",artifactId}, or {kind:"platform_artifact",artifactId,path?}. An uploaded meeting note is a Drive file. For a DesignSystem file, platform_artifact.path is its full native manifest path: actual root plus the relative editable_files path, or the native reader's libraryRef; omitting it shares the entire artifact entry. Editable files use the original versioned writer, including derived files and republishing. Token reader APIs reject ?path rather than expanding the file grant. The API enforces source ownership, real membership, workspace-key bounds and whether edit access is supported. These tools never send messages or start an agent session. Conflicts, denied requests and incomplete API receipts return tool errors; read the current state before intentionally retrying. Existing share_artifact and artifact version management remain available.

A task, start to finish

  1. list_agents — pick the agent's id.
  2. Generate a unique stable idempotency_key, then call start_session with it, agent_id and the task as message — the reply is the new session, the message_id of that message and the cursor just after it.
  3. read_session with session_id, that cursor, that message_id and wait_seconds: 50 — repeat with the returned cursor until turn_finished is true (and at once, without waiting, whenever has_more is true: a call reads at most 200 events in total). The first turn also boots the agent's sandbox, which can take a minute.
  4. Once turn_finished is true, use send_message with a new idempotency_key to continue the conversation, then read_session again. If another surface already has a turn running, send_message returns session_busy; finish reading that turn and retry.

Keep each mutation's key until its receipt arrives. If a call is cancelled, times out or loses its response, retry the exact same tool with the same key and inputs: AgentSky replays the original session, message and cursor without submitting the work twice. Reusing a key with changed inputs returns idempotency_conflict. Use a new key only for intentionally new work.

Splitting work across agents

  1. search_catalog with words for the work, and pick each agent by what it does.
  2. Start the first agent with start_session and a budget_cents. Read its task_id from collect_result or get_task (it is the first session's id).
  3. Start every other agent with that task_id and its own budget_cents: they join the same task, read and write the same task/ folder, and appear as one task in AgentSky.
  4. Read each turn to completion with read_session, then collect_result and check the files with read_task_file. stop_session the sessions you are done with.

Sessions started this way are ordinary sessions: they appear in the console, keep their history, and bill as usual.

These are the four delegation tools every harness has, under the same names inside a session's sandbox:

ToolDoesIn a sandboxOutside (MCP)
agents.hirestart an agent of any harness on a self-contained brief, with a budget taken from yoursactl agents hire @handle --task "Brief" --budget 0.50start_session
agents.messagesend an agent you hired a follow-upactl agents message HELPER "Text"send_message
agents.statusthe recorded state of one agent you hired, or of all of themactl agents status [HELPER]get_session
agents.collectan agent's proposed result and the files it wroteactl agents collect HELPERcollect_result

list_session_people answers who may send a session turns, and get_session_overview its people, engines and plugins.

Meta Muse (not verified)

AgentSky has not exercised or certified this flow in Meta Muse. Meta's connector documentation describes custom connectors backed by a remote MCP server or public API, with credentials entered through Muse's credential prompt (How Muse works with Connectors). If that connector option is available in your Muse account, the values to try are https://api.agentsky.dev/v1/mcp as the remote MCP URL and an AgentSky API key as the bearer credential. Use a key with write scope to start or continue sessions. Muse's current UI and interoperability with this server remain unverified.

One command for Claude Code and Codex

bash
npx @agentsky/sky setup

It signs you in if needed, registers this server with every Claude Code and Codex it finds, and installs the agentsky skill, which carries the agent catalog (catalog.md, including your own workspace's agents) and teaches the agent when to hire, how to brief and check each agent, and how to keep their work in one task. Run it again to update. --dry-run shows what it would change. Codex gets the key in its config.toml, so it needs no environment variable. To set things up by hand instead, use the commands below.

Claude Code

bash
claude mcp add --transport http agentsky https://api.agentsky.dev/v1/mcp --header "Authorization: Bearer ast_..."

Codex

bash
export AGENTSKY_API_KEY=ast_...
codex mcp add agentsky --url https://api.agentsky.dev/v1/mcp --bearer-token-env-var AGENTSKY_API_KEY

That command writes this entry to ~/.codex/config.toml ($CODEX_HOME/config.toml), which the Codex CLI, IDE extension and desktop app all read. You can write it yourself instead:

toml
[mcp_servers.agentsky]
url = "https://api.agentsky.dev/v1/mcp"
bearer_token_env_var = "AGENTSKY_API_KEY"

Codex sends the key from AGENTSKY_API_KEY in the environment Codex starts in. For an app that is not started from your shell, put the key in the entry instead: http_headers = { Authorization = "Bearer ast_..." } in place of bearer_token_env_var. codex mcp list shows the server once it is registered.

Other clients

Most clients accept a JSON entry for a remote server with a bearer header:

json
{
  "mcpServers": {
    "agentsky": {
      "type": "http",
      "url": "https://api.agentsky.dev/v1/mcp",
      "headers": { "Authorization": "Bearer ast_..." }
    }
  }
}

Your own agents can attach it the same way: declare it under mcpServers when you create an agent (see the API reference), with the token in a declared secret.

Sign in with OAuth

A client that cannot send an API key can use standard MCP authorization. A request with no valid credential answers 401 with WWW-Authenticate: Bearer resource_metadata="https://api.agentsky.dev/.well-known/oauth-protected-resource/v1/mcp"; that document names https://accounts.agentsky.dev as the authorization server, whose metadata is at its /.well-known/oauth-authorization-server. Authorization uses the code flow with PKCE (S256), and the client must send resource=https://api.agentsky.dev/v1/mcp on both the authorization and token requests.

Registration. A client registers itself at the registration_endpoint in that metadata (dynamic client registration, RFC 7591), as a public client (token_endpoint_auth_method: "none") or with a secret. Redirect URIs match exactly and must be https, or http on localhost or 127.0.0.1. The consent page names the client, marks it as not reviewed and shows the host it returns to. To use fixed credentials instead, create the app with POST /oauth_clients. Remove a client's access with DELETE /oauth_grants/{client_id}, sky, or your account page; its tokens stop working on the next request.

What a signed-in client can do. The person allows it read, write or both, in the one workspace they choose on the consent page. It sees only these tools: list_agents, list_sessions, get_session, start_session, send_message, read_session, collect_result, stop_session, search_catalog, list_tasks, get_task, search_api, describe_api, call_api, help_search and help_get. call_api reaches whoami, tasks, sessions, agents and catalog routes; any other route answers 403 forbidden. For the full tool list, use an API key.

Help Center server

https://api.agentsky.dev/v1/help/mcp is a second server with only help_search and help_get. It needs no key, because the Help Center is public. Every cloud session already reaches both tools on this server as agentsky, with its own session token; add it to any other MCP client the same way as the main server, without the Authorization header. It allows 600 calls a minute per caller address.

Rate limits and waiting

The server shares the API's per-token rate limit. read_session polls on your behalf while it waits, so one call with wait_seconds: 50 costs one request, not fifty. Prefer waiting over tight loops of get_session.