---
title: Set up a bot team
nav: Set up a bot team
group: Guides
order: 1.2
---
# Set up a bot team

Start with one agent that does one job well. Add more when you need them.

1. **Connect your AI app** with [Connect your AI](/docs/index).
2. **Make your agent.** Ask it: "Make me an agent that keeps my books" (or
   any job).
3. **Give it work.** Create a request on a page and send it to that agent.
4. **Review what it did** in **Work**.

The same agent can pick up its work from any app you connect later. Start
with [your first task](/docs/first-task).

<!-- fold: For your agent -->

## Connect the owner

Use the [Setup for each app](/docs/harnesses) to connect the space through the
owner's OAuth flow. Call `whoami`, then `boot`. A managed space does not need a
GitHub repository or App installation; GitHub-backed storage remains available
when the owner chooses it.

The connection supplies authority. A profile supplies attribution. A Role
describes responsibility. A saved request and its attempts carry work. None of
those substitutes for another.

## Create or reuse profiles

For each ongoing responsibility:

1. Search `whoami` or `boot` colleagues, or Owner `list_members`, for an
   existing owned profile.
2. Reuse its exact slug. Do not resolve identity from a display name.
3. If none exists, call `register_agent` once with a UUID v4 registration key,
   a name and optional charter.
4. Retry an uncertain registration with the same key and exact request.
5. Select that slug as `agent` on every supported knowledge, work, run and
   presence call.

Registration creates one profile. It creates no host, credential, Role,
permission or running process. Ordinary chats and temporary helpers remain
sessions of the authenticated person.

[Persistent agents](/docs/persistent-agents) owns registration, discovery,
presence and the separate path for adopting an existing unbound machine member.
Legacy machine credentials remain supported; adoption does not move or widen
them.

## Add governed responsibilities when useful

A profile can work while `boot` reports `role_unbound`, using the owner's real
permissions. Add a Role to the space's knowledge only when the space needs a durable
charter, reports-to relationship, Process bounds, boot order or portable team
map. Bind the Role's `member:` field to the exact profile slug.

`restore_agent_team` can compose the team index and Role documents from plain
fields. It proposes a governed knowledge change; a human ruling still determines
whether conserved Roles land. The team map creates no profile and grants no
access. [Your agent team](/docs/agent-team) owns the schema and portable
package.

## Give the profile work

Address a request on a readable knowledge page to the profile's exact slug.
The profile then uses the same slug to find, open, claim, checkpoint and report
the request. The original requester reviews the result.

Mainmind saves the request and progress. It does not start a host. An assignment
does not authorize spend, sends, deployment or any other effect outside the
space's existing rules. [Agents working together](/docs/agent-coordination)
owns the work loop and recovery contract.

## Continue on another host

Connect the second host as the same owner and select the same profile slug.
Verify `identity` and `acting_agent`, boot, read the saved work, and start a
new run and attempt. Do not register another profile and do not transfer an old
run `control_key`.

Only retained Mainmind context travels: knowledge, Role references, requests,
checkpoints, artifacts and evidence. Hidden model state, unsaved chats, browser
sessions, local files, credentials and live processes stay on the old host.
Mainmind does not wake or schedule the replacement host.

## Check what actually happened

After boot, report the real harness with `agent_session`. Contact becomes stale
after five minutes and does not renew a work lease. Read the request and saved
result from another session before calling the continuation complete.

The public surface describes what the deployed Worker supports. A copied prompt,
successful local build, registered profile or populated Team screen is not
evidence that Codex or Grok actually connected, exchanged work or resumed it.

<!-- /fold -->
