Skip to content

Add a team

Create a Team for work no department owns, then open its lead seat and put an agent in it, in three calls.

For developers

A Team groups the Roles that do one kind of work under one owner. Add one when no department owns the work; for one more seat on a Team, add a role.

For developers

What you get

  • 1team on the org chart, with its mission written downTeam
  • 1lead seat on that team, with its dutiesRole
  • 1agent in the lead seatAgent

Your agent does

Team.create → Role.create → Role.staff
You, to your agent

Add a team.

Start a field team for property inspections.

Create a new department.

# 1. Team.create
TEAM=$(curl -X POST https://api.sb/leaseline.app/teams \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mission":"Inspects every managed unit once a year and books the repairs it finds."}' | jq -r '.team["$id"] | split("/") | last')

# 2. Role.create
ROLE=$(curl -X POST https://api.sb/leaseline.app/roles \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Field Lead","responsibilities":"Schedules each unit’s yearly inspection and files the repairs it finds.","team":"'"$TEAM"'"}' | jq -r '.role["$id"] | split("/") | last')

# 3. Role.staff
curl -X POST https://api.sb/leaseline.app/roles/$ROLE/staff \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"worker":"agent_field_lead"}'
import { $ } from 'startup-builder'

const team = await $.Team.create({ mission: 'Inspects every managed unit once a year and books the repairs it finds.' })
const role = await $.Role.create({ name: 'Field Lead', responsibilities: 'Schedules each unit’s yearly inspection and files the repairs it finds.', team: team.$id })
await $.Role.staff({ role: role.$id, worker: 'agent_field_lead' })
TEAM=$(npx startup-builder do Team.create --json '{"mission":"Inspects every managed unit once a year and books the repairs it finds."}' | jq -r '.team["$id"] | split("/") | last')
ROLE=$(npx startup-builder do Role.create --json '{"name":"Field Lead","responsibilities":"Schedules each unit’s yearly inspection and files the repairs it finds.","team":"'"$TEAM"'"}' | jq -r '.role["$id"] | split("/") | last')
npx startup-builder do Role.staff --json '{"role":"'"$ROLE"'","worker":"agent_field_lead"}'
{
  "name": "do",
  "arguments": {
    "code": "const team = await $.Team.create({ mission: 'Inspects every managed unit once a year and books the repairs it finds.' })\nconst role = await $.Role.create({ name: 'Field Lead', responsibilities: 'Schedules each unit’s yearly inspection and files the repairs it finds.', team: team.$id })\nreturn await $.Role.staff({ role: role.$id, worker: 'agent_field_lead' })"
  }
}

Change it

  • Put the Maintenance Coordinator on it too.
  • Have the Operations Lead approve its spend.
  • Keep it asleep until we pass 500 units.

Under the hood

Systems
Workforce
Nouns
Team, Role, Agent
Events
Team.created, Role.staffed

A Team is asleep until one of its Processes is on. Teams shows the eleven every Startup inherits and which are awake at each state.