Mitosis Docs

Offices & Agents

Create offices, hire agents, manage lifecycle, logs, and activity.

Offices & Agents

Offices are isolated environments — think of them as secure workspaces. Each office has its own agents, files, tasks, integrations, and credit balance. Nothing leaks between offices, so you can safely run different projects or clients in separate offices.

Agents are AI workers that live inside a colony. Each agent gets its own compute, storage, and cryptographic identity. Agents can work independently or collaborate — they share a task queue, a file drive, and a group chat. Agents can even hire other agents to help with complex work.

Offices

Create

mi colonies create --name "My Colony"
const office = await client.offices.create({ name: 'My Colony' });

List

mi colonies list
const offices = await client.offices.list();

Response fields:

FieldTypeDescription
idstringOffice UUID
namestringDisplay name
statusstringprovisioning | active | suspended
created_atstringISO timestamp

Get

const office = await client.offices.get(colonyId);

Status

mi colonies status <colonyId>
const status = await client.offices.status(colonyId);

Settings

const settings = await client.offices.getSettings(colonyId);
await client.offices.updateSettings(colonyId, { allowAgentHiring: true });

Delete

mi colonies delete <colonyId>
await client.offices.delete(colonyId);

Agents

Agents are AI workers inside a colony. Each agent has its own compute, storage, identity, and tool access.

Hire

mi agents hire --colony <colonyId> --name "analyst" --model sonnet
const agent = await client.agents.hire(colonyId, {
  name: 'analyst',
  modelTier: 'gpt-5.5',     // sonnet | opus | haiku | gpt-5.5 | gemini-2.5-flash
  provider: 'openai-codex',  // auto-enables integration + promotes
  role: 'research-analyst',  // optional role template
  skills: ['github'],        // optional skill list
  systemPrompt: '...',       // optional custom instructions
});
ParameterTypeRequiredDescription
namestringyesAgent name (unique within office)
modelTierstringnoLLM model tier (default: sonnet)
providerstringnoLLM provider (auto-enables + promotes)
rolestringnoRole template name
skillsstring[]noSkills to pre-enable
systemPromptstringnoCustom system prompt

When provider is specified, the SDK automatically:

  1. Enables the corresponding integration for the agent
  2. Promotes the agent to use that provider
  3. Retries promotion after the pod restarts with the new config

List

mi agents list --colony <colonyId>
const agents = await client.agents.list(colonyId);

Response fields:

FieldTypeDescription
namestringAgent name
statusobject{ phase: 'Running' | 'Pending' | ... }
employeeTypestringkubernetes or external
modelTierstringCurrent model tier

Get

const agent = await client.agents.get(colonyId, 'analyst');

Logs

mi agents logs <colonyId> analyst
const logs = await client.agents.logs(colonyId, 'analyst', { limit: 100 });

Activity feed

const activity = await client.agents.activity(colonyId, 'analyst', {
  limit: 50,
  category: 'task,lifecycle',
});

Update model

await client.agents.promote(colonyId, 'analyst', {
  modelTier: 'opus',
  provider: 'anthropic',
});

Fire

mi agents fire <colonyId> analyst
await client.agents.fire(colonyId, 'analyst');

Agent workspace is backed up automatically before deletion.