Developers
Sign inGet API keys
API reference/Intelligence

Autopilot

AutopilotService is Nuru, the agent that runs a business's back office in the background and asks a person only to approve. See docs/adr/0066-autopilot-foundations.md.

Phase 0 lays the groundwork. A built-in connector reads each business's change feed (sales, payments, stock levels, timecards and the rest), keeps daily signal counts, and gathers agent actions from what Lumora already drafts or notices: forecast purchase orders and schedules, stock findings and alerts. Every action and what happened to it is recorded, so the approval rate, edit rate and time to act can be measured from the start.

Reading needs reports.view, inventory.manage or shifts.manage; acting on an action needs the permission its kind needs (inventory.manage for purchase orders and stock findings, shifts.manage for schedules, reports.view for alerts); changing autonomy needs settings.manage.

holygrail.autopilot.v1.AutopilotService7 methodsinsights.read · insights.write

GetAutopilot#

insights.readRead
POST/holygrail.autopilot.v1.AutopilotService/GetAutopilot

GetAutopilot is whether Nuru runs for the business, its autonomy per kind, what is waiting, and what the connector last saw.

Request body

No fields: send {}.

Response

onboolean
reasonstring

Why it is off: platform_off, business_off, not_in_plan, addon_needed or canceled.

messagestring
agentNamestringagent_name

The agent's name: Nuru.

autonomyAutonomy[]
openActionsint64 stringopen_actions

Open actions the caller can see.

lastCollectedAtstringlast_collected_at

RFC 3339; empty before the connector's first round.

lastChangeAtstringlast_change_at
signalsTodaySignalCount[]signals_today

Changes the connector read today across the caller's locations, by entity (order, payment, stock_level, timecard, ...).

What was done for the business in the last 7 days.

Open actions the caller can see, per kind.

Getting Nuru ready (ADR 80): what it needs from the business to be useful, in order, each done or not.

Request
curl https://api.buziin.tech/holygrail.autopilot.v1.AutopilotService/GetAutopilot \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "on": false,
  "reason": "",
  "message": "",
  "agentName": "Amina Mushi",
  "autonomy": [
    {
      "kind": "",
      "label": "",
      "mode": "",
      "modes": [
        ""
      ]
    }
  ],
  "openActions": "0",
  "lastCollectedAt": "",
  "lastChangeAt": "",
  "signalsToday": [
    {
      "entity": "",
      "changes": "0"
    }
  ],
  "week": {
    "done": "0",
    "amount": "150000",
    "minutesSaved": "0"
  },
  "waiting": [
    {
      "kind": "",
      "label": "",
      "count": 1,
      "amount": "150000"
    }
  ],
  "setup": [
    {
      "key": "",
      "title": "",
      "detail": "",
      "done": false,
      "href": "",
      "optional": false
    }
  ]
}

UpdateAutonomy#

insights.writeWrite
POST/holygrail.autopilot.v1.AutopilotService/UpdateAutonomy

UpdateAutonomy sets how far Nuru may go on its own for one kind.

Request body

kindstring
modestring

Response

autonomyAutonomy[]
Request
curl https://api.buziin.tech/holygrail.autopilot.v1.AutopilotService/UpdateAutonomy \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "autonomy": [
    {
      "kind": "",
      "label": "",
      "mode": "",
      "modes": [
        ""
      ]
    }
  ]
}

ListAgentActions#

insights.readRead
POST/holygrail.autopilot.v1.AutopilotService/ListAgentActions

ListAgentActions lists actions, newest first.

Request body

locationIdstringlocation_id

Empty for every location the caller can see.

statusesstring[]

Empty for every status; else open, approved, dismissed, applied, undone or expired.

kindsstring[]

Empty for every kind.

limitinteger

At most 200; 50 when unset.

cursorstring

The next_cursor of the page before.

Response

nextCursorstringnext_cursor
Request
curl https://api.buziin.tech/holygrail.autopilot.v1.AutopilotService/ListAgentActions \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
  "statuses": [
    ""
  ],
  "kinds": [
    ""
  ]
}'
Response example
{
  "actions": [
    {
      "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
      "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
      "kind": "",
      "subject": "",
      "source": "",
      "sourceId": "",
      "severity": "",
      "title": "",
      "detail": "",
      "basis": "",
      "amount": "150000",
      "link": "",
      "changeJson": "",
      "status": "",
      "edited": false,
      "decidedVia": "",
      "decidedBy": "",
      "decidedAt": "",
      "note": "",
      "createdAt": "",
      "lastSeenAt": "",
      "outcome": "",
      "aboutMemberIds": [
        ""
      ]
    }
  ],
  "nextCursor": ""
}

ActOnAgentAction#

insights.writeWrite
POST/holygrail.autopilot.v1.AutopilotService/ActOnAgentAction

ActOnAgentAction approves, dismisses, undoes or marks seen one action. Approving carries the action out where it lives: the purchase order is sent to its vendor, the week's shifts are published, the stock finding is resolved, the alert is cleared. Undo reopens a finding; a sent order or published week is changed from its own page.

Request body

idstring
actionstring

approve, dismiss, undo or seen. A staff integrity case is never approved or dismissed: it is reviewed with fine, coaching, escalate or confirm, each but fine with a note.

editedboolean

The person changed the draft before approving.

notestring

Response

Request
curl https://api.buziin.tech/holygrail.autopilot.v1.AutopilotService/ActOnAgentAction \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01"
}'
Response example
{
  "action": {
    "id": "4f1c2e9a-8b3d-4e57-9a10-2c6f7d8e9b01",
    "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
    "kind": "",
    "subject": "",
    "source": "",
    "sourceId": "",
    "severity": "",
    "title": "",
    "detail": "",
    "basis": "",
    "amount": "150000",
    "link": "",
    "changeJson": "",
    "status": "",
    "edited": false,
    "decidedVia": "",
    "decidedBy": "",
    "decidedAt": "",
    "note": "",
    "createdAt": "",
    "lastSeenAt": "",
    "outcome": "",
    "aboutMemberIds": [
      ""
    ]
  }
}

GetAutopilotMetrics#

insights.readRead
POST/holygrail.autopilot.v1.AutopilotService/GetAutopilotMetrics

GetAutopilotMetrics is how people responded to Nuru over a period: per kind and overall, how many were approved, edited, dismissed or left, and how long people took.

Request body

daysinteger

Days back from now, 1 to 365; 30 when unset.

locationIdstringlocation_id

Empty for every location the caller can see.

Response

daysinteger
activeDaysintegeractive_days

Distinct days in the period with someone acting on an action, the "opens the inbox on 4 days a week" measure.

Request
curl https://api.buziin.tech/holygrail.autopilot.v1.AutopilotService/GetAutopilotMetrics \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'
Response example
{
  "days": 0,
  "kinds": [
    {
      "kind": "",
      "created": "0",
      "open": "0",
      "approved": "0",
      "edited": "0",
      "dismissed": "0",
      "applied": "0",
      "undone": "0",
      "expired": "0",
      "approvalRateBp": 0,
      "editRateBp": 0,
      "medianSecondsToDecide": "0",
      "seen": "0"
    }
  ],
  "overall": {
    "kind": "",
    "created": "0",
    "open": "0",
    "approved": "0",
    "edited": "0",
    "dismissed": "0",
    "applied": "0",
    "undone": "0",
    "expired": "0",
    "approvalRateBp": 0,
    "editRateBp": 0,
    "medianSecondsToDecide": "0",
    "seen": "0"
  },
  "activeDays": 0
}

SyncAutopilot#

insights.writeWrite
POST/holygrail.autopilot.v1.AutopilotService/SyncAutopilot

SyncAutopilot runs the connector for the business now instead of waiting for its next round.

Request body

No fields: send {}.

Response

changesReadint64 stringchanges_read

Change feed entries read and actions gathered or updated.

actionsOpenint64 stringactions_open
lastCollectedAtstringlast_collected_at
Request
curl https://api.buziin.tech/holygrail.autopilot.v1.AutopilotService/SyncAutopilot \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Response example
{
  "changesRead": "0",
  "actionsOpen": "0",
  "lastCollectedAt": ""
}

RecordVoiceCommand#

insights.writeWrite
POST/holygrail.autopilot.v1.AutopilotService/RecordVoiceCommand

RecordVoiceCommand notes what someone said to Nuru and what it did (ADR 119), so the audit log shows who said what. Refused when the business turned voice off for the caller's role.

Request body

saidstring

What the phone heard.

languagestring

The language listened in: sw-TZ or en-US.

actionstring

What Nuru did with it: ask, approve, dismiss, brief, receive, waste, handover, count, order, price_check or none.

targetIdstringtarget_id

What it acted on, such as an agent action or purchase order id.

locationIdstringlocation_id
outcomestring

ok, cancelled (the person said no) or failed.

Response

No fields: send {}.

Request
curl https://api.buziin.tech/holygrail.autopilot.v1.AutopilotService/RecordVoiceCommand \
  -H "Authorization: Bearer $LUMORA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70"
}'
Response example
{}

Types

The messages and enums these methods use. Field names are lowerCamelCase in JSON; the snake_case names work too. Enum values are sent as their names.

GetAutopilotRequest

holygrail.autopilot.v1.GetAutopilotRequest

No fields.

GetAutopilotResponse

holygrail.autopilot.v1.GetAutopilotResponse

onboolean
reasonstring

Why it is off: platform_off, business_off, not_in_plan, addon_needed or canceled.

messagestring
agentNamestringagent_name

The agent's name: Nuru.

autonomyAutonomy[]
openActionsint64 stringopen_actions

Open actions the caller can see.

lastCollectedAtstringlast_collected_at

RFC 3339; empty before the connector's first round.

lastChangeAtstringlast_change_at
signalsTodaySignalCount[]signals_today

Changes the connector read today across the caller's locations, by entity (order, payment, stock_level, timecard, ...).

What was done for the business in the last 7 days.

Open actions the caller can see, per kind.

Getting Nuru ready (ADR 80): what it needs from the business to be useful, in order, each done or not.

UpdateAutonomyRequest

holygrail.autopilot.v1.UpdateAutonomyRequest

kindstring
modestring

UpdateAutonomyResponse

holygrail.autopilot.v1.UpdateAutonomyResponse

autonomyAutonomy[]

ListAgentActionsRequest

holygrail.autopilot.v1.ListAgentActionsRequest

locationIdstringlocation_id

Empty for every location the caller can see.

statusesstring[]

Empty for every status; else open, approved, dismissed, applied, undone or expired.

kindsstring[]

Empty for every kind.

limitinteger

At most 200; 50 when unset.

cursorstring

The next_cursor of the page before.

ListAgentActionsResponse

holygrail.autopilot.v1.ListAgentActionsResponse

nextCursorstringnext_cursor

ActOnAgentActionRequest

holygrail.autopilot.v1.ActOnAgentActionRequest

idstring
actionstring

approve, dismiss, undo or seen. A staff integrity case is never approved or dismissed: it is reviewed with fine, coaching, escalate or confirm, each but fine with a note.

editedboolean

The person changed the draft before approving.

notestring

ActOnAgentActionResponse

holygrail.autopilot.v1.ActOnAgentActionResponse

GetAutopilotMetricsRequest

holygrail.autopilot.v1.GetAutopilotMetricsRequest

daysinteger

Days back from now, 1 to 365; 30 when unset.

locationIdstringlocation_id

Empty for every location the caller can see.

GetAutopilotMetricsResponse

holygrail.autopilot.v1.GetAutopilotMetricsResponse

daysinteger
activeDaysintegeractive_days

Distinct days in the period with someone acting on an action, the "opens the inbox on 4 days a week" measure.

SyncAutopilotRequest

holygrail.autopilot.v1.SyncAutopilotRequest

No fields.

SyncAutopilotResponse

holygrail.autopilot.v1.SyncAutopilotResponse

changesReadint64 stringchanges_read

Change feed entries read and actions gathered or updated.

actionsOpenint64 stringactions_open
lastCollectedAtstringlast_collected_at

RecordVoiceCommandRequest

holygrail.autopilot.v1.RecordVoiceCommandRequest

saidstring

What the phone heard.

languagestring

The language listened in: sw-TZ or en-US.

actionstring

What Nuru did with it: ask, approve, dismiss, brief, receive, waste, handover, count, order, price_check or none.

targetIdstringtarget_id

What it acted on, such as an agent action or purchase order id.

locationIdstringlocation_id
outcomestring

ok, cancelled (the person said no) or failed.

RecordVoiceCommandResponse

holygrail.autopilot.v1.RecordVoiceCommandResponse

No fields.

Autonomy

holygrail.autopilot.v1.Autonomy

Autonomy is how far Nuru may go for one kind of action.

kindstring

purchase_order, schedule, stock_finding or alert.

labelstring
modestring

suggest (draft and wait), auto (act, with undo) or off (stay quiet).

modesstring[]

Modes this kind supports; some kinds can't act on their own yet.

SignalCount

holygrail.autopilot.v1.SignalCount

entitystring
changesint64 string

WeekTally

holygrail.autopilot.v1.WeekTally

WeekTally is the "done for you this week" tally: actions people approved in the inbox or at their source, or that Nuru carried out, in the last 7 days.

doneint64 string
amountint64 string

Money in the purchase orders among them, in minor units.

minutesSavedint64 stringminutes_saved

A rough estimate of the admin minutes saved, from a typical time per kind (a purchase order 15 minutes, a week's schedule 45, a finding 10, an alert 5).

KindTally

holygrail.autopilot.v1.KindTally

kindstring
labelstring
countint64 string
amountint64 string

SetupStep

holygrail.autopilot.v1.SetupStep

SetupStep is one item on the onboarding checklist.

keystring

vendors, recipes, reorder_points, stock_count, schedule, invoice, phone, payments or accounting.

titlestring
detailstring

Why it matters to Nuru.

doneboolean
hrefstring

Where in the dashboard to do it.

optionalboolean

Useful, but Nuru works without it.

AgentAction

holygrail.autopilot.v1.AgentAction

idstring
locationIdstringlocation_id
kindstring
subjectstring

What it is about: "po:<id>", "finding:<id>", "schedule:<location>:<week>".

sourcestring

forecast, stock_findings or alerts.

sourceIdstringsource_id
severitystring

high, medium or low.

titlestring
detailstring
basisstring

How it was worked out, in plain words.

amountint64 string

Money at stake, in minor units of the business's currency.

linkstring

Where in the dashboard to see it.

changeJsonstringchange_json

The change it proposes, as JSON: {"before": ..., "after": ...}.

statusstring

open, approved, dismissed, applied, undone or expired.

editedboolean
decidedViastringdecided_via

inbox, source or auto; empty while open.

decidedBystringdecided_by
decidedAtstringdecided_at
notestring
createdAtstringcreated_at
lastSeenAtstringlast_seen_at
outcomestring

Staff integrity cases (kind integrity_case, ADR 79): what the reviewer concluded (fine, coaching, escalated or confirmed; empty until then), and the team members the case is about, who never see it.

aboutMemberIdsstring[]about_member_ids

KindMetrics

holygrail.autopilot.v1.KindMetrics

kindstring

A kind, or "all".

createdint64 string
openint64 string
approvedint64 string
editedint64 string
dismissedint64 string
appliedint64 string
undoneint64 string
expiredint64 string
approvalRateBpintegerapproval_rate_bp

Of the decided ones (approved, dismissed, applied), the share approved or applied, in basis points (10000 = 100%).

editRateBpintegeredit_rate_bp

Of the approved ones, the share a person changed first, in basis points.

medianSecondsToDecideint64 stringmedian_seconds_to_decide

Median seconds from an action appearing to a person deciding it.

seenint64 string

Times people looked at an action in the inbox.

Base URL https://api.buziin.tech. Every method is POST with a JSON body; see Making requests.