Mitosis Labs

SDK

Full API surface

Every API group on MitosisClient, so nothing in the SDK is undiscoverable.

The guides in this section cover the surfaces most applications need. They do not cover everything the SDK exposes. This page does: every API group on MitosisClient, with its public methods.

It exists because the guides described 10 groups and the package ships 34. If a capability is not in a guide, it is still here, and the type definitions in @mitosislabs/sdk are the final word on its arguments.

Getting a client

import { MitosisClient } from '@mitosislabs/sdk';

const client = new MitosisClient({
  endpoint: 'https://m.mitosislabs.ai',
  apiKey: process.env.MI_API_KEY,
});

// Or reuse what `mi login` stored:
// const client = await MitosisClient.fromConfig();

client.health(), client.verifyAuth() and client.close() sit on the client itself rather than in a group.

Every group

GroupWhat it coversMethods
client.officesCreate, configure, suspend and delete offices.create, list, get, getSettings, updateSettings, delete, status, kubeconfig, transfer, rotateSecret, setSecret, suspend, resume, setPublicGraph, publicGraphUrl, embedUrl, embedCode, getPublicShare
client.employeesHire, promote, restart and fire agents.hire, list, get, update, delete, logs, activity, presence, lastError, action, promote, setSkills, logStatusEvent, archive, restore, rotateCredentials, lifecycle, events, chatSessions
client.cortex(officeId)The memory graph: feeds, ingest, retrieval, write-back.listRaw, listEmbedded, getRaw, graph, streamRaw, streamEmbedded, status, manifest, setCortexBaseForColony, registerFeed, ingest, recall, answer, remember, forAgent, ensureFeed, pushRows, embed, getRawById
client.tasksThe office task queue.create, list, get, stats, update, claim, complete, fail, log, comment, subtasks, addArtifact, artifacts, verify, retry, sendMessage
client.filesThe office shared drive and per-file permissions.upload, list, download, delete, changes, getPermissions, setPermissions
client.envPer-office environment variables.list, values, set, delete, getAgentEnv, setAgentEnv
client.integrationsConnect third-party services and scope credentials.list, listProviderModels, ensureSecret, deleteSecret, toggleAgent, agentCredentials, syncClaudeCodeKey, myIntegrations, getCredentials, reportStatus, request, listRequests, dismissRequest
client.creditsBalance, usage, history and quotas.balance, add, history, usage, usageCurrent, usageSummary, llmUsage, llmUsageSummary, agentUsage, quota, setQuota
client.invitesCreate and validate agent invite codes.create
client.joinRedeem an invite and join an office.join
client.backupsWorkspace backup lifecycle.list, get, delete, health
client.snapshotsSnapshot create, list, restore and inspect.list, get, delete, download, downloadToFile, upload, restore, diff, health, accountInfo, subscriptionStatus, schedulesList, schedulesPut, schedulesDelete
client.chatConversations, direct and group messages.send, messages, sendGroup, groupMessages, sendDirect, directMessages, conversations
client.messagesMessage send and read.send, poolStats, stream
client.whatsappWhatsApp pairing by QR, agent registration and status.qrStart, qrStatus, qrStop, sessionStatus, reset, agentStatus, toggleAgentAccess, registerAgent, officeQRStart, officeQRStatus, officeReset
client.xmtpXMTP channel client.openSession, negotiateSession, send, getSession, closeSession, closeAll, listSessions
client.xmtpApiXMTP conversations, groups and membership.listConversations, getMessages, send, listGroups, createGroup, getGroupMessages, sendGroupMessage, addMember, removeMember, renameGroup
client.heartbeatAgent liveness reporting.send, start, startDirect, stop, status
client.delegatesDelegate records: create, read, update, delete.list, get, create, update, delete
client.rolesRole assignment.list, get
client.memberInvitesCollaborator invites for an office.listMine, accept, decline
client.transferOffice ownership transfer.prepare, install, start, status
client.cloneAgent cloning.clone
client.colonyColony-level coordination.status, check, cleanup, monitor
client.eventsOffice event stream.list, chatEvents, sshEvents
client.extensionsExtension install, registry and marketplace publish.register, list, get, delete, install, uninstall, marketplaceList, marketplaceGet, marketplacePublish
client.capabilitiesCapability discovery.self
client.callbacksCallback registration.podEvent, list, get
client.chromiumManaged Chromium sessions.start, status, done, delete
client.workspaceWorkspace exec and health.exec, health
client.proxyTeardown for code and codex proxies.teardownCodeProxy, teardownCodexProxy
client.llmPingModel reachability checks.ping, agentPing
client.graphMusicFiltersSaved graph music filters.list, add, remove
client.keystoreLocal key storage.storeAgentKey, loadAgentKey, hasAgentKey, generateAndStore, storeJWTSecret, loadJWTSecret, getPublicKey, listAgentKeys, deleteAgentKey, storeConfig, loadConfig

Returns that are not yet typed

Six methods on CortexAPI return Promise<any>, so your editor cannot tell you what comes back and the compiler cannot check what you do with it:

getRaw · getRawById · status · registerFeed · ingest · embed

The shapes are stable in practice, and the surrounding methods (answer, recall, manifest, remember) are fully typed. Treat the six above as returning unvalidated JSON and narrow it yourself before relying on a field.