Skip to content
StoryOS Docs
Search
Ctrl
K
Cancel
GitHub
Select theme
Dark
Light
Auto
Changelog
Getting Started
What is StoryOS
Quickstart
Core concepts
Guides
Share a portal with a client
Creating a workspace
Migrating your data
Migrate from Linear
Removing a member, and GDPR
Keyboard shortcuts
Webhooks
Run your work with an agent team
Writing a pack manifest
The Team Board pack
The Shop OS pack
The Team Wiki pack
The Dev Tracker pack
The Deal Desk pack
The Lead Follow-up pack
Connecting GitHub
Sources
Copying a record into another database
Sync with Google Calendar
The StoryOS Runner
Hiring an agent
Adding and removing a Runner
Running the Runner on a small server
Self-hosting
Overview
Configuration
Attachments (S3/MinIO)
PDF export (optional)
Backup & upgrade
Concepts
Workspaces, spaces & databases
Databases & fields
Relations
Lookups & rollups
Formulas
Views
Automations & buttons
Validation rules
Access & roles
Data model reference
Mentions and notifications
Files & attachments
Record history
Personal space
Dashboards
Organising the sidebar
Tyron, the in-app assistant
Agent runs
Skills
Split-screen panels
Portal recipients
Settings
Settings
Workspace
AI
Connections
Data & security, and You
Use with AI (MCP)
Overview
Tools
Connect (Claude Code & Desktop)
Hosted MCP (HTTP + PAT)
OAuth connector
API
Overview
Authentication
Querying records
Conventions
Build an MCP server
API Reference
Overview
App
AppController_health
AppController_buildInfo
system
Liveness + database connectivity check
auth
Current authenticated user
Enabled auth providers (google appears only when configured)
What an AI client is asking for: its name, the host it redirects to, the scopes, and the workspaces you could limit it to
Allow (all your workspaces, or only workspace_id) or deny an AI client; returns where to send the browser next
workspaces
List workspaces I belong to
Create a workspace (creator becomes admin). With invite_token the invite is accepted instead and NO workspace is created: the response is the workspace joined, with joined_via_invite true. A token that cannot be accepted refuses and creates nothing.
Workspace details
Update workspace (admin)
List spaces (guests: scoped spaces only)
Create a space
Deleted spaces in this workspace (admin)
Get or create the caller's personal space
Delete a space (creator on this space, or admin)
Rename/reorder a space
Restore a deleted space, its cascade-deleted databases, and their fields/records/views (admin)
List active members
Remove a member (admin)
Change a member role / guest scoping (admin)
List pending invites (admin)
Invite by email; guests require space_ids (admin)
Resend a pending invite; returns a fresh link (admin)
Revoke a pending invite (admin). The invite is kept as a tombstone so its link can say "revoked"; it stops being pending at once.
Accept an invite by token (must match your email)
Live Getting-Started state, derived from what actually exists (MN-213)
The hints I have dismissed in this workspace
Set (or replace) the list of hints I have dismissed in this workspace
Show every hint again: clear my dismissed list for this workspace
public
What an invite link says, no sign-in: inviter name, workspace name and logo, the invited email, and whether it is valid, expired, used or revoked. A revoked invite keeps its details (like expired and used) so the screen can say who to ask. An unknown, malformed or replaced token returns status "not_found" with every other field null (same body, so tokens cannot be probed).
A public skill, by its link token (portable fields only)
Public view definition + one page of records (link/public access only)
Stop the My work email: a signed link, no sign-in. Redirects to Settings › Notifications
Stop the My work email (RFC 8058 one-click List-Unsubscribe-Post). Signed token, no sign-in
The built-in Business Pack gallery — public, pre-signup
One built-in pack — public, pre-signup preview
Public form definition (link/public access only)
Submit a public form → creates or (portal-scoped) edits a record (anonymous). Multipart with a "payload" JSON text part when the form has an attachment field.
Search candidate records for a public form relation field
Create a new linked record from a public form relation field
spaces
Folders in a space (MN-096)
Create a folder in a space
Delete a folder (its items fall back to the space root)
Rename / re-icon / reorder a folder
Presentational sidebar groups (#742 finding 04)
Create a sidebar group
Delete a sidebar group (its spaces fall back to ungrouped)
Rename / re-colour / reorder a sidebar group
tokens
The AI clients I have connected, as one list: hosted-MCP OAuth clients (Claude, ChatGPT, ...) and my personal access tokens for this workspace, with name, method and since when
Disconnect one of my AI clients (id from the list: oauth:<client> or token:<id>). Needs a signed-in session: an API token or an OAuth client cannot disconnect
My personal access tokens (prefix only — plaintext is never stored)
Create a PAT — the token is shown ONCE in this response
Revoke a token (immediate)
billing
Plan, status, usage vs limits, and whether billing is configured
Create a Stripe Checkout session for a plan; returns a redirect URL
Create a Stripe Customer Portal session; returns a redirect URL
Start the 30-day Pro trial (no card, no Stripe subscription yet)
Stripe webhook receiver — signature-verified, unauthenticated by design
Current AI credit balance, auto-reload config, and card-on-file status
Create a one-time Checkout session to add credits; returns a redirect URL
Configure (or disable) auto-reload
access
List access grants (optionally for one user)
Grant a role on a space or database (upserts per scope)
Revoke a grant
referrals
This user’s referral link, code, and rewards summary
Attribute the current user as referred by a code (first-touch, one-time, best-effort)
action-gates
List this workspace's declared action-class gate policies
Declare a gate over an action class, scoped to workspace/space/database. Only classes the server enforces are accepted (422 lists them); today: delete_records
Remove a gate policy
Enable/disable a gate policy, or change its approver
agent-write-gates
List the gates that hold an agent's record create/update for approval (an admin: any agent or all; the agent's owner: that agent only, agent_id required)
Gate an agent's record create and/or update for approval, optionally limited to one database and to named fields (a person who is an admin)
Remove an agent write gate (a person who is an admin)
Switch an agent write gate on or off (a person who is an admin)
fields
Convert a user field into a relation to the Members database. DRY RUN by default: reports matched/unresolvable counts, the per-role permission-neutrality proof, and what would be created. Applying keeps the original field (renamed) and parks anything unresolvable; nothing is dropped.
Convert a relation to the Members database back into a user field (the reverse). DRY RUN by default. Removes the relation and its Members-side inverse field; Members rows with no user id are parked in a text field.
Add a field (select types accept initial options)
Dry-run a formula: parse, type-check and evaluate it on up to 5 recent records; returns the return type or positioned errors, and saves nothing (#1263)
Soft-delete a field (returns records_with_value)
Rename / reconfigure / reorder a field
What depends on this field — records carrying a value, plus views/automations/formulas referencing it (#681)
Convert field type within the compatibility matrix (dry_run supported)
Add a select option
Put a choice field's options in this order (every option, once); writes dense positions 0..n-1
Delete an option — 409 with usage count unless confirm: true
Rename / recolor / reorder an option (O(1), ids are stable)
My personal view override for this embedded collection
Set (or replace) my personal view override for this embedded collection
Clear my personal override for this embedded collection (falls back to the shared default)
Scan every readable database for a select that looks like its lifecycle (status) field, and say which databases already have a workflow field. Read-only.
Convert chosen selects to the Workflow field type through the existing per-field conversion. DRY RUN by default (dry_run: false to apply); needs creator on each database; per-item results, one refusal does not stop the rest.
databases
List databases (guests: scoped spaces only)
Create a database (auto: title field, system fields, default view)
Deleted databases in this workspace (admin)
Database with live fields and views (schema introspection)
Hard delete (creator on this database, or admin) — body.confirm must equal the name
Rename / re-icon (creator); moving between spaces stays member+
Restore a deleted database, and whatever fields/records/views were deleted with it (admin)
Duplicate a database — schema, or schema + records (#266)
records
List records (manual order, optional q= title search, cursor)
Create a record ({values} keyed by field api_name)
#230: match-or-create on a unique key. key_field must be a field marked unique (#229); values[key_field] is the match value.
Query records: filter AST + sorts + q + keyset cursor (the workhorse)
Count or aggregate records server-side (same filter AST as /query)
One aggregate value per group — a board/dashboard column's true total, in one query
Create up to 100 records atomically
Apply one values patch to up to 5000 records (partial failures reported)
#653 — undo a batch update using the `restorable` list its response reported
#694 — enqueue a durable bulk update/delete job (poll via GET .../batch-jobs/:id)
#694 — poll a bulk record job's status and progress
Soft-delete up to 5000 records
Restore up to 5000 records from trash
Soft-deleted records (30-day retention)
Resolve a record by its public per-database number (MN-087)
Single record, values keyed by api_name
Soft delete (restorable for 30 days)
Merge-update values (null clears a field)
The git branch name for this record, derived (never stored): [lane/]<number>-<title-slug> (ticket #1219)
Duplicate: clone values + description + single/m2m links (not owned collections)
Watch this record — get notified (inbox/email) on any change (#236)
Stop watching this record (#236)
List this record's watchers + whether I watch it (#236)
Atomic move: fractional reposition + optional value patch (kanban drop)
Restore from trash
Copy records into another database (map -> dry-run -> apply). dry_run (default true) returns the field mapping and any blocking fields without writing anything.
mentions
Records whose document mentions this one ("Mentioned in") — MN-205, paged (#512)
notifications
My notifications, newest first (filter by type; archived view)
Unread badge count
Mark one notification read
Mark everything read
Archive one notification (MN-073)
Restore an archived notification to the inbox
users
Set my avatar (multipart field "file", png/jpeg/webp ≤1MB)
Remove my avatar (falls back to initials)
Serve a user avatar (session required)
My preferences (defaults applied)
Update my preferences (deep-merged)
Add and/or remove items of a list-valued preference (dismissed_workspaces, views_only_workspaces), atomically: two tabs adding different items never lose one
attachments
Attachments on a record
Upload a file (multipart field "file"; size-capped). `?field=<id>` puts it in an attachment field instead of the record bag (#391)
Attach a file the server fetches from a public URL (guarded: no private/metadata addresses, redirects re-checked, size-capped). `?field=<id>` as for upload
Download the file (authz-checked, streamed)
Image thumbnail (404 for non-images)
Delete an attachment (object removed best-effort)
relations
Every relation in the workspace — one entry per relation, both sides resolved (#448)
Create a relation — needs creator on BOTH databases
Relation config + comparable fields for the auto-link editor
Delete a relation, both its fields, and all links (confirm: true)
Set or clear a relation’s auto-link rules (MN-085)
Run auto-link now across existing records — returns a summary (MN-085)
Detect select↔relation drift for a parent record (MN-286): child records whose select-field label matches the parent’s title but aren’t linked here
Bulk-link every currently-drifted child record to the parent (MN-286)
Linked records for a relation field ({id, title} chips)
Replace all links for this record on this field
Add links (409 when one-to-many already linked)
Remove specific links
validation-rules
List this database's validation rules, each with how many stored records break it now
Declare a rule that REFUSES a record write when its condition is not met. Applies to every writer, admins included; no bypass.
Delete a rule
Change a rule's name, condition, message or enabled flag (the trigger is fixed)
The stored records that ALREADY break this rule (a rule only fires when a field it references changes, so existing violations persist; this is how they are seen)
buttons
Press a button field (editor+); actions run as the presser
automations
List rules
Create a rule (trigger + condition + actions)
Delete a rule
Update / enable / disable a rule
Run history (90-day retention, MN-264)
Dry-run a rule against one record
Rotate a webhook_received rule's token + secret — the old URL 404s immediately
The most recent payload a webhook_received rule received (for token mapping)
hooks
Inbound webhook receiver for a webhook_received automation rule
approvals
List approvals for this workspace, optionally filtered by status
How many approvals match (status=pending means waiting: pending and not expired) — an exact count, unlike the list, which is capped at 100 rows
Approve a pending approval — enqueues the gated action from its frozen snapshot (human-only)
Reject a pending approval — the gated action never runs (human-only)
webhooks
List webhooks (secrets are never returned)
Create a webhook — the signing secret is returned once, here only
Delete a webhook
Update a webhook (url / events / enabled; take_ownership makes you its owner and resumes it if paused)
Recent delivery attempts — status, code, error, retries
comments
Comments, newest first
Comment (guests included); mentions extracted server-side
Delete own comment (admins: any)
Edit own comment
activity
Record activity trail, newest first (cursor)
#674 — comments + references across a relation tree rooted at this record (e.g. Epic→Story→Task)
#240 — comments across every record in this database, newest first (cursor)
Workspace-wide activity + field changes, filterable by actor/entity/date range (admin)
record-versions
Record version history, newest first (cursor)
Per-field change history, newest first (cursor)
A single version, as a diff preview against the record's current values
Restore the record to a previously captured version
integrations
Integrations directory — registry metadata + per-integration connected status
GitHub config (token presence + repos + App connect state)
Save GitHub token, repos, webhook secret and/or state automation
Begin GitHub App OAuth connect (redirects to GitHub)
List the connected installation's repositories
Import/refresh Issues + PRs; auto-links PRs to issues by #N / branch refs
Disconnect GitHub — clears token, App installation and watched repos
Reviews sidebar: PRs in one bucket (needs_review/authored/participating)
PR detail: metadata, changed files (with patch), checks
Cached inline review comments for this PR
Post a new inline (file/line-anchored) review comment
Reply within an existing comment thread
React to a review comment
Poll GitHub for review comments and refresh the local cache
Approve / Request changes / Comment — submits a GitHub PR review
Code & reviews settings (defaulted)
Save Code & reviews settings
GitHub webhook receiver — HMAC-verified, unauthenticated by design
GitHub App OAuth callback — verifies state and the signed-in person, resolves the installation from the OAuth code
Linear config (key presence + team keys)
Save Linear API key and/or team-key filter
Preview import counts per team — writes nothing
Import teams → spaces (Issues/Sprints/Projects), idempotent by Linear ID
Disconnect Linear — clears the stored API key and team-key filter
Slack config (token/webhook presence + default channel)
Save Slack bot token, webhook URL and/or default channel
Send a test message using the saved Slack config, to verify the connection
Disconnect Slack — clears the stored bot token, webhook and default channel
Create the Shopify product catalogue — databases, sources and relations in one click
Shopify product/collection webhook for one connection — HMAC-verified, unauthenticated by design
documents
Record description (BlockNote JSON; version 0 = never written)
Write the description — 409 with current version on conflict
Document version history, newest first (cursor)
A single document version, as a block-level diff preview against the current content
Restore the document to a previously captured version
Standalone documents in a space (MN-095)
Create a standalone document in a space
A standalone document (BlockNote content + version)
Delete a standalone document
Update title/icon/content — 409 on version conflict
Download the document as Markdown (#262)
Download the document as a PDF (#262 — rendered by the PDF sidecar, #794)
Move a document to a shared space (one-way out of Personal; notifies its mentions)
Copy a document into my personal space (independent fork, no sync)
connections
List connections (auth material is never returned)
Connect an api_key/smtp provider — runs a live health check before saving
The provider catalog — what can be connected, and how
Disconnect — hard-deletes the row, no tombstone
Set the one URL prefix an HTTP connection's credential may be sent to (#1035)
Re-run the provider health check against the stored credential
MN-264: manually close the circuit breaker before its cool-down elapses
Begin an OAuth2 connect (redirects to the provider)
OAuth2 callback — verifies state, exchanges the code, seals the tokens
Resend bounce/complaint webhook for one connection — signature-verified, unauthenticated by design
sources
List the sources syncing into this database
Configure a new source: provider + connection + field mapping + schedule
The source provider catalog — what can be synced, and its config shape
#341: list the YouTube channels a Google connection owns, for the channel picker
MN-262: preview a provider's field keys before creating a source (point-and-click mapping)
Stop syncing — leaves every record the source created intact
Reconfigure a source
Run one sync cycle immediately, ignoring the schedule gate
Recent sync runs for one source (fetched/created/updated/errors)
skills
List skills visible to the caller: their own, plus every shared one
Create a skill — shared with the workspace by default, whether a person or an agent (token, connected AI) creates it. An agent can also share it with named workspace members; making one public only raises an approval a person must give. A workspace admin can switch agent publishing off, after which an agent-authored skill is created personal
Starter scaffolds for the "new skill" flow (AC #2, not-from-scratch)
Read one skill
Delete a skill — owner-only
Edit a skill — owner-only, even if it's shared
Import a SKILL.md: returns a KEPT/DROPPED report first; pass create:true to write the skill
Export a skill as portable instructions (Markdown / Claude Skill SKILL.md / ChatGPT)
Run a skill manually; returns its step log (no model invoked yet)
portal
List portal recipients for this workspace
Create a portal recipient — never creates a user, never touches billable seats
Revoke a recipient — every access path closes immediately, no cache/TTL
Issue a new token for a recipient, atomically invalidating the old one (#602)
Portal recipient activity — what a client saw and did, filterable by recipient/view (admin)
views
Create a saved view (config validated against live fields)
Create a view owned by me (private, never shared) over this database
Delete a view (409 on the last shared one)
Rename / reconfigure / reorder a view
Duplicate a view with its full config, placed next to the original
Set this view as the database's default (one default per database)
Publish a personal view to the shared database (one-way; see copy-to-personal)
Copy a shared view into my personal space (independent fork, no sync)
Deleted views on this database (editor+)
Restore a deleted view
Publish a read-only public link for this view, or update its allowlist (#264)
Revoke a view's public link — takes effect immediately (#264)
My personal filter override for this view (cleaned of dead field refs)
Set (or replace) my personal filter override for this view
Clear my personal filter override for this view
My pinned view tabs for this database, in my order (views since trashed or no longer visible to me are left out)
Set (or replace) my pinned view tabs for this database: shared views, or my own personal views, in the order given
Clear my pinned view tabs for this database
Mark this view as seen by me now; returns when I last had seen it before this call (null the first time)
Views navigable in a space, for the sidebar tree (#347)
Create a space-level view — dashboards only (#306)
My own personal views across the workspace, for the Personal sidebar section (#551)
One view by id, with or without a database (#306)
Delete a space-level view (#383)
Update a view by id — name / config / placement (#306)
Move a database-level dashboard into its space (#306)
export
Download the database (or a view) as CSV
Download the whole workspace as a .zip (schema, records, relations, attachments)
capabilities
What this server can currently do (#885). pdf_export.available = configured AND the renderer answered its health check within the last `checked_at` window — gate on that, not on `configured`.
credentials
A credential's scope and window — including after it was revoked or its owner erased (#882)
Everything one credential did (activity events), newest first (#882)
One past action and the credential that performed it (#882)
files
Upload an image for the editor (multipart "file"); returns { id, url }
Mint a signed, expiring download URL for a file (#201)
Revoke a file — kills its capability URL and any signed download URLs (#201)
Serve an uploaded editor image by id (capability URL, or access-checked under private-attachments mode)
Download a file via a signed, expiring URL (#201)
search
Search records by title + databases/spaces by name (grant-scoped)
My work: records assigned to me, created by me, assigned BY me, or waiting on me (approvals + unanswered mentions). Finished rows are dropped; every total is exact (MN-049, #36, #1250)
Records the caller touched most recently (from activity)
import
Import CSV: fields "file", "mapping" (JSON), "dry_run" ("true"/"false")
google-calendar
List writable calendars for a Calendar connection
List database-to-calendar sync bindings
Bind a database and date fields to a Google Calendar
Push all current dated records to Google Calendar now
Remove a calendar binding (existing Google events remain)
runs
Monthly automation-run usage vs the plan allowance, with a pace projection
Every automation run in the workspace, newest first — rule runs today (source syncs pending #239). status is ok (Succeeded), error (Failed), running (Running), skipped (Skipped), skipped_quota (Skipped (quota)) or awaiting_approval (Awaiting approval: at least one action is waiting for a person); awaiting_approval_count says how many
Run detail: trigger context, per-action attempts/artifacts, approval linkage
Run again: run this run's rule once more on the same trigger record, as a NEW run (the original is untouched), against the record as it is now
Re-run one failed action from this run with its original frozen inputs
agents
Agents database summary, or { exists: false } if not provisioned
Provision the Agentic OS space + Agents/Runs/Agent Triggers databases (idempotent)
Bind an agent to a state on a database; returns the binding record
Run an agent manually; returns the Run record
Delegate a record to an agent — it runs with the record as context and posts progress back as a comment
Approve a run waiting for approval: apply the staged action
Reject a run waiting for approval: apply nothing, cancel it
A parked run's staged action and step log, or null if it isn't waiting
Where this agent works, resolved NOW: its named databases plus every user database in its target spaces (a system database such as Members is covered only when named, never by its space; a database added to a target space later is included on the next call), narrowed to what its manager can open. A personal space is never included. `enforced` is true when the agent names a space or a database: its credential is then bound to exactly this list.
Everything that can start this agent, in `sources[]`: its agent triggers (kind agent_trigger: a record entering a state, or a relation field linking to it, each with on/off and whether a person must start it), every automation rule with a run_agent action for it (kind automation: rule name, its trigger - record created, field change, link or schedule - on/off and its database; a caller who may not read that database's automations gets only the label "A rule in <database>" with id, name, enabled and trigger null), every button field with a run_agent action for it (kind button: the button's label and its database), and the built-in ways that apply to every agent (kind built_in, one per reason: mention, manual, approval_decided, must_comment, retry, catch_up), which come last. Readable by the agent's manager and by admins; anyone else gets the same 404 as an unknown agent. A trigger, rule or button on a database the caller cannot open is counted in `withheld_count`, never named; a system database is named but never described; a deleted field, option or database comes back with a null name. A re-run of a rule's run_agent action is the rule firing again, not a separate source.
Field changes + activity events attributed to this agent, in a date range
Propose a plan from a plain-language goal; creates nothing
Build an approved plan through the ordinary CRUD services
tyron
The caller's own Tyron threads, most recent first (#359)
Start a thread, auto-named from its first message (#359)
One thread with its history (404 unless it is yours)
Delete a thread — does NOT undo what it did (#359)
Rename a thread
Send a message to Tyron and get what it did (#357)
Approve or decline Tyron's pending action (#358)
Build a workspace from one sentence (#363)
runners
Start "Add a Runner": a 6-character, single-use pairing code valid about 10 minutes. A new code burns your previous unused one. Not for guests.
Poll a pairing code you issued: waiting, connected (with the Runner and the tools it found), expired or cancelled
Cancel pairing: burns the code AND revokes the pending Runner it produced, at once
Your own Runners (never anyone else's, admins included): {data, total_count, connected_count, offline_count, at_limit_count, needs_attention}. Each row: status, connection, connected (active and heard from within 2 minutes), tools, chosen tool, versions, last_seen_at, offline_since and the agents on it. The counts are one aggregate over the same rows (ticket #1320): connected_count is "N Runners connected", needs_attention is true when one is offline or at its limit (the warning colour). A guest 403, a non-member 404.
Done: turn a pending Runner on and choose its tool. 409 pairing_expired if the pairing window has closed; 422 if the tool was not found on that computer
Remove a Runner: revokes its token (refused on its next call), unassigns its agents and returns its claimed wakes to the queue. Also how a pending Runner is taken away
Change a Runner you own: which detected tool your agents use (tool), the hours it may claim in (working_hours: days, start, end, IANA timezone; null = any hour) and "leave me X%" (reserve_percent 1-95; null = none). Any subset. The reserve is only kept for a tool that reports plan usage: reserve_measurable says whether.
Which Runner an agent runs on (the agent's owner, or an admin)
Send an agent to one of its owner's own active Runners, or pass runner_id null to unassign. 422 unless the agent's AI mode is "Your own AI" and the Runner is the owner's own and active
The records POST /agents/{agent}/catch-up would start on, by name (ticket #1224): {total, listed_total, not_listed, items:[{id, title, database_id, database_name}], limit, offset, truncated}. `total` is exactly the `catch_up` count in GET /agent-wakes/summary (a real SQL count seen as the agent's owner). Items are oldest first, the order one click wakes them in, paged with ?limit= (1-100, default 5) and ?offset=. Titles are read as YOU: a record you cannot open is not listed and is counted only in `not_listed` (never an id); `truncated` is true while more remain to page through. The agent's owner or an admin (a guest 403; anyone else, and an unknown agent, 404). An agent that cannot take wakes returns total 0.
Start the agent on the records already waiting in its trigger state(s) that no wake was ever made for (ticket #1152): one wake per record through the normal queue, at most 25 per click. Returns {queued, already_waiting, remaining, skipped}; remaining is how many more a further click will queue. The agent's owner or an admin, signed in (a token, a connected AI or the agent's own run credential gets 403; anyone else, and an unknown agent, 404). The count that decides whether to offer this is `catch_up` in GET /agent-wakes/summary.
An agent's monthly budget and what it has used this month (ticket #1138), for the agent's page. `limits` are the two number fields on the agent's record (monthly_token_budget, monthly_run_cap; null = no limit); `tokens` and `runs` each carry limit, used, percent (whole, rounded down), and a state (unlimited, ok, warning at 80%, paused at 100%, not_measured). `tokens.used` is null, never 0, when the finished runs' tool did not report usage; `tokens.measurement` (full, partial, not_reported, no_finished_runs) and `unmeasured_runs` say how much of the total is measured. `state` is the worst of the two; when paused, `paused_reason` names which and `resumes_at` is the UTC month reset (raising the budget resumes it sooner). The month is the UTC calendar month. To set or raise a budget, update those fields on the agent's record (a person; an agent cannot change its own). 404 unless you can read both the agent and the Runs database the numbers are counted from.
runner
Exchange a pairing code for a Runner token. The Runner is PENDING: it does nothing until the person presses Done in StoryOS, and is revoked if that does not happen inside the pairing window. The token is shown once.
Report liveness, machine name, tools and versions. Answers with the supported protocol range and the agents assigned to THIS Runner. A Runner below the minimum protocol gets 426 with the one command that updates it.
Long-poll for wakes for the agents assigned to this Runner. 200 with the claimed wakes (each with a 90-second lease and a nonce), or 204 when there is nothing. Atomic: a wake is handed to exactly one claim. 409 wake_already_claimed if wake_id names one that is taken.
Renew the lease on a wake this Runner holds (every 30 s). Also a liveness signal. 409 lease_lost if the lease lapsed, the run was cancelled or the wake was taken back: kill the session and discard its result.
Report the adapter result for a wake this Runner holds. Idempotent on (id, nonce): a retry after a dropped response gets the same answer. Writes the Run, ends the wake, and enqueues one fresh wake if a repeat arrived mid-run.
agent-wakes
The wake queue, newest first: which agent was woken about which record, why, and ONE derived run_state per row (needs_approval, running, done, failed, canceled, waiting_for_runner, runner_offline, waiting_for_limit, waiting_for_hours, waiting_for_reserve, waiting_for_budget (the agent used its monthly budget; `until` is the UTC month reset, `budget_metric` says tokens or runs), waiting_for_turn). Filter by ?agent= and ?record=. Wakes you cannot read are omitted AND not counted; `visibility` says so: 'full' = this is everything the queue holds, 'limited' = some wake (or the whole Agents database) is not yours to read, so an empty list does NOT mean nothing has woken the agent (ticket #1228; a yes/no, never a count).
Waiting counts: per Your-own-AI agent, its Runner, whether it can run, and how many wakes wait for it; plus the total and how many agents cannot run. Wakes you cannot read are not counted: top-level `visibility` and each agent's `waiting_visibility` are 'limited' when some wake was left out for you (then `waiting` is a floor, not a measurement, ticket #1228) and 'full' otherwise. Each agent that has a monthly budget also carries `budget` (the month so far, tokens and runs, against its limits; null when none is set or you cannot read the Runs it is counted from; see GET /agents/{agent}/budget). Each agent also carries catch_up: how many records are already in its trigger state(s) with no wake ever made (the agent's owner or an admin; null for anyone else), the number behind POST /agents/{agent}/catch-up.
templates
Available starter templates
Install a template (packs create a space; database templates take space_id and may be renamed)
Remove exactly the sample records templates created
packs
Export a workspace slice as a pack manifest; creates nothing
Install a pack manifest; idempotent
Preview what installing a manifest would do; creates nothing
List tracked pack installs in this workspace
Uninstall a tracked pack install
List this workspace's marketplace submissions
Submit a pack manifest to the marketplace for review
The built-in Business Pack gallery
One built-in pack, manifest included
Browse published Community Marketplace packs
One published pack — manifest, changelog, versions
record-templates
List a database's record templates (name, preset values, body)
Create a record template: name, preset values keyed by field api_name, and a Markdown body
One record template
Delete a record template. Records already made from it are untouched.
Edit a record template (a pack-installed one too: it is then kept on uninstall as changed)
Save an existing record as a template: its values and description (not its title, links or computed fields)
Create a record from a template: preset values and the body are filled in; `values` overrides a preset. Presets that no longer fit the schema are dropped and listed in `skipped`.
favorites
Current user's favorites in this workspace (resolved titles)
Star a record or database
Unstar
gdpr
Export everything held about this member (machine-readable JSON)
Erase this member FROM THIS WORKSPACE: remove their membership, access and per-person state here and the tokens minted for it. Their global identity and every other workspace are untouched (#1039); that is /me/gdpr/erase, self-service. Comments and history are kept.
Erase my own account everywhere (irreversible; body {"confirm": true}); session only
admin
Instance-wide counts: workspaces, users, records, plan mix, estimated MRR.
Every workspace on the instance: plan, seats, record count.
MN-194 — per-workspace cost and margin from real usage (hosted calls, storage, email; AI cost estimated pending MN-214r), plus blended margin per plan and the margin-floor flags.
#300/MN-216c — agent runs across every workspace: workspace, agent, status, run_class, trigger, started/finished. Read-only.
#300/MN-216c — kill switch: cancel a queued/running/waiting-approval run in any workspace. A status flip to Canceled only — no other side effects.
MN-220 — pack marketplace submissions awaiting (or having had) review
MN-220 — approve or reject a pending pack submission
#304 — set a workspace plan (comp/Enterprise grant); requires a reason; never touches live Stripe
#304 — set entitlement overrides (e.g. maxWorkspaces) for a workspace; requires a reason
#304 — clear a workspace's entitlement overrides; requires a reason
#304 — current plan + overrides + audit trail for a workspace
GitHub
Select theme
Dark
Light
Auto
Remove an agent write gate (a person who is an admin)
DELETE
/api/v1/workspaces/{ws}/agent-write-gates/{id}
Parameters
Section titled “Parameters”
Path Parameters
Section titled “Path Parameters”
id
required
string
Responses
Section titled “Responses”
200
Section titled “200”