# Staffing

URL: /workflows/processes/staffing · Id: `process:staffing`

> Staffing fills every Role in a Startup with an Agent by default and a Human where one is required.

Staffing fills every [Role](/business/nouns/role) in a [Startup](/business/nouns/startup) with an [Agent](/business/nouns/agent) by default and a [Human](/business/nouns/human) where one is required.

## Outcome
| Part | This Process |
| --- | --- |
| Outcome | Every Role in a new Startup has an Agent or a Human seated, with its Permissions and Limits granted. |
| Reads | [Startup](/business/nouns/startup) |
| Leaves | [Role](/business/nouns/role), [Agent](/business/nouns/agent), [Permission](/business/nouns/permission), [Message](/business/nouns/message), [Task](/business/nouns/task), [Integration](/business/nouns/integration) |
| Runs in | Each Startup |

## Accountable
[People Lead](/agents/people/people-lead), [People Team](/agents/people).

## Workflows
| Workflow | Runs | Team |
| --- | --- | --- |
| [Staff roles](/workflows/processes/staffing/staff-roles) | on `Startup.created` | [People Team](/agents/people) |
| [Onboard into a Role](/workflows/processes/staffing/onboard-into-role) | on [`Role.staffed`](/business/events/Role.staffed) | [People Team](/agents/people) |
| [Offboard from a Role](/workflows/processes/staffing/offboard-from-role) | on [`Role.vacated`](/business/events/Role.vacated) | [People Team](/agents/people) |

## Who does each step

| Workflow | Step | Role | Calls | Approval |
| --- | --- | --- | --- | --- |
| [Staff roles](/workflows/processes/staffing/staff-roles) | 1. Read the Roles the Startup’s Template includes. | [People Lead](/agents/people/people-lead) | [Role.list](/business/nouns/role/list) | None |
| [Staff roles](/workflows/processes/staffing/staff-roles) | 2. Mint a default Agent for each Role. | [People Lead](/agents/people/people-lead) | [Agent.mint](/business/nouns/agent/mint) | None |
| [Staff roles](/workflows/processes/staffing/staff-roles) | 3. Record the Roles a Human fills under the operating model. | [People Lead](/agents/people/people-lead) | [Role.update](/business/nouns/role/update) | None |
| [Staff roles](/workflows/processes/staffing/staff-roles) | 4. Grant each Role its Permissions and Limits. | [People Lead](/agents/people/people-lead) | [Permission.create](/business/nouns/permission/create) | None |
| [Onboard into a Role](/workflows/processes/staffing/onboard-into-role) | 1. Grant the Permissions the Role needs, and nothing more. | [Security Engineer](/agents/engineering/security-engineer) | [Permission.create](/business/nouns/permission/create) | None |
| [Onboard into a Role](/workflows/processes/staffing/onboard-into-role) | 2. Send the new holder the Role contract: its responsibilities, Limits, Processes and Metrics. | [People Lead](/agents/people/people-lead) | [Message.create](/business/nouns/message/create) | None |
| [Onboard into a Role](/workflows/processes/staffing/onboard-into-role) | 3. Record a person as onboarded once they accept the contract. | [People Lead](/agents/people/people-lead) | [Human.onboard](/business/nouns/human/onboard) | None |
| [Onboard into a Role](/workflows/processes/staffing/onboard-into-role) | 4. Set the first Role review for 30 days in. | [People Lead](/agents/people/people-lead) | [Task.create](/business/nouns/task/create) | None |
| [Offboard from a Role](/workflows/processes/staffing/offboard-from-role) | 1. Revoke every Integration the holder connected, within the hour. | [Security Engineer](/agents/engineering/security-engineer) | [Integration.revoke](/business/nouns/integration/revoke) | None |
| [Offboard from a Role](/workflows/processes/staffing/offboard-from-role) | 2. Hand the holder’s open Tasks to the Role’s escalation Role. | [People Lead](/agents/people/people-lead) | [Task.assign](/business/nouns/task/assign) | None |
| [Offboard from a Role](/workflows/processes/staffing/offboard-from-role) | 3. Release a person with the cause on record. | [People Lead](/agents/people/people-lead) | [Human.release](/business/nouns/human/release) | None |
| [Offboard from a Role](/workflows/processes/staffing/offboard-from-role) | 4. Pay the person any final amount owed. | [Payroll Specialist](/agents/people/payroll-specialist) | [Human.remit](/business/nouns/human/remit) | Asks first; waits 1 business hour |

## Events
| Direction | When | What happens |
| --- | --- | --- |
| In | On `Startup.created` | Starts [Staff roles](/workflows/processes/staffing/staff-roles) |
| In | On [`Role.staffed`](/business/events/Role.staffed) | Starts [Onboard into a Role](/workflows/processes/staffing/onboard-into-role) |
| In | On [`Role.vacated`](/business/events/Role.vacated) | Starts [Offboard from a Role](/workflows/processes/staffing/offboard-from-role) |
| Out | [`Agent.minted`](/business/events/Agent.minted) | Raised by step 2 of [Staff roles](/workflows/processes/staffing/staff-roles) |
| Out | `Role.updated` | Raised by step 3 of [Staff roles](/workflows/processes/staffing/staff-roles) |
| Out | `Permission.created` | Raised by step 4 of [Staff roles](/workflows/processes/staffing/staff-roles) |
| Out | `Message.created` | Raised by step 2 of [Onboard into a Role](/workflows/processes/staffing/onboard-into-role) |
| Out | [`Human.onboarded`](/business/events/Human.onboarded) | Raised by step 3 of [Onboard into a Role](/workflows/processes/staffing/onboard-into-role) |
| Out | `Task.created` | Raised by step 4 of [Onboard into a Role](/workflows/processes/staffing/onboard-into-role) |
| Out | [`Integration.revoked`](/business/events/Integration.revoked) | Raised by step 1 of [Offboard from a Role](/workflows/processes/staffing/offboard-from-role) |
| Out | [`Task.assigned`](/business/events/Task.assigned) | Raised by step 2 of [Offboard from a Role](/workflows/processes/staffing/offboard-from-role) |
| Out | [`Human.released`](/business/events/Human.released) | Raised by step 3 of [Offboard from a Role](/workflows/processes/staffing/offboard-from-role) |
| Out | [`Human.remitted`](/business/events/Human.remitted) | Raised by step 4 of [Offboard from a Role](/workflows/processes/staffing/offboard-from-role) |

## Plays
No Play names this Process.

## Controls
- [Conduct](/systems/trust-and-governance/controls/conduct)
- [Role structure](/systems/trust-and-governance/controls/role-structure)
- [Worker competence](/systems/trust-and-governance/controls/worker-competence)
- [Action accountability](/systems/trust-and-governance/controls/action-accountability)
- [Unseated access](/systems/trust-and-governance/controls/unseated-access)

## Settings
None.

## Failure
A failed step retries; when retries run out, the Action goes to the [People Lead](/agents/people/people-lead).

| Step | On failure |
| --- | --- |
| [Onboard into a Role](/workflows/processes/staffing/onboard-into-role) 3. Record a person as onboarded once they accept the contract. | Times out after 7 days. Goes to the [People Lead](/agents/people/people-lead). `agent`: An agent fills the seat and takes the contract at once. Continues at `review`. |
| [Offboard from a Role](/workflows/processes/staffing/offboard-from-role) 1. Revoke every Integration the holder connected, within the hour. | Times out after 1 hour. Goes to the [People Lead](/agents/people/people-lead). |
| [Offboard from a Role](/workflows/processes/staffing/offboard-from-role) 3. Release a person with the cause on record. | `agent`: An agent held the seat, so its history stays and nothing is owed. |
| [Offboard from a Role](/workflows/processes/staffing/offboard-from-role) 4. Pay the person any final amount owed. | Goes to the [People Lead](/agents/people/people-lead). |

## Loop
| Step | Value |
| --- | --- |
| Hypothesis | An Agent in a Role delivers the same accepted outcomes as a Human at a lower fully loaded Cost. |
| Measure | [Fully loaded Cost](/agents/finance#fully-loaded-cost) over 30d, at least 30 observations |
| Learn | The learn step reads the Readout, records Evidence and a Decision, and drafts the next Variant. |

## Code

**Ask**

```text
Turn on staffing
```

**API**

```bash
curl -X POST https://api.sb/leaseline.app/processes/process_1/enable \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

**SDK**

```ts
import { $ } from 'startup-builder'

await $.Process.enable({ process: 'process_1' })
```

**CLI**

```bash
npx startup-builder do Process.enable --json '{"process":"process_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Process.enable({ process: 'process_1' })"
  }
}
```

## Enable
On by default for every Product Template. [Process.pause](/business/nouns/process/pause) stops new Actions; Actions in progress finish.

## Example
A new bookkeeping service starts with a default Agent in each awake Role, Sally in the [Sales Lead](/agents/sales/sales-lead) seat among them. Its founder holds the [Founder](/agents/founding/founder) Role as a Human, and a licensed preparer fills the one seat that signs returns.