Documentation

Framed Platform API

Complete reference for the Platform API, Phase 1. Version 2026-09-21.

Framed is a background workhorse: it runs a workspace's processes end to end (playbooks, connectors, a human approval only where the process asks for one). The Platform API is how a client of that workspace drives the work and reads it back without opening the Framed app: a partner's dashboard, an internal tool, a back office, a host assistant. They build their own UI; Framed stays the runtime and the source of truth for process and result.

Base URL: https://www.framed.dev/api/platform. Every route on this page hangs off it. Never the Supabase project URL, never the function name.


Contents

  1. Quick start
  2. Authentication and identity
  3. Concepts
  4. Conventions
  5. Reference: processes
  6. Reference: runs
  7. Reference: results
  8. Reference: approvals
  9. Reference: files
  10. Resource schemas
  11. Results in depth
  12. Human approvals in depth
  13. Polling
  14. Errors and reason codes
  15. The same nouns over MCP
  16. Security model
  17. Where it lives in the code
  18. Operations
  19. Client example
  20. On our roadmap
  21. Changelog

1. Quick start

Five calls. Everything else on this page is detail on these.

KEY="frk_live_…"          # Connections → Framed API keys (an account administrator)
WS="WORKSPACE_ID"         # from GET https://www.framed.dev/api/workspaces
API="https://www.framed.dev/api/platform"

# 1. What can this workspace run?
curl -H "X-Framed-Api-Key: $KEY" "$API/processes?workspace_id=$WS"

# 2. Start one. Answers 202 with the run (or with an approval, see below).
curl -X POST -H "X-Framed-Api-Key: $KEY" -H "Content-Type: application/json" \
  -d '{"input": {"region": "north"}, "reason": "Weekly check from the dashboard"}' \
  "$API/processes/PROCESS_ID/runs"

# 3. Poll the run until "settled": true. "blockers" says what it waits on.
curl -H "X-Framed-Api-Key: $KEY" "$API/runs/RUN_ID"

# 4. When a blocker is an approval, decide it.
curl -X POST -H "X-Framed-Api-Key: $KEY" -H "Content-Type: application/json" \
  -d '{"decision": "approve", "reason": "Both renewals are already in flight."}' \
  "$API/approvals/APPROVAL_ID/decision"

# 5. Read what the run produced.
curl -H "X-Framed-Api-Key: $KEY" "$API/runs/RUN_ID/results"

# 6. Or the last completed run's JSON, without starting Studio.
curl -H "X-Framed-Api-Key: $KEY" "$API/processes/PROCESS_ID/latest-record"

A working walkthrough of exactly this sequence, over a fixture workspace and without a key, is at /dev/platform-api-preview in the app. It runs the same handler the API runs.


2. Authentication and identity

The key

Send the key in one of two headers. Both are accepted on every route.

X-Framed-Api-Key: frk_live_…
Authorization: Bearer frk_live_…

An account issues its own keys in Framed under Connections → Framed API keys (account admins, /connections/api-keys). A key may be scoped to a chosen set of workspaces; otherwise it reaches every non-archived workspace on the account. Plaintext is shown once; only a SHA-256 hash is stored. The workspaces a key can reach are listed by GET https://www.framed.dev/api/workspaces (the Developer API, same key).

A Framed Connect OAuth access token works too, issued for the Platform API: a front-end (a client's own desk, say) runs the OAuth flow of https://www.framed.dev/.well-known/oauth-authorization-server with resource=https://www.framed.dev/api/platform (RFC 8707), a person consents and picks a workspace, and the token acts as that person. It works on /api/platform/*, GET /api/whoami (which workspaces it reaches) and GET /api/insights?workspace_id= (the list) and GET /api/insights/:id (one insight whole, read as that person, which takes it off their Catch up); every other /api route answers 403 platform_only. A token issued for https://www.framed.dev/mcp stays on /mcp and is refused here (401 invalid_token), and a platform token is refused at /mcp. A refused token's WWW-Authenticate points at /.well-known/oauth-protected-resource/api/platform. A third kind of credential is a registered client's signed assertion plus the delegation a person granted it (Client identity and delegation); no raw key is needed for that.

Who a call acts as

Every platform call runs as a person. Which person depends on the credential:

CredentialActs as
Connect OAuth tokenthe person who consented to the assistant
Framed API key (purpose: connect)the account admin who issued the key, for a start, a transition or a decision, only with the scope act_as_issuer (Key scopes); every other call reads and proposes under their reach
Registered client with a delegationthe person who granted it (Client identity and delegation)
Reseller key or reseller sessionnobody

That person's workspace reach and grants decide every read, and a start, a transition or a decision is recorded as theirs: created_by on the run, resolved_by on the approval, with the reason as the card's note and evidence.decided_via = { channel: 'platform_api', client }. This is what keeps a key from being more powerful than a colleague: a key issued by someone who can open two workspaces reaches those two, and no more.

A caller with nobody behind it can read, and it can queue a start that the process wants a person to approve first. Anything that would run or decide on its own answers 403 { reason: 'no_person' } with a sentence saying what to do instead.

Grants

The same per-person grant matrix the app enforces (Settings → Access) applies here. A refusal names the grant and where to change it, and when an administrator could give it the refusal is a request that stays open (step-up).

RouteGrant needed
list / get processes, runs, agent runs, results, approvalsread_memory (what the workspace knows)
a file result for a document (a run's, or an agent run's)read_studio as well; without it the file result is withheld and counted, the read still answers
start a run, transition a run, decide an approvalpropose_run (may set work in motion)

Rows in a space the person cannot open are never listed and answer 404 when addressed directly. A list says how many it left out (withheld). The same holds for a channel the person is not in (a worker, its runs and results), and for an agent run, whose reach is derived (see Agent runs).

Key scopes and act_as_issuer

A key carries scopes. They are a ceiling over the grants of the person the key reads as (the table above), never an addition: what a call may do is what that person may do, narrowed by the scopes. The scope names are the grant names of Grants: read_connectors, use_connectors, read_memory, propose_memory, propose_run, propose_mail, read_studio, write_studio (a scope that needs another brings it: propose_memory reads, use_connectors sees what is connected, write_studio reads). One thing lifts a key over its scopes: a grant an administrator approved for that key through step-up. The scopes are applied first and the approval added after them, so an approved key is not refused again. A delegation is never lifted this way: it is exactly what its person granted, a refusal for it is plain, and the person grants more through the device flow.

A new key is least privilege: read_connectors, read_memory, propose_memory, propose_run, propose_mail, read_studio. It reads, and it proposes what a person then decides. It does not start, steer or approve. Those three act as a person, and a key may do that only with the extra scope act_as_issuer, which is deprecated and no longer given to a key (see the end of this section):

RouteA key without act_as_issuer
POST /platform/processes/:id/runs, POST /platform/runs/:id/transitions, POST /platform/approvals/:id/decision, POST /platform/approvals/:id/follow-up403 { "code": "scope_required", "scope": "act_as_issuer" }
every read, and every proposal (POST /context, POST /platform/results/:id/actions, ...)works, under the scopes it has

Why. A raw key is a secret that both says who is calling and carries the right to act. A leaked key could start runs and approve as the admin who issued it. The new default removes that for every new key, and the proper way for a shell to act as a person is a delegation that person grants (below): the person is the actor, and their own grants are the limit.

Keys that existed. Every account key that existed before scopes keeps act_as_issuer (and every other scope), so nothing in use breaks, and is marked legacy_issuer. GET /whoami says so:

{ "ok": true, "scopes": ["read_memory", "propose_run", "act_as_issuer"],
  "legacy_issuer": true,
  "legacy_issuer_note": "This key can still act as the account admin who issued it. That is deprecated: …" }

act_as_issuer is deprecated. An admin narrows a key by changing its scopes (the mark goes when they do: they have looked at it), in the app under Connections › Framed API keys, Change on the key's row: it unticks what the key has, so it takes act_as_issuer away and never gives it. A key that asks to act without the scope will get a resumable step-up through an approval card once that ships; until then it is the plain 403 above.

Client identity and delegation

A registered client is an app or an agent of an account (a custom shell, a personal agent) that proves who it is with a key pair of its own, and acts for a person only with what that person granted. The two are separate on purpose:

  • Identity is a short-lived JWT the client signs. Framed holds the public key. There is no shared secret to leak.
  • Authority is a delegation: a grant a person makes directly to Framed (never to the client) through the OAuth device flow. It is scoped, it names the workspaces, it ends on its own, and the person or an admin can revoke it. A client with identity and no delegation may say who it is and nothing else.

The design is the open PACT protocol (Personal Agent Consent and Trust) on OAuth 2.0 (RFC 8628, RFC 7523, RFC 8414).

Registering. An admin of the account registers the client with their own signed-in session, never with a key: a name, and where its public keys are (jwks_uri, an https address Framed fetches, or the JWKS pasted in), and which scopes it may ask a person for. Framed assigns two values and shows them once to hand to the developer: the client_id (the iss of every assertion) and the audience (the aud). There is deliberately no API route for registering a client: a leaked key must not be able to mint a new identity.

The client assertion. Every request carries a JWT in Authorization: Bearer:

Rule
algES256 or RS256. Nothing else: not none, not HS256. The key's type must match
kidrequired; names a key in the client's JWKS. An unknown kid refetches the JWKS once (at most every 30 s), so a rotated key works
issthe registered client_id
suba stable, opaque id for the person or the session. No personal data: an address is refused
audthe audience Framed assigned to this client
iatnot more than 30 s in the future
expafter iat, at most 300 s after it, and not more than 30 s in the past

Framed fetches the JWKS through its address guard (https only, never an internal address), caches it for five minutes, and remembers a failure for a minute. An unreachable JWKS fails closed. Every refusal of an assertion is the same answer: 401, WWW-Authenticate: Bearer realm="Framed API", no body. It is decided before any account, workspace or grant is read, so it says nothing about what exists.

// Node: sign an assertion (ES256).
import { sign, randomUUID } from 'node:crypto'
const b64 = (o) => Buffer.from(JSON.stringify(o)).toString('base64url')
const now = Math.floor(Date.now() / 1000)
const head = b64({ alg: 'ES256', typ: 'JWT', kid: 'my-key-1' })
const body = b64({ iss: CLIENT_ID, sub: 'session-7f3a', aud: AUDIENCE, iat: now, exp: now + 120, jti: randomUUID() })
const sig = sign('sha256', Buffer.from(`${head}.${body}`), { key: PRIVATE_KEY, dsaEncoding: 'ieee-p1363' })
const assertion = `${head}.${body}.${sig.toString('base64url')}`

Asking a person. POST https://www.framed.dev/oauth/device_authorization, the assertion in Authorization: Bearer (or client_assertion and client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer in a form body), and the scopes it wants:

POST /oauth/device_authorization
Authorization: Bearer <assertion>
Content-Type: application/x-www-form-urlencoded

scope=read_memory propose_run
{
  "device_code": "fdc_…",
  "user_code": "BCDF-GHJK",
  "verification_uri": "https://www.framed.dev/connect/device",
  "verification_uri_complete": "https://www.framed.dev/connect/device?user_code=BCDF-GHJK",
  "expires_in": 900,
  "interval": 5,
  "scope": "read_memory propose_run"
}

Show the person verification_uri_complete (and the code). Do not proxy, frame or observe the sign-in: the person signs in to Framed themselves, on a page Framed serves with frame-ancestors 'none'. They see your client's name and each scope as a box to tick (a scope they may not give is shown and unavailable), choose the workspaces (default: every one they can open), and approve or decline. A scope the account has not allowed the client, or one that does not exist, is invalid_scope.

Polling. POST /oauth/token, with the assertion again:

grant_type=urn:ietf:params:oauth:grant-type:device_code&device_code=fdc_…
AnswerMeaning
400 authorization_pendingno answer yet; poll again after interval
400 slow_downyou polled too fast; the interval grew by 5 s
400 access_deniedthe person declined. The code is spent. This is a valid answer
400 expired_tokennobody answered within expires_in. Start again
400 invalid_grantnot this client's code, or already used (a second use withdraws what the first produced)
200the delegation
{
  "access_token": "<delegation token, a JWT Framed signed>",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "frdr_…",
  "scope": "read_memory",
  "grant_id": "5b2f…"
}

Read scope. It lists what the person approved, which may be fewer than you asked for. The token carries the same scope claim (iss, aud, sub = the opaque person id, client_id, scope, grant_id, iat, exp at most an hour after). The signing key is published at https://www.framed.dev/oauth/jwks.

Using it. Every request carries both, the assertion and the delegation:

Authorization: Bearer <client assertion>
X-Framed-Delegation: <delegation token>

Framed checks the assertion first, then the delegation: its signature, that it was made for this client's audience and client_id, that it has not expired, and that the grant row is alive (not revoked, not expired, the person still there). Then the call acts as that person, limited to the scopes: the same grant gate as every other call, so a token never exceeds the person's own rights, and the person's reach, channels and spaces still apply. A start or a decision is recorded as the person. A bad delegation answers 401 { "code": "delegation_invalid" | "delegation_expired" | "delegation_revoked" } with WWW-Authenticate: Bearer realm="Framed API", error="invalid_token".

Refreshing. POST /oauth/token with grant_type=refresh_token and the frdr_ token, until the grant ends (90 days after approval). The refresh token rotates on every use; presenting an old one again withdraws the grant. A refresh may ask for fewer scopes with scope=, never more. POST /oauth/revoke with the refresh token hands the delegation back.

Revoking. The person who granted it, and an admin of the account, can revoke a grant at any time; it takes effect on the client's next call, because every call reads the grant. An admin can disable a client, which refuses its assertions from the next call. The client cannot change a token.

A client with no delegation. An assertion alone is an identity. It may call GET /health and GET /whoami (which names the client and says delegation: "none"), and every other route answers 403 { "code": "delegation_required" }.

What whoami says for a delegation: scopes, client_id, grant_id and subject (the opaque id, never a name or an address). Receipts and the Log read the same fields.

Discovery. https://www.framed.dev/.well-known/oauth-authorization-server lists device_authorization_endpoint, jwks_uri, the device grant type and private_key_jwt with ES256 and RS256.

Personal data in answers

Answers are not minimized (since 14 Oct 2026): a key and a Connect token read names, addresses and numbers as the workspace holds them. Rows written before that date may still hold a pii:h: placeholder (pii:h: and 24 hex characters) where a value was hidden; posting one back is refused (hidden_value). A key's egress mark is still accepted and no longer changes anything.

Receipts: what a call that acted hands back

A call that acts answers with a signed receipt, next to the answer it always gave:

{ "ok": true, "status": "started", "run": { "...": "..." },
  "receipt": { "jws": "eyJhbGciOiJFUzI1NiIs…", "claims": { "v": 1, "...": "..." } } }

jws is a compact JWS signed ES256 by Framed. claims is the same payload, decoded, for reading. The receipt says what Framed did for this client, so the client can show it later and offline, to its own user or to an auditor, without Framed's word for it. It never holds the arguments (only their hash) and never names a person.

ClaimIs
v1
issthe host whose key set verifies it (https://www.framed.dev)
receipt_idrcp_…. The same id is on the call's audit row (v2_tool_calls for Connect, the Log entry for the API), so a receipt can be matched to the log
request_idreq_…, one per request
workspace_id, account_idwhere it happened, and whose account
clientwho called: key:<key prefix> for a key, oauth:<client id> for an assistant's connection (stable across the hourly token rotation)
grant_idthe delegation grant the call ran under, when there is one
subjectan opaque, stable id for the person behind the call (sub_…), the same inside one account and different in another. Never an email or a name. null when nobody is behind the call (a key with no person)
grants_usedthe grants that let it through (["propose_run"])
actions[]what it did: route_or_tool (the Connect tool, framed_run, or the route, POST /platform/processes/{process_id}/runs), args_hash, target (what the path named, process:<id>) and result_ref (what it made, run:<id>, approval:<id>, job:<id>)
idempotency_keythe Idempotency-Key of the call, when it had one
tswhen, ISO 8601 UTC

args_hash is sha256: and the hex SHA-256 of the canonical JSON of the arguments the call carried (the query overlaid by the JSON body, as the API reads them): keys sorted at every depth, no whitespace, numbers and strings as JSON writes them. {"a":1,"b":2} and {"b":2,"a":1} are one hash. The Idempotency-Key is not part of the arguments. A client that kept what it sent can prove what the receipt is about; Framed keeps no arguments beside it.

Which calls act. Starting, steering or deciding (POST /platform/processes/:id/runs, /runs/:id/transitions, /approvals/:id/decision), proposing (/results/:id/actions, /run, /mail/draft, /artifacts, /playbooks, a custom tool that queued a card), writing (/context, /knowledge, /about-me, a topic or a channel member), creating (POST /workspaces, /jobs, /studio, /chats) and POST /tools/define. Reads, refusals and calls that failed carry no receipt. Over Connect the same receipt is in structuredContent.receipt and in the result's _meta["framed.dev/receipt"].

Verify it. The public keys are a JWKS at https://www.framed.dev/.well-known/framed-jwks.json (also at /api/platform/.well-known/framed-jwks.json): public, no key needed, cacheable for five minutes. Read the kid from the JWS header, take that key, check the ES256 signature, then check claims.args_hash against the hash of what you sent. Only ES256 is accepted. With the script in this repository, offline once the key set is on disk:

node scripts/verify-receipt.mjs @answer.json \
  --jwks https://www.framed.dev/.well-known/framed-jwks.json --args sent.json
# genuine: signed by key "2026-10"

Rotation. Two keys can be published at once. A receipt names its key, so one signed before a rotation still verifies for as long as that key is in the set; the set is the only list of keys that count. Keep the key set you verified against next to the receipt if you need it for longer.

No key, no receipt, no failure. When Framed's signing key is not configured, an acting call still works and answers "receipt": null, and Framed raises an operations alert. Treat null as "this call was not receipted", never as "it did not happen". GET /whoami lists receipts under capabilities only while a key is configured, and then also says where the key set is: "receipts": { "jwks_uri": "https://www.framed.dev/.well-known/framed-jwks.json", "alg": "ES256" }.

A retry with the same Idempotency-Key replays the original answer and the original receipt: it is the proof of the one action, not of the retry.

A missing grant asks, it does not stop (step-up)

A call used to be refused with a 403 and one sentence when the person behind it lacked a grant. When the missing grant is one an account administrator or the workspace's owner could give, the answer is now a request that stays open:

HTTP 403
{ "ok": false, "status": "auth_required", "code": "grant_required",
  "error": "Claude may not start or schedule work in Acme yet. A workspace administrator has been asked (…). Once they approve, send the same request again.",
  "missing_grants": ["propose_run"],
  "grant_request": { "id": "…", "approval_url": "https://www.framed.dev/account/access?request=…",
                     "expires_at": "…", "status_url": "https://www.framed.dev/api/platform/grant-requests/…" },
  "retry": { "same_request": true },
  "reason": "access_policy", "grant": "propose_run" }

Show the person approval_url; nothing else is needed from them. An approval card of the kind grant_request waits for the administrator, worded for them ("Claude asks to start or schedule work in Acme"), with Approve and Decline and nothing after the click. Approve adds exactly those grants to this client, in this workspace, for 90 days; Decline is as valid an answer. Then send the same request again, with the same Idempotency-Key: it goes through. The refused call did nothing, so a retry cannot double it.

Step
One open requestper client, grant set and workspace. Asking again while one waits answers with the same grant_request.id and makes no second card
GET /platform/grant-requests/:idpending, approved, declined or expired, with retry. An approved request carries the receipt of the decision. A client reads only its own requests; any other id is 404 no_such_grant_request
A declinethe call answers 403 access_denied (status: denied, retry.same_request: false). Asking again for the same thing waits a day (grant_request.ask_again_after); do not do it another way
Timea request waits 72 hours for an answer, then reads expired and its card is closed; sending the call again asks again
Who answersan account administrator or the workspace's owner, in Framed. Anyone else's click is put back. Never through the API: POST /platform/approvals/:id/decision on such a card is 409 not_a_decision, whoever the key belongs to
Who it is fora key is api_key:<key id>; an assistant's connection is its OAuth client and the person who connected it. An approval for one never applies to another, to another workspace, or to another person

What is never stepped up stays a plain refusal that says why in code: another account's workspace or one the person may not reach (workspace_out_of_reach), a route the key class does not carry (not_on_this_connection), nobody behind the key (no_person), a space or a channel the person cannot open (404). Those are reach and product rules, not grants. A grant that cannot become a request (nobody to attach it to) is grant_missing.

Over Connect the tool's error carries the same fields (code, status, missing_grants, grant_request, retry) and its text names the link, so a host can show it and call the tool again once the person has answered. A result that the caller may not read yet can say status: "auth_required" too (see docs/package-contract.md).


3. Concepts

Four nouns. They are the same four Framed Connect (MCP) speaks, with the same ids, so a client that uses both sees one workspace.

NounWhat it isFramed row
processA written-down method the workspace runs: its steps, its owner, its cadence. A process type.v2_processes
runOne execution of a process: status, the stage it is on, what blocks it, what it left behind. The thing a client starts, follows and steers.v2_stepwise_runs
resultOne thing a run produced. Either a structured record or list as JSON, or a file reference into Framed's own store.v2_artifacts, v2_insights, v2_approvals, or the run's own step state
approvalA human-approval step: a card waiting on a person. Decidable here.v2_approvals

An agent's run is a fifth thing a client can read, kept apart from the four so that run means one thing: agent run, GET /platform/agent-runs, read only, with what it kept as results in the same envelope (Agent runs).

The lifecycle

POST /processes/:id/runs
        │
        ├── process starts immediately ──► run: queued ──► running ──┬──► done
        │                                                             │
        │                                        awaiting_input ◄─────┤
        │                                        (approval | question)│
        │                                              │              ├──► error
        │                              decide approval / continue ────┘
        │                              decline with no declined path ───► done (outcome: declined)
        │                              cancel ──────────────────────────► canceled
        │
        └── process asks a person first ──► approval: open
                                                │
                                          approve ──► the run above (run_id on the card)
                                          reject  ──► nothing runs, a rule is written

Run statuses

Framed's own words, unchanged, so MCP and HTTP read the same thing.

statusMeaningsettled
queuedCreated, not yet picked up by the clockno
runningA step is executingno
awaiting_inputParked: a human approval or a question. blockers says whichno
doneEvery step finished, or was skipped by a path. A run that ended at a declined approval with no step waiting on the decline is done with outcome: "declined"yes
errorA step failed and the run stopped. blockers carries the messageyes
canceledCancelled by a person or a clientyes

Step statuses

pending, running, done, flagged (an acceptance check raised problems; the run may be parked on it), failed. A step a path or a declined approval left out is done with skipped: true: it did nothing (12 Oct 2026).

One workspace per order (partner API)

A reseller or account key can call create_workspace with "ephemeral": true to get a one-off workspace for a single order. The owner is the reseller, for a reseller key, or the account, for an account key.

A one-off workspace made with a reseller key does not count toward the account's workspace limit, so it adds no extra-seat cost; its AI use is still metered per run. A one-off workspace made with an account key counts like any other workspace. Creating any workspace still goes through the normal limit check, so an account whose counted workspaces are at the limit, or whose subscription is not active, gets 403 with code: "limit_reached".

Workspaces made for different orders are separate workspaces: a key pinned to one order's workspace cannot read another's, and RLS keeps the people of one order out of another. Without the flag, nothing changes. This adds no new status values.

Seeding a one-off workspace (partner API)

A one-off workspace used to be born empty, and POST /context could not fill it: that route queues an approval, and nobody is there to decide it. create_workspace therefore takes an optional seed, written at creation with no approval step, because the key's owner already agreed to what the key sends.

POST /workspaces
{ "name": "Northwind", "ephemeral": true,
  "seed": {
    "facts": [
      "Northwind sells outdoor gear to shops in Utrecht.",
      { "fact": "Orders ship on Tuesdays and Fridays.", "kind": "process_rule" }
    ],
    "voice": "Plain and warm. Short sentences. No jargon."
  } }

201
{ "ok": true, "workspace": { "id": "WORKSPACE_ID", "…": "…" },
  "seed": { "facts": { "written": 2, "skipped": 0 }, "voice": "set", "provenance": "seeded_by_key" } }
  • Who and when. A reseller key, and only with "ephemeral": true. Any other key answers 403, code: "seed_not_allowed"; a workspace people use answers 400, code: "seed_needs_ephemeral" and takes facts through /context, for a person to approve. A seed only exists on create: it never changes a workspace that is already there.
  • seed.facts: up to 25, each a sentence or { "fact", "kind" } (kind is durable_fact, preference, episode or process_rule). They go through the same gate as every other fact: too short, longer than 500 characters, worded as an instruction, already in the seed, or disagreeing with another fact of the seed are skipped, and the answer says which (seed.facts.skipped_items: index and reason, never the text). A full workspace memory (5,000 characters of always-on facts) ends the seed with that reason for the rest. Written facts are active, carry the provenance seeded_by_key (what Knowledge history shows as written through the API, by the key's name) and are not stamped verified: they are the key owner's word, and the freshness check asks for them again at their review date. A credential is never stored: a fact that is only a key is skipped (a skipped_items reason that says so), and a key inside a sentence is replaced by [redacted: <what>] before the fact is written (seed.facts.redacted counts the written facts that had one taken out).
  • seed.voice: up to 8,000 characters of text, set as the workspace's styleguide (tone, voice, lexicon) in the same write that creates the workspace. A key inside it is replaced the same way (seed.voice_redacted lists what was taken out); a voice that is only a key refuses the seed with 400, code: "invalid_seed".
  • Anything else in seed (a typo such as fact, or a field that does not exist) is refused with 400, code: "invalid_seed" and the field's name. Nothing is created when the seed is refused.
  • A seeded create appears on the new workspace's Log, with counts and no text.

Forgetting a workspace (partner API)

A reseller key can call DELETE /workspaces/:id (or POST /workspaces/:id/delete) on a one-off workspace it owns. Anything else answers 404. It wipes the workspace's content (chats, memory, documents, embeddings, mail, files) and the workspace itself; the cost rows stay, without content, for billing. A job still running there is stopped (its run is canceled). Deleting does not reset the key's limits (see Rate). A repeated call answers 200 again.

create_workspace accepts forget_after_hours (1 to 8760, needs "ephemeral": true): the workspace is forgotten that many hours after its last job finished (no job queued, waiting for an approval, or running; a job that starts in the meantime postpones it). It cannot be undone.

POST /workspaces
{ "name": "Northwind", "ephemeral": true, "forget_after_hours": 48 }

DELETE /workspaces/WORKSPACE_ID
{ "ok": true, "workspace": { "id": "WORKSPACE_ID", "status": "forgotten", "usage_rows_kept": 12, "files_pending": false } }

A workspace with legacy knowledge audit entries answers 409 with code: "blocked"; Framed support can remove it. files_pending: true means some files were not removed yet; the scheduled sweep finishes them.


4. Conventions

Envelope. Every success is { "ok": true, "api_version": "2026-09-21", … }. Every refusal is { "ok": false, "error": "<one sentence>", "code": "<code>", … }, and carries a reason as well on the routes that have one. The sentence is written for a person; the code is what a program switches on (see Errors and reason codes).

Methods. GET reads, POST acts. There is no PATCH or DELETE; a run is steered through its transitions, an approval through its decision.

Parameters. Query string for GET, JSON body for POST. A POST may also carry query parameters; the body wins where both name the same key. workspace_id is required on every list; a single resource is addressed by id and answers 404 when the person cannot reach its workspace or space.

Limits. Lists default to 25 items and cap at 100 (limit). A start's input is at most 8 000 characters serialised; a reason at most 500. Text payloads are clipped at 60 000 characters; a list payload at 500 rows (truncated_to says so).

Timestamps. ISO 8601, UTC. updated_after filters take the same.

Links. Every resource carries links with absolute URLs. Follow them rather than building paths.

Ids. Opaque strings. A result id is <run id>.<slot>.<ref> and is stable across reads (see Results in depth).

Language. This surface says human approval, approval step, waiting for approval. Framed's own screen for these is called To review.

Rate and size. Request bodies over 1 MB answer 413 at the edge. The limits a reseller key carries, and the headers that report them, are under Operations.

Versioning

One policy, three stamps. A version is a date, the day its shape was fixed.

StampWhere it showsWhat it covers
Platform API 2026-09-21api_version on every Platform API success, info.version of the OpenAPI file, PLATFORM_API_VERSION in _shared/platform-api.tsthe routes under /platform
Developer API 2026-08-21api_version on /health, /whoami and every job webhook, PARTNER_API_VERSION in _shared/partner-api.tsthe routes outside /platform (/jobs, /workspaces, /context, and the rest)
Tools 2026-10-12the version line and the changelog of TOOLS.md (/docs/tools)the framed-tool.json file and POST /tools/define

The three move on their own. One moving says nothing about the others.

  • Additive changes stay inside a version. A new route, a new optional parameter, a new field in a response, a new value in a list this page calls open (code, reason, job kind), a new webhook event. A client ignores the fields and values it does not know. The lists this page calls closed (run statuses, approval decisions) change only with a version.
  • A changed meaning is a new version. Removing or renaming a field, changing what a field means or its type, changing a status code, a code or a reason a client may switch on, tightening a limit, or making an optional parameter required.
  • The old version is served for at least 90 days after the new one is announced in the changelog. There is no version header yet: the day a changed meaning ships, its changelog entry says how to keep the old behaviour for the period.
  • Every change is a changelog line, unreleased until it ships: section 21 for the first two stamps, TOOLS.md for the third. A stamp moves only for a changed meaning. Until now it also moved for additive releases (2026-09-21 added latest-record); from here an additive change is listed under the stamp it ships in.

Capabilities and the conformance suite

GET /whoami carries capabilities, a list of names for what this server can do: packages (typed results, decisions with answers, message drafts), files (signed links that expire), and where a server has them receipts, step_up and delegation. A client ignores names it does not know. The conformance suite (v2/conformance, described in v2/docs/conformance.md) reads the list and runs the profile of each name the server has; a profile the server does not advertise is skipped, with the reason printed. A server that sends no list runs core, packages and files and skips the rest.


5. Reference: processes

GET /platform/processes

The processes a workspace can run, most recently updated first, each with its latest run.

Query
workspace_idrequired
queryoptionalpart of a process name
updated_afteroptionalISO timestamp, on the process row's own updated_at (run activity is read from runs). Turns the list into a feed: see Polling
limitoptional1–100, default 25
{
  "ok": true,
  "api_version": "2026-09-21",
  "workspace_id": "ws-nordhaven",
  "processes": [
    {
      "id": "proc-permit-check",
      "workspace_id": "ws-nordhaven",
      "slug": "permit-check",
      "name": "Permit expiry check",
      "goal": "Catch grid permits that expire within 30 days before the planner does.",
      "owner": "Ines Vermeer",
      "cadence": "weekly",
      "status": "verified",
      "runnable": true,
      "starts": "immediately",
      "playbook": null,
      "steps": 3,
      "schema_refs": ["nordhaven:permit_rows/2"],
      "latest_run": null,
      "latest_record": null,
      "links": {
        "self": "https://www.framed.dev/api/platform/processes/proc-permit-check",
        "runs": "https://www.framed.dev/api/platform/processes/proc-permit-check/runs",
        "latest_record": "https://www.framed.dev/api/platform/processes/proc-permit-check/latest-record"
      },
      "updated_at": "2026-09-16T09:00:00.000Z"
    }
  ],
  "withheld": 1
}

withheld counts processes in spaces this person cannot open. Errors: 400 invalid_input (no workspace_id), 401, 403 workspace_out_of_reach | access_policy.

GET /platform/processes/:id

One process, with its latest run.

{ "ok": true, "api_version": "2026-09-21", "process": { "…": "as above" } }

Errors: 404 no_such_process (also for a process in a locked space), 403.

GET /platform/processes/:id/latest-record

The typed JSON the last completed run left behind, so a host can write the document without starting Studio. v0 wraps the run's own step extracts (source: "run_extract"). A dedicated v2_process_records row is the follow-up.

404 when the process has never completed a run, or none fall in the period.

Query
period_startoptionalYYYY-MM-DD or ISO; inclusive
period_endoptionalYYYY-MM-DD (that day included) or ISO; exclusive once expanded
{
  "ok": true,
  "api_version": "2026-09-21",
  "record": {
    "id": "run-1",
    "project_id": "ws-nordhaven",
    "process_id": "proc-permit-check",
    "run_id": "run-1",
    "schema_ref": "nordhaven:permit_rows/2",
    "schema_version": 2,
    "produced_at": "2026-09-16T09:00:00.000Z",
    "period": null,
    "payload": {
      "items": [
        { "permit": "NH-2211", "site": "Substation West", "expires": "2026-10-02" }
      ],
      "summary": "14 permits read; 2 expire within 30 days."
    },
    "source_refs": ["document:doc-1"],
    "open_fields": [],
    "materialize": { "studio_artifact_id": "doc-1", "status": "draft" },
    "source": "run_extract"
  },
  "links": {
    "self": "https://www.framed.dev/api/platform/processes/proc-permit-check/latest-record",
    "process": "https://www.framed.dev/api/platform/processes/proc-permit-check",
    "run": "https://www.framed.dev/api/platform/runs/run-1",
    "results": "https://www.framed.dev/api/platform/runs/run-1/results"
  }
}

Errors: 400 invalid_input (malformed period), 404 no_such_process | no_such_record, 403.

POST /platform/processes/:id/runs

Start a run. This is the workspace's own Start button: the call goes through v2-process-run with every gate that button runs (the plan gate, the campaign measure gate, the one-run-at-a-time guard, the first-run verification policy).

Body
inputoptional objectthe structured fields: free JSON for the run, ≤ 8 000 characters serialised. Kept on the run verbatim, returned as run.input, readable by a walkthrough step that fills from: 'input'. Never handed to a model as an instruction.
filesoptional list, ≤ 10files by reference: ["document:<id>", { "ref": "upload:<id>", "name": "…" }]. document:<id> is a Studio document, upload:<id> an uploaded file; the file_ref.id of a result is one. Returned as run.input_files
from_resultoptional stringa link back to an earlier result of this workspace, by its id (<run id>.<slot>.<ref>). Returned as run.input_from
reasonoptional string ≤ 500why this client started it. Shown on the approval card when one is queued.
Idempotency-Key (header) or idempotency_key (body)optional, ≤ 255 charactersmakes a retry safe: the same key, process and body within 24 hours gives back the original answer instead of a second run or a second approval card. See Idempotency-Key.

The three typed parts are the JSON Schema framed:run_input (/framed-package-1.json), checked before anything starts: a request whose input does not fit is a 400, never a run started without it. Then each reference is looked up as the person the call acts as. A file needs the Studio read grant (the one a document result needs), must be in this workspace and in a space the person can open, and a result is read through GET /platform/results/:id, so a link back reaches exactly what that route lets this person read. A run does not read the results of another workspace.

POST /platform/processes/proc-permit-check/runs
{
  "input": { "region": "north", "quarter": "Q4" },
  "files": ["document:d-contract", { "ref": "upload:u-register", "name": "Register, 6 Oct" }],
  "from_result": "run-001.document.doc-004",
  "reason": "Quarterly check"
}

The run keeps the references and says what they point at; they are not read into a prompt:

"input": { "region": "north", "quarter": "Q4" },
"input_files": [
  { "ref": "document:d-contract", "kind": "document", "name": "Supplier contract", "media_type": "text/markdown", "size_bytes": null },
  { "ref": "upload:u-register", "kind": "upload", "name": "Register, 6 Oct", "media_type": "text/csv", "size_bytes": 48213 }
],
"input_from": { "result_id": "run-001.document.doc-004", "run_id": "run-001", "schema_ref": "framed:document/memo", "title": "Permit status, week 38", "status": "final" }

input_files is [] and input_from null for a run that was handed none. A process that asks a person first carries the references on its card, and the run the approval starts has them.

What happens depends on the process's own setting under Who starts it (starts on the resource):

starts: "immediately": the run exists and is going.

{
  "ok": true,
  "api_version": "2026-09-21",
  "status": "started",
  "run": { "id": "run-001", "status": "queued", "settled": false, "…": "…" },
  "note": "The run is going in the background. Poll its link until `settled` is true; a step that needs a person shows up under blockers and as an approval."
}

starts: "after_approval": one approval card is queued, nothing runs.

{
  "ok": true,
  "api_version": "2026-09-21",
  "status": "waiting_for_approval",
  "approval": { "id": "apr-005", "kind": "connect_run", "status": "open", "run_id": null, "…": "…" },
  "job_id": "job-006",
  "process": { "…": "…" },
  "note": "Nothing is running yet. This process asks a person before it starts. Poll the approval; once it is approved, its run_id points at the run."
}

Poll the approval (or decide it here). Once approved, approval.run_id names the run. job_id is the same pollable job the Developer API's GET /jobs/:id reads.

That job carries cost: { "eur": 0.2517, "calls": 3 } or null: the metered usage of the run behind the job so far, in EUR at the standard credit rate (never the raw provider cost). calls counts the metered model and tool uses. It grows while the run goes and is null while the job has no run yet. A job points at a run when its result carries a run_id: agent-run jobs, one-off plan jobs (plan_run), and a connect_run job like this one once its approval is approved and the process has started (the approval's run_id). A job still waiting for approval, a connect_run that started an agent instead of a process, and other jobs answer cost: null. For a custom agent job, cost is what the wallet is debited: its model calls and its paid searches, both at the standard credit rate. Work a run hands to a separate service is not counted yet either.

Both answer 202. Errors:

Every refusal carries code (and the same word in reason); a bad input also carries issues, a list of { path, code, message } naming each fault (input with type or input_too_large; files[1].ref with pattern; files with max_items; files[1].ref with duplicate_file; from_result with invalid_result_id).

StatuscodeWhen
400invalid_inputthe input does not fit: input is not an object or is too large, files is not a list of references (more than ten, a web address, a reference twice), from_result is not a result id. issues says which
403no_personthe key has nobody behind it and the process starts immediately
403access_policythe person lacks propose_run here, or read_studio for a file (grant says which)
403refusedv2-process-run checked the person's reach and grant again and said no; error carries its sentence
404no_such_process
404no_such_filea file reference that is not there for this person: missing, another workspace's, or in a space they cannot open. The same sentence for all three (ref says which)
404no_such_resultthe result is not there, or not this person's to read
409result_in_other_workspacea link back to a result of another workspace
409not_runnablethe process has no plan Framed can run yet
409already_runninga run of this process is still going; run_id and run say which
502start_failedthe process asks a person first and the approval card could not be queued
502failedv2-process-run could not start it, or the run could not be read back; error carries its sentence

With an Idempotency-Key the answers of the Idempotency-Key section are added, and they carry code, not reason: 400 idempotency_key_invalid, 409 idempotency_key_in_progress (with Retry-After: 2), 422 idempotency_key_reused, 503 idempotency_unavailable. A start that is refused or fails gives its key back, so the same key can try again.

Steps inside the run that change something outside Framed still stop for a person, exactly as when the run is started from the screen.


6. Reference: runs

GET /platform/runs

Runs in a workspace, most recently updated first. Process runs only; an agent's runs are read at /platform/agent-runs.

Query
workspace_idrequired
process_idoptionalonly this process's runs
statusoptionalcomma-separated run statuses, e.g. running,awaiting_input
updated_afteroptionalISO timestamp. Turns the list into a feed: see Polling
limitoptional1–100, default 25
{
  "ok": true,
  "api_version": "2026-09-21",
  "workspace_id": "ws-nordhaven",
  "runs": [ { "…": "run" } ],
  "filter": { "process_id": null, "status": ["done"], "updated_after": null, "limit": 25 }
}

filter echoes what was applied, so a client can see what a default or a cap did to its request.

GET /platform/runs/:id

One run. This is the resource to poll.

{
  "ok": true,
  "api_version": "2026-09-21",
  "run": {
    "id": "run-001",
    "workspace_id": "ws-nordhaven",
    "process_id": "proc-permit-check",
    "process": { "id": "proc-permit-check", "name": "Permit expiry check" },
    "playbook": null,
    "title": "Permit expiry check",
    "status": "awaiting_input",
    "settled": false,
    "stage": { "index": 1, "count": 3, "key": "sign_off", "title": "A person checks the exceptions", "status": "running" },
    "steps": [
      { "key": "read_register", "title": "Read the permit register", "status": "done" },
      { "key": "sign_off", "title": "A person checks the exceptions", "status": "running" },
      { "key": "memo", "title": "Write the permit memo", "status": "pending" }
    ],
    "blockers": [
      { "kind": "approval", "approval_id": "apr-002", "title": "A person checks the exceptions" }
    ],
    "allowed_transitions": ["cancel"],
    "input": { "region": "north" },
    "links": {
      "self": "https://www.framed.dev/api/platform/runs/run-001",
      "results": "https://www.framed.dev/api/platform/runs/run-001/results",
      "approvals": "https://www.framed.dev/api/platform/approvals?run_id=run-001",
      "transitions": "https://www.framed.dev/api/platform/runs/run-001/transitions",
      "process": "https://www.framed.dev/api/platform/processes/proc-permit-check"
    },
    "created_by": "user-ines",
    "created_at": "2026-09-16T09:00:00.000Z",
    "updated_at": "2026-09-16T09:00:00.000Z",
    "completed_at": null
  }
}

Errors: 404 no_such_run, 403.

POST /platform/runs/:id/transitions

Steer a run. Only the transitions its state allows; there are no free-form stage writes.

Body
transitionrequiredcontinue or cancel
reasonoptional ≤ 500
Run isTakes
queued, runningcancel
awaiting_input on a question (a flagged step)continue, cancel
awaiting_input on a human approvalcancel only. continue is refused: the approval is decided, or the run is cancelled. A bare continue is not an approval.
done, error, cancelednothing

continue accepts the flagged step and re-queues the run. cancel ends it and dismisses any approval card it was parked on.

Success answers the run after the transition:

{ "ok": true, "api_version": "2026-09-21", "transition": "cancel", "run": { "status": "canceled", "…": "…" } }

Refusals carry allowed_transitions, and for a run parked on an approval, the approval to decide:

{
  "ok": false,
  "error": "This run is waiting for a human approval. Decide that approval; a bare continue is not an approval.",
  "reason": "transition_not_allowed",
  "status": "awaiting_input",
  "allowed_transitions": ["cancel"],
  "approval_id": "apr-002",
  "approval": "https://www.framed.dev/api/platform/approvals/apr-002"
}
StatusreasonWhen
400unknown_transitionnot continue or cancel
403no_person, access_policy
404no_such_run
409transition_not_allowedthe state does not take it now
409transition_failedv2-process-run refused; error says why

Agent runs

Read only. An agent's run is a different record from a process's run, so it has its own resource name, agent-runs, and runs keeps its one meaning. There is no start, steer or decide here: starting an agent job is the Developer API's POST /jobs (start_job), and a decision is still an approval.

A workspace's agents (research, leads and signal watchers, desk agents, custom agents, catalog agents) leave a run in one of two places. Both are read, and source says which:

sourceWhose runStored inWhat it carries
customa custom agent, on its own schedule or run nowv2_agent_runsa trace of steps, the finding or document it kept, the version of the agent it ran
scheduleda catalog or desk agent the scheduler fires through v2-agent-runv2_agent_dispatcheswhen it fired and ended, how it ended, what it read and kept. No steps

Not on the list: a helper run a custom agent spawned for itself (it belongs to its parent's run), a firing the scheduler skipped, the scheduler's own housekeeping, and a playbook's cadence marker. Monitor deliveries are not agent runs.

GET /platform/agent-runs lists a workspace's agent runs, newest first by when they started.

Query
workspace_idrequired
agentoptionalone agent, by its slug
statusoptionalcomma-separated run statuses, e.g. running,awaiting_input
limitoptional1–100, default 25
{
  "ok": true,
  "api_version": "2026-09-21",
  "workspace_id": "ws-nordhaven",
  "agent_runs": [ { "…": "agent run" } ],
  "filter": { "agent": null, "status": [], "limit": 25 },
  "withheld": 1
}

withheld counts the runs this person may not open (see below), when there are any. There is no updated_after: a run has no updated_at of its own, and a client watching a workspace lists with a status and a small limit.

GET /platform/agent-runs/:id is one run and what it kept, as results in the same envelope a process run's results use (section 11):

{
  "ok": true,
  "api_version": "2026-09-21",
  "agent_run": {
    "id": "agr-outage-watch",
    "workspace_id": "ws-nordhaven",
    "source": "custom",
    "agent": { "slug": "outage-watch", "name": "Outage watch", "kind": "custom" },
    "title": "Outage watch",
    "status": "done",
    "settled": true,
    "steps": [
      { "key": "pull", "title": "Read the outage feed", "status": "done", "target": "Outage feed" },
      { "key": "synthesize", "title": "Synthesize across sources", "status": "done" },
      { "key": "persist", "title": "Write insight", "status": "done" }
    ],
    "blockers": [],
    "agent_version": 3,
    "produced": ["insight:ins-outage", "document:doc-outage"],
    "links": { "self": "https://www.framed.dev/api/platform/agent-runs/agr-outage-watch" },
    "created_at": "2026-09-16T08:00:00.000Z",
    "updated_at": "2026-09-16T08:05:00.000Z",
    "completed_at": "2026-09-16T08:05:00.000Z"
  },
  "results": [
    {
      "id": "agr-outage-watch.document.doc-outage",
      "kind": "file",
      "schema_ref": "framed:document/memo",
      "schema_version": "1",
      "title": "Outage calendar, week 38",
      "file_ref": { "id": "document:doc-outage", "kind": "document", "name": "outage-calendar-week-38.md", "media_type": "text/markdown", "url": "https://www.framed.dev/api/platform/files/document/doc-outage?token=…", "url_expires_at": "2026-09-16T09:15:00.000Z" },
      "produced_at": "2026-09-16T08:05:00.000Z",
      "…": "…"
    },
    {
      "id": "agr-outage-watch.insight.ins-outage",
      "kind": "record",
      "schema_ref": "framed:insight/briefing",
      "schema_version": "1",
      "title": "Outage feed: two planned works this week",
      "payload": { "title": "…", "type": "briefing", "snippet": "…", "content_md": "…" },
      "produced_at": "2026-09-16T07:05:00.000Z",
      "…": "…"
    }
  ],
  "file_url_ttl_seconds": 900
}

The agent run resource is described under Resource schemas. Its status is one of Framed's run statuses, so the switch a client wrote for runs reads agent runs too:

StoredstatusWhy
custom queued, runningqueued, running
custom awaiting_approvalawaiting_inputthe agent's draft waits on its reviewer; blockers says so. The reviewer decides in Framed, not through this API
scheduled queued, runningrunninga firing is written queued when the scheduler starts it and is only updated when it ends
done, errordone, errorerror carries the message in blockers

An agent run is never canceled, and ?status=canceled matches nothing.

Results. A result of an agent run is the same envelope as a process run's (kind, schema_ref, schema_version, title, payload or file_ref, produced_at, links), built by the same code, so a client that reads one reads the other. Three things differ, because there is no process and no step: run_id is the agent run's id, process_id and step are null, and both links point at the agent run. A result of an agent run is read here; it is not served at /platform/results/:id, which answers 404 for it. Files and lists come first, then the finding, as everywhere.

Who may open one. The same grant as a run read (read_memory), and a file result needs read_studio as well (withheld and counted without it). An agent run names no worker, desk or channel itself, so its reach is the one Catch up files a finding by: the worker bound to the agent, the desk of the finding or document it kept, then the agent's own channel. A run outside the person's desks or channels is left out of a list and counted in withheld, and answers 404 no_such_agent_run when addressed, never "not allowed". A run in reach whose document sits on a desk the person cannot open is shown without that document, and withheld counts it. A workspace with no channel rules narrows nothing.

Over MCP. framed_list of:"runs" and framed_fetch run:<id> show both kinds beside a process's runs, with the same rule (_shared/agent-run-reach.ts is the MCP door's rule; agent-run-reach.test.ts runs the HTTP handler and the MCP rule over the same runs and checks the two agree). A scheduler firing reads as a run: the agent's name as its title, running while it is queued or running, done or error when it ended, what it kept as produced refs, and stats (what it read and kept). Both kinds that sit outside the person's desks or channels are left out of the list and are "No such run" when opened. Before this, MCP listed custom agents' runs only, and listed them with no reach rule.

What an agent run does not carry. These are not on the row today, so they are not on the resource: the worker or process it belongs to (the agent run names neither), the desk and channel (derived as above, never stored), who started it or why, what it was asked (a run-now request is not stored), what it cost (the spend is on the usage ledger by run id, not on the run), the sources it read (a custom run's step target names the connected app; a scheduled firing has a count only, stats.read), a title (the installed agent's name is used, then the slug), and a schema_ref of its own (results carry the built-in ones). The snapshot of the agent's definition on a custom run (agent_def) is never returned: it holds the agent's prompt and watch lists.


7. Reference: results

GET /platform/runs/:id/results

Everything a run produced. Readable while the run is going (partial) and after it settles. Order: files and lists first (the deliverables), then records.

Query
kindoptionalrecord, list or file
schema_refoptionalexact match
updated_afteroptionalISO timestamp, on each result's produced_at. Turns the list into a feed, limit per page (default 25): see Polling
limitoptional1–100, default 25; only with updated_after
{
  "ok": true,
  "api_version": "2026-09-21",
  "run_id": "run-001",
  "process_id": "proc-permit-check",
  "run_status": "done",
  "settled": true,
  "results": [
    {
      "id": "run-001.document.doc-003",
      "process_id": "proc-permit-check",
      "run_id": "run-001",
      "step": { "key": "memo", "title": "Write the permit memo" },
      "produced_at": "2026-09-16T09:00:00.000Z",
      "links": { "self": "https://www.framed.dev/api/platform/results/run-001.document.doc-003", "run": "https://www.framed.dev/api/platform/runs/run-001" },
      "kind": "file",
      "schema_ref": "framed:document/memo",
      "schema_version": "1",
      "title": "Permit status, week 38",
      "file_ref": {
        "id": "document:doc-003",
        "kind": "document",
        "name": "permit-status-week-38.md",
        "media_type": "text/markdown",
        "url": "https://www.framed.dev/api/platform/files/document/doc-003?token=1758014100.…",
        "url_expires_at": "2026-09-16T09:15:00.000Z"
      }
    },
    {
      "id": "run-001.insight.ins-004",
      "kind": "record",
      "schema_ref": "framed:insight/briefing",
      "schema_version": "1",
      "title": "Permit check: two renewals due",
      "payload": {
        "title": "Permit check: two renewals due",
        "type": "briefing",
        "snippet": "NH-2211 and NH-2218 expire in early October.",
        "content_md": "## Two renewals due\n\n- NH-2211, Substation West, 2 October\n- NH-2218, Cable route 7, 9 October"
      },
      "…": "…"
    },
    {
      "id": "run-001.approval.apr-002",
      "kind": "record",
      "schema_ref": "framed:approval/run_gate",
      "schema_version": "1",
      "title": "A person checks the exceptions",
      "payload": { "exceptions": [ { "permit": "NH-2211", "site": "Substation West", "expires": "2026-10-02" } ] },
      "approval": { "id": "apr-002", "status": "decided", "decision": "approved", "links": { "self": "…" } },
      "…": "…"
    },
    {
      "id": "run-001.step.read_register",
      "kind": "record",
      "schema_ref": "nordhaven:permit_rows/2",
      "schema_version": "1",
      "title": "Read the permit register",
      "payload": {
        "summary": "14 permits read; 2 expire within 30 days.",
        "extract": "[{\"permit\":\"NH-2211\",\"site\":\"Substation West\",\"expires\":\"2026-10-02\"}]",
        "confidence": 0.92
      },
      "…": "…"
    }
  ],
  "file_url_ttl_seconds": 900
}

withheld, when present, counts results this person may not open (a locked space, or a document without the read_studio grant). Errors: 404 no_such_run, 403.

GET /platform/results/:id

One result by its id, with a fresh file link when it is a file. The id is the one a list printed; it is parsed, not looked up, so it stays valid for as long as the run does.

{ "ok": true, "api_version": "2026-09-21", "result": { "…": "…" } }

Errors: 404 no_such_result (malformed id, unknown run, or a result the run no longer carries), 403.

POST /platform/results/:id/actions

Propose an action about a result. A result lists what can be done with it under actions; a client does not do it, it posts the proposal back and Framed writes the approval card an assistant's proposal writes. The person who is asked, the audit row are the ones that already exist, and the card keeps a link back to the result.

One kind so far, message_draft: a mail, as a draft in a connected mailbox.

POST /platform/results/run-001.document.doc-004/actions
{
  "kind": "message_draft",
  "to": "bram@buyer.example",
  "subject": "Two permits expire in October",
  "body": "Hello Bram,\n\nNH-2211 and NH-2218 expire in early October. We have started the renewals.\n\nIneke",
  "reason": "The buyer should hear it from us first."
}
Body
kindmessage_draftthe only kind so far
tostringone address
subjectstring, at most 300
bodystring, at most 20 000
connection_idoptional stringwhich mailbox, when the workspace has more than one. Left out, the one mailbox is used; two or more are refused by name
reasonoptional stringwhy this client proposes it. Shown on the card; clipped at 500 characters

The body is the JSON Schema framed:action_proposal (/framed-package-1.json). A member it does not list is refused, not ignored: attachments and cc are not supported yet, and a client that sends them is told so instead of believing they were attached.

Answers 202 with the approval, typed as a message draft:

{
  "ok": true,
  "api_version": "2026-09-21",
  "status": "waiting_for_approval",
  "approval": { "id": "apr-…", "type": "framed:message_draft", "status": "open", "run_id": "run-001", "from_result": { "…": "…" }, "package": { "…": "…" } },
  "job_id": "job-…",
  "from_result": { "result_id": "run-001.document.doc-004", "run_id": "run-001", "schema_ref": "framed:document/memo", "title": "Permit status, week 38", "status": "final" },
  "mailbox": "Ineke (Gmail)",
  "note": "Nothing is drafted or sent yet. …"
}
  • Nothing is drafted or sent on the call. A person approves the card (or edits it and approves it, or declines it) through the decision route; approved, it is a draft in the connected mailbox, as any mail proposal is. A real send stays in the app.
  • The link back is approval.from_result (on the card, the list and the single read). The card also carries run_id, so GET /platform/approvals?run_id= finds the proposals about a run.
  • As the person. The result is looked up the way GET /platform/results/:id looks it up, so a result this person cannot read is 404 no_such_result. It needs the read grant for that and the mail grant (propose_mail) for the proposal. A key with nobody behind it may propose: the person who decides the card is the person who acts.
  • Only what a result offers. A finished document, finding or table offers a message draft. A decision record or a step's conclusion offers none (409 action_not_offered).
  • The mailbox is settled before a card exists that would fail when approved: 409 no_mailbox, 409 ambiguous_mailbox (with candidates, each with the id to pass as connection_id), 409 mailbox_not_found, 409 mailbox_not_active.
  • A placeholder is not text. A draft written before 14 Oct 2026 can hold pii:h:… where an address or a name was; posting that back is hidden_value.

Errors: 400 invalid_action (issues says which member and why), 403 access_policy (grant says propose_mail or read_memory), 403 workspace_out_of_reach, 404 no_such_result, 409 as above, 502 proposal_failed.


8. Reference: approvals

GET /platform/approvals

Human-approval steps in a workspace, newest first (oldest updated_at first with updated_after).

Query
workspace_idrequired
statusoptionalopen (default): waiting on a person; decided: already answered; all
run_idoptionalonly the approvals belonging to this run
process_idoptionalonly the approvals of this process (a UUID; anything else is 400 invalid_input)
updated_afteroptionalISO timestamp. Turns the list into a feed: see Polling
limitoptional1–100, default 25

open means status = pending on a card whose queue is needs_you or ready. A notice asks nothing and is never open.

{
  "ok": true,
  "api_version": "2026-09-21",
  "workspace_id": "ws-nordhaven",
  "approvals": [
    {
      "id": "apr-002",
      "workspace_id": "ws-nordhaven",
      "type": "framed:decision_request",
      "kind": "run_gate",
      "title": "A person checks the exceptions",
      "summary": "Two permits expire within 30 days.",
      "queue": "needs_you",
      "status": "open",
      "decision": null,
      "reason": null,
      "decided_by": null,
      "decided_at": null,
      "execution": { "status": "none" },
      "run_id": "run-001",
      "links": {
        "self": "https://www.framed.dev/api/platform/approvals/apr-002",
        "decision": "https://www.framed.dev/api/platform/approvals/apr-002/decision",
        "run": "https://www.framed.dev/api/platform/runs/run-001"
      },
      "created_at": "2026-09-16T09:00:00.000Z",
      "updated_at": "2026-09-16T09:00:00.000Z"
    }
  ],
  "filter": { "status": "open", "run_id": "run-001", "updated_after": null, "limit": 25 }
}

Every approval says which typed kind it is in type: framed:message_draft for a mail draft waiting to be made in a mailbox, framed:decision_request for everything else. The list leaves the content to the single read.

GET /platform/approvals/:id

One approval, with payload: what is actually being decided, as the card stores it, and package: the same card as a typed kind a client can draw and answer (see Decision requests and Message drafts). Credential-shaped keys are stripped at every depth from payload; a payload over 60 000 characters keeps its small fields and names the ones it dropped (omitted_because_too_large).

{
  "ok": true,
  "api_version": "2026-09-21",
  "approval": {
    "…": "as in the list",
    "payload": {
      "exceptions": [
        { "permit": "NH-2211", "site": "Substation West", "expires": "2026-10-02" },
        { "permit": "NH-2218", "site": "Cable route 7", "expires": "2026-10-09" }
      ]
    }
  }
}

Errors: 404 no_such_approval (also in a locked space), 403.

POST /platform/approvals/:id/decision

Approve, edit and approve, or decline, as the person behind the key.

Body
decisionrequiredapprove or decline. reject is the older word and means decline
reasonrequired for a decline (unless it carries decline_reason), optional for an approval, ≤ 500one sentence. Stored as the card's note; shown in Framed
decline_reasonoptional, only with a declinewhy, in one word: wrong, duplicate, not_needed, already_handled, not_now or other. Kept on the decision record (payload.decision.decline_reason) and on the judgment the decision writes; the approval resource carries it back as decline_reason. Anything else is 400 invalid_decision
answersoptional listthe answers to the card's questions: [{ question_id, option_ids?, other?, text?, skipped? }] (see Decision requests)
editoptional object{ subject?, body? }: a message draft is approved as edited (see Message drafts). Only with approve

A decline is an answer, not an error: it needs no answers, no edit, and the work carries on down the declined path.

What happens, in order:

  1. The decision is checked the way the card in Framed checks it. The person's reach and grant (propose_run, and propose_mail for a message draft), a card that is a notice or a real send (decided in the app), a card already decided, a browser task's card (only the person who started the task decides it); then the edit, then the answers, each against the card's own questions. Nothing is written until all of it holds.
  2. The card is updated exactly as the To review panel updates it, in one write: status approved or dismissed, note = reason, resolved_by = the person, resolved_at = now, evidence.decided_via = { channel: 'platform_api', client, at }, the record of the decision (payload.decision: outcome, by, via, client, and the answers in words and as chosen when there were questions; written also when nothing was asked, so the card and the Log say where it was decided), the fields the answers fill in (an invoice's object and receiver) and the edited words. Only a card still pending takes the update; two clients deciding at once leave exactly one recorded, and an edit never lands on a card somebody else decided first.
  3. When there is something to carry out, the card is handed to Framed's executor (v2-approval-execute) as that person. That is every approve on a card with an action, and a decline on: a run gate (a path, not a cancel: the run goes on down the steps that wait on the decline, or ends done with outcome: "declined"), an approval queue kind (writes the standing rule so the same thing is not proposed again), a measured job, a browser-tab write, a custom-tool call, a browser task's card (the task goes on without the step; one whose browser was let go starts again on the declined path).
  4. The executor claims the card (execution.status none → queued → running → succeeded | failed) and works in the background. A call the executor refused is written back as failed, so the card never says "applied" about work nobody did.
{
  "ok": true,
  "api_version": "2026-09-21",
  "decision": "approve",
  "approval": { "id": "apr-002", "status": "decided", "decision": "approved", "reason": "Both renewals are already in flight.", "decided_by": "user-ines", "execution": { "status": "queued" }, "package": { "…": "the decided request, with the answers" }, "…": "…" },
  "execution": "started",
  "note": "The decision is recorded and Framed is carrying it out. Poll the approval: execution.status ends at succeeded or failed."
}

execution is one of started (the executor took it), not_needed (nothing to run; the status change is the whole decision), failed (the executor could not be reached or refused; execution_error says why, the card shows it, and a retry is a new decision in Framed).

Every refusal carries code (and the same word in reason) and, for a bad answer or edit, issues: a list of { path, code, message } naming each thing that is wrong, so a client can mark the field. code is the first of them.

StatuscodeWhen
400invalid_actiona proposal that does not fit its type; issues says which member and why
400invalid_decisionnot approve/decline/reject, a decline without a reason or a decline_reason, a decline_reason outside the set, or one sent with an approval
400invalid_answersanswers is not a list of { question_id, ... }, or an answer has a member that is not part of one
400unknown_questionan answer names a question the card does not ask (a card that asks nothing takes no answers)
400duplicate_answerone question answered twice
400unknown_option, option_disabledan option the question does not have, or one that cannot be chosen (the reason is in the sentence)
400too_many_options, no_option_chosena single choice with two answers, or a choice with none
400other_not_allowed, other_emptya free answer where the question takes none, or with no words
400text_required, answer_too_long, not_a_text_question, not_a_choice_questiona text answer that is missing, over the question's limit, or sent to the wrong kind of question
400hidden_valuean answer or an edit holds a pii:h:… placeholder instead of the value
400answer_requiredan approval with a required question unanswered (a decline needs none)
400invalid_edit, min_properties, min_length, max_length, additional_propertythe edit is not { subject?, body? } or a word is empty or too long
400field_not_editablean edit that names to, cc, from or attachments (field says which)
400not_editablean edit on a card that is not a message draft
400edit_on_declinean edit sent with a decline
403no_person, access_policynobody behind the key; or the person lacks the grant (propose_mail for a message draft; grant and where say which)
403not_task_ownera browser task's card, and the person behind the key did not start the task: only the person who did approves or declines it
404no_such_approvalalso in a space this person cannot open
409already_decidedthe card is no longer pending; approval shows it as it stands
409not_a_decisiona notice, or a real send from the workspace's mail account: decided in the app
409incomplete_drafta message draft with nobody to send to, no subject or no words, approved as it is; issues says what is missing. A decline is always possible
502decision_failedthe update itself failed; error says why

POST /platform/approvals/:id/follow-up

Stop following up what an approved write left (see What an approved write follows up, below), as the person behind the key: no check after this, and nothing said about it any more. For a follow-up that no longer matters, such as an invoice handled another way.

Body
actionrequiredstop, the one thing a person does with a follow-up

The answer is { ok, api_version, follow_up, approval }, the follow-up as it stands now. Stopping one that already ended (done, or stopped) changes nothing and answers the same, so a client can send it again safely. The grant is propose_run, the same as deciding the approval.

StatuscodeWhen
400invalid_actionan action that is not stop
403no_person, access_policynobody behind the key; or the person lacks propose_run
404no_such_approvalno such approval within reach, also in a space this person cannot open
404no_follow_upthe approval's write left nothing to follow up

Next steps and asks

Decided by Loek on 12 Oct 2026, for a review app (Ginola): "when an AI is connected, like Framed, we can act right away: show a loading screen and stream the results". Asked how Framed answers, he chose "as the person's chat".

GET /platform/next-steps?workspace_id=…&about=…&language=…

What can come next about one object: about is its ref, approval:<id>, run:<id>, insight:<id> or document:<id>; language is en (default) or nl, for the labels.

{ "ok": true, "about": "run:9c…", "ask": true,
  "steps": [
    { "id": "summary", "label": "Sum up what this run found", "kind": "lookup", "runs": "now" },
    { "id": "sources", "label": "Show what it read", "kind": "lookup", "runs": "now" },
    { "id": "rerun", "label": "Run this again", "hint": "Waits for approval in Framed", "kind": "run", "runs": "approval" }
  ] }

At most eight steps, the most useful first. runs: approval is a step that only proposes; the others are answered at once. "Run this again" is offered only on a run of a worker the person reaches, with a plan, and only when they may propose a start (propose_run). ask: true: a question in words is taken too.

POST /platform/ask?workspace_id=…

{ "about": "approval:5d1e…", "step": "summary", "language": "nl", "context": { "title": "Roof repair" } }

or text (a question in words, at most 1 000 characters) instead of step: exactly one of the two. context.title is the client's title, for the wording.

An ask is a turn of the person's own chat: v2-chat runs it as the person behind the token (the consenting person of a Connect token, a delegation's person, or the issuer of a key with act_as_issuer), with Framed's own tools, on the account's credits, in a chat of theirs about that object (origin ask:<ref>, one per person and object, so a second step continues it). The person finds it among their chats in Framed. Framed does what was asked, as in its chat; a write to a connected app, or anything sent outside, waits for approval. A step that runs: approval only proposes: one approval card (as a start that asks first writes), nothing running.

The answer is text/event-stream; each event's data is one JSON object.

EventDataMeaning
status{text}What Framed is doing now, in the person's words (never a tool's name).
delta{text}More words of the answer, in pieces that end with a sentence or a line.
result{title?, body_md?, fields?, blocks?, links?, summary?, plan?, cards?, question?, revises?}The answer whole, at the end. It replaces the words that streamed: text the chat wrote before a tool call was thinking, not the answer. links are the sources it read (at most 12); fields and blocks what the chat showed as a card. A deliverable comes along as cards for the review app (below): summary, plan, cards and question; revises when the answer is one card of an earlier answer again.
approval{id, title, url}It waits for approval. A card the chat queued has its approval id, decided with the decision route. A write the chat holds for the person in the thread has an id that starts with chat:, and is decided in that chat (url opens it).
steps{steps}What can come next, as in next-steps.
done{ran}The end. ran: false when something waits for approval.
error{code, message}The end, without an answer: busy (the person's chat about this object is still answering; this answer follows there), no_credits, chat_error, stream. message is for a person.
  • Every refusal comes before the stream, as JSON with a code: 400 with issues (invalid_about, step_or_text, invalid_step, text_too_long), 403 no_person or access_policy (read_memory), 404 no_such_object (also an object in another workspace, or outside the person's reach: the same answer as one that exists nowhere) or no_such_step, 409 not_runnable (a run that cannot be started again from here) or not_answered, 502 chat_failed, chat_unreachable or start_failed.
  • A comment line (: still here) every 15 seconds keeps a quiet stream open. A reader that goes away stops reading; the turn finishes in the person's chat.
  • A stream carries no receipt (a receipt rides a JSON answer). The turn is in the person's chat and in the Log. An ask is not an idempotent op: send it once.
  • A caller that cannot read a stream gets every refusal an ask would, then 501 stream_only, and nothing is asked or proposed.

The answer as cards, for the review app

Loek, 19 Oct 2026: "when a chat, a question or a request starts from Framed, it must know it lands on Donna and format it exactly for Donna, so it makes perfect cards: a main card with the plan and all its steps, and sub-cards with the output". So a turn asked from a review app (an ask, a chat turn) is told which review app it lands in (reviewAppGuidance in channel-chat.ts, after the chat's own guidance) and writes a deliverable in the card shape, plain markdown the person can also read in Framed:

# <the title, at most 80 characters>
<one to three sentences: what the person must know or decide in ten seconds>
## Plan
1. <one step per line, at most 12>
## <the title of the first piece>
<the piece whole, ready to use>
## <the next piece>
Vraag: <the one question, when there is one; "Question:" in English>

review-app-answer.ts reads it back, deterministically, and result carries it beside body_md: summary (plain text, at most three sentences, 600 characters), plan (the steps, at most 12 of 200 characters), cards ({key, title, body_md}: one per piece, at most 12; key is the title's slug, stable, what a revision names; body_md at most 20 000 characters) and question (at most 200 characters). A question, a status or a short reply is written as a message, as before, and result carries only body_md: a review app draws that as one answer. Headings inside a code fence are code, never a section.

Changes to one card come back the same way: POST /platform/chats/{id}/turn with revise: {key, title} and the person's words as text. The chat is told to answer with that one card again, under the same heading; result.cards holds it (the key as asked, even when the heading was renamed or left out) and result.revises is true, so the review app replaces that card and nothing else. An approval said on a card, or a note, is kept in the chat without a turn: answer: false stores the person's line (201, kept: true, no stream, no credits spent).

A model call for an agent in Donna

POST /platform/model?workspace_id=…

For Donna, the review app whose own server runs an agent's loop (decided by Loek on 28 Oct 2026). Donna names a vendor (claude, openai, grok) and a tier (low, mid, high); Framed picks the model (DONNA_VENDOR_MODELS in _shared/model-policy.ts, a super-admin's DONNA_MODEL_SLUGS over it), clamps the tier to what the workspace allows, holds it to the workspace's model vendor policy, checks the credits, makes the call through callModel and meters it once: a v2_ai_usage row with surface donna, run_id (Donna's run, a uuid) and step_key (the card), debited from the wallet like any other call. Framed runs no tool: Donna runs the tools the model asks for and sends their answers back in the next call. Code: _shared/donna-model.ts, served by serveModel in v2-partner-api.

Donna sends a person's Connect token, never a key set by hand: the board's own Framed connection (the board's account pays), or Donna's platform connection (Donna's own account, connected once with Framed's sign-in, for a board's one-time trial). The call spends credits, so it acts as a person (ACTING_PLATFORM_OPS): a raw key would need act_as_issuer.

Body: vendor, tier, messages (the chat-completions shape, at most 200, 60 000 characters each), tools (function tools, at most 40), max_tokens (default 2 048, at most 8 192), run_id, step_key, source (app, board, agent, billed, for the log only).

200: { ok, model, vendor, tier, clamped, message: { role, content, tool_calls }, finish_reason, usage: { input_tokens, output_tokens, cached_tokens, cost_usd }, credit_eur, run_id }. credit_eur is what the wallet was charged (usdToCreditEur).

Refused before any call: 400 invalid_input (issues), 402 credits_paused (action: billing when a person can fix it there), 403 vendor_blocked, 403 tier_not_allowed, 503 policy_unreadable. 502 model_failed when the model did not answer; nothing is metered then.

A typed decision for an agent in Donna

POST /platform/decision?workspace_id=…

For Donna's agents (Loek, 29 Oct 2026: a decision model in the loop, much cheaper than a writing model for a decision). The contract the decision models already answer (_shared/typesafe.ts): one state text and a map of typed questions, at most 12: choice (criteria maps each option to what it means, 2 to 255 options; the answer can only be one of them), score (criteria is an array of 2 to 11 levels, lowest first; answered by level index) and noul (a yes/no; the answer is the probability it is true, with no confidence). model is drex (Nace's Drex, nace/drex-latest, the default) or jev (typesafe/jev-latest), held to the workspace's model vendor policy. Drex is asked on Nace's API with DREX_API_KEY, else through the routing supplier's Decisions API with OPENROUTER_API_KEY; Jev needs TYPESAFE_API_KEY. The credits are checked first, and the call is metered once: a v2_ai_usage row with surface donna, run_id and step_key, priced by the client from the input tokens (typeSafeCostUsd, the price the other decision sites use; the routing supplier's own billed cost when it reports one), never at zero. Code: _shared/donna-decision.ts, served by serveDecision in v2-partner-api. Same callers as /platform/model: a person's Connect token (the board's own Framed connection, or Donna's platform connection for the trial).

Body: state, questions, model, run_id, step_key, source (app, board, agent, billed, for the log only).

200: { ok, model, answers: { <key>: { choice | score | noul, probabilities, confidence, legend } }, clipped, usage: { input_tokens, output_tokens, cost_usd }, credit_eur, run_id }. Only the questions asked come back.

Refused before any call: 400 invalid_input (issues), 402 credits_paused, 403 vendor_blocked, 503 not_configured (no key for that model), 503 policy_unreadable. 502 decision_failed when the model did not answer; nothing is metered then.

Chats and workers, for a review app

Loek's idea of 16 Oct 2026, for Donna: "use Donna to start and view Framed chats and workers through the slide-up card, put agents to work through the webhook, with references to Donna cards". The review app's server calls these with the workspace's own Connect token, as the person who connected it; the rules are platform-chat.ts, the routes beside the asks.

GET /platform/chats?workspace_id=…&limit=…&before=…&about=…

The person's chats (kind: chat: the console's own, and their chat about one object, which carries it as about) and the topics on the desks they reach that are open to the workspace (kind: topic), newest first: {id, title, kind, about?, updated_at, url, worker_id?, framed?}. worker_id names the worker whose own conversation it is (the one opened for it, the topic it introduced itself in, or the topic it was pinned to); framed: true marks Framed's own conversation of the workspace. A worker's conversation off every desk is listed when the worker is in the person's reach. before is the next_before of the page before. about=<ref> finds only the person's chat about that object (the thread POST /platform/ask continues). A colleague's private chat, an archived one and a desk outside the person's channels are never listed. A key with nobody behind it has no chats (403 no_person).

GET /platform/chats/:id/messages?after=…&limit=…

Oldest first, the person's and Framed's: {id, role: person | framed | worker | colleague, by, text_md, at, attachments?, approval?: {ids}, worker?, blocks?, files?}. approval.ids are the cards a message put up, decided with the decision route. after is a message id or a moment: the messages after it, however long the chat is, so a client pages to the end with the last id it holds. A chat not the person's to read is 404 no_such_chat, like a chat that exists nowhere.

Where they apply, a message also carries what Framed draws with it:

  • worker: {id, name, mark}, the worker the message speaks as. A run's post, and the chat answering as the worker in its own conversation (role is worker and by its name for both). mark is the worker's look (see below); id is null for a worker Framed no longer knows by id.
  • blocks: what the message drew, as Framed's own ui blocks (ui-blocks.ts: choice, form, checklist, action with its mail, table, chart, metrics, post, worker, connection, signin, pages), each with kind and id. A page (html) and a block that does not read are left out. An answer to a block goes back as the person's next turn, in words.
  • files: [{id, title, kind, url, mime?}], the files the message made (a run's file, a file a chat-started run wrote back, the files of the turn). kind is the file's kind as Framed keeps it (memo, report, presentation, file, …), mime a stored file's type, url where it opens in Framed. A file the person may not open is left out.

GET /platform/chats/framed?workspace_id=…

Framed's own conversation of the workspace: where its daily look posts and every routine reports, the first row of the messenger in Framed. It is read first and made only when the workspace never had one, as the app does. 200 {chat, name, mark}: chat as the list gives it (framed: true), name what the workspace calls Framed (Framed until it names it), mark its look (a smile on a cobalt pebble until the workspace gives it one). Read and write it with the chat routes by chat.id. 409 chat_closed when it was closed or archived; 404 no_such_chat when it sits on a desk the person cannot open. framed is never a chat's id, so the route does not meet /chats/{id}.

POST /platform/chats?workspace_id=…

{ "text": "Welke facturen staan open?", "language": "nl",
  "refs": [{ "kind": "donna_card", "id": "GN-AB12", "title": "Dakwerken Van Dijk", "url": "https://…", "quote": "KVK 81234567" }] }

A new chat of the person. With about (an object's ref, as in next-steps) it is their chat about that object, found or made; without it a new chat they find under Chat in Framed. With text the first turn runs and streams exactly as an ask does, after one leading chat event ({id, title, url}); without text only the chat is made (201, chat). The person's words go into their chat unchanged, with the cards under them by title, id and link (and what was quoted), and the message keeps them (metadata.donna_refs).

POST /platform/chats/:id/turn

{text, language, refs, revise?, answer?}: one more turn, streamed with the ask's events. The same grant as an ask (read_memory): the turn applies the person's own grants to every tool it calls, and a write still waits for approval. revise: {key, title} makes the words changes to one card of an earlier answer, and answer: false only keeps the words in the chat (The answer as cards, for the review app, above).

GET /platform/workers?workspace_id=…

The workers inside the person's reach and channels: {id, name, state: active | paused, rhythm?, last_run?: {id, status, at}, url, does, voice, chat_id?, mark, working, waiting}. A playbook (a way of working that runs only when asked) is not listed; withheld counts the workers outside reach.

What the messenger needs, per worker: does is what it does in one line (empty when Framed has no words for it); voice says it has a conversation of its own and speaks there as itself; chat_id is that conversation when one is open and the person may read it; working says its newest run is queued or running; waiting counts its approvals that wait on the person (the ones GET /platform/approvals?status=open&process_id=… lists). mark is how Framed draws it: {initial, shape, tone, colour, ink, glyph?}, the glyph (else the initial) in ink on colour, in its shape (square, circle, squircle, hexagon, blob) and tone (solid, soft, outline). The colour follows the worker's id until a look is chosen for it in Framed.

{ "id": "a1000000-0000-4000-8000-000000000001", "name": "Invoice check", "state": "active",
  "rhythm": "daily", "url": "https://www.framed.dev/workers/a1000000-0000-4000-8000-000000000001",
  "does": "Checks every supplier invoice against the contract.", "voice": true,
  "chat_id": "b2000000-0000-4000-8000-000000000001",
  "mark": { "initial": "I", "shape": "hexagon", "tone": "solid", "colour": "#ff9a1f", "ink": "#17171a", "glyph": "receipt" },
  "working": false, "waiting": 2 }

POST /platform/workers/:id/chat

The worker's own conversation, opened as the person, the way Framed opens it when they tap the worker: the one it has, else one made now on its desk, pinned, with the worker's greeting. Opening it gives the worker its voice, so a turn there (POST /platform/chats/:id/turn) is answered as that worker, and answer: false keeps a line in it without a turn, as in any chat. A person who may not change the worker still opens it. 201 {chat, opened: true} when it was made now, 200 {chat, opened: false} when it was there; chat carries worker_id. Refused in words: 409 not_a_worker (a way of working), 404 no_such_worker (removed, out of reach, or nowhere), 403 no_person, 403 chat_out_of_reach (its conversation sits on a desk the person cannot open), 502 chat_failed, 503 not_configured or session_unavailable. Needs the read grant (read_memory), as reading the worker does.

POST /platform/workers/:id/run

{request?, refs?}: runs the worker now as the person, with its own plan (the same door as Run now on its page). The request steers that run; the cards ride on the run's input (donna), and every report of the run on the review app names them as refs.donna, so the result lands under the card it was started from. 201 {run_id, worker, message}, or 409 not_started with the reason in words (it runs already, is paused, or has no plan). Needs propose_run.

POST /platform/workers/:id/steer

{text}: Pause, Pause until Friday, Resume, or one rule the worker follows from now on. 200 {summary, worker}. Needs propose_run.


9. Reference: files

GET /platform/files/document/:id?token=…

The bytes behind a file_ref of kind document, on the signed link the result handed out. No API key is needed: the link carries its own credential (token, an HMAC over the file id and the expiry, keyed on a secret only the function holds) and is checked before any key is looked for, so a person opening a memo from a dashboard needs nothing else. It stops working 15 minutes after it was minted; fetch the result again for a fresh one.

Served as:

The document isContent-TypeExtension
a memo, or a report with sectionstext/markdown.md
a presentation or a designed report (Framed rendered HTML)text/html.html
a research table or a dashboard specapplication/json.json

Content-Disposition: inline; filename="<slug>.<ext>" names the file. Cache-Control: private, no-store.

A file_ref of kind upload (a file someone uploaded that the run referenced) points at a storage link instead, under the same 15-minute rule; nothing on this route serves it.

Errors: 403 file_token_invalid (wrong file, wrong signature, malformed), 403 file_token_expired, 404 no_such_file.


10. Resource schemas

Process

FieldTypeMeaning
idstring
workspace_idstring
slugstring | nullthe workspace's own handle for it
namestring
goalstring | null
ownerstring | nullthe colleague responsible
cadencestring | nullhow often the workspace runs it
statusstring | nullwhere it is on Framed's ladder: documented, proposed, verified, …
runnablebooleanFramed has a plan (or a linked playbook) it can run
startsimmediately | after_approvalthe process's own Who starts it setting
playbookstring | nullthe playbook it runs, when linked
stepsintegerdocumented steps
schema_refsstring[]result schemas its plan declares on its steps
latest_run{ id, status, updated_at } | null
latest_record{ id, run_id, schema_ref, produced_at } | nullpointer at the last completed run's JSON; the body is GET …/latest-record
links{ self, runs, latest_record }runs is where a POST starts one
updated_attimestamp | null

Run

FieldTypeMeaning
idstring
workspace_idstring
process_idstring | nullnull for a run started from chat without a process
process{ id, name } | null
playbookstring | null
titlestring
statusrun statussee Concepts
settledbooleanno longer queued, running or waiting
stageRunStage | nullthe step the run is on: the running one, else the flagged one, else the failed one, else by position; the last step when done
steps{ key, title, status, problems?, skipped? }[]up to 60; problems are the acceptance problems on a flagged or failed step, in words; skipped: true on a step a path or a decline left out
blockersRunBlocker[]empty unless waiting or failed
allowed_transitions(continue | cancel)[]what a transition may ask for now
inputobject | nullthe structured fields the client handed the start
input_files[{ ref, kind, name, media_type, size_bytes }]the files it handed the start, by reference, with what they point at. [] when none
input_from{ result_id, run_id, schema_ref, title, status } | nullthe earlier result it was linked back to
rehearsaltrue (only when set)a test run from the Processes page
reviewright | wrong (only when set)a person's verdict on the ended run
outcomedeclined (only when set)a done run that ended at a declined human approval with no step waiting on the decline
itemsRunItems (only when set)a run that worked items one by one (a mailbox, a list): what its stages counted once they settled. Absent while a stage is still working and on a run without one
report{ lines: { system, result, count }[], closing } (only when set)the report the run ended with: one to six lines, each a system, what came of it in two to five words and its count, then one closing sentence about what waits for a person, or that everything is handled. The same report the run page, Connect and the review app show
links{ self, results, approvals, transitions, process? }
created_bystring | nullthe person the run was started as
created_at, updated_at, completed_attimestamp | null

RunStage: { index, count, key, title, status }; index is zero-based.

RunItems: { count, by_outcome, failed, waiting }. count is every item the run's stages worked through, by_outcome how many came out each way (the outcome words are the worker's own, unsure when a sort was not sure enough), failed the ones that failed, waiting the ones that wait for a person (a check held them, a sort was unsure, or a card waits on them). A run of eighty items is these counts, never eighty results (21 Oct 2026, agentic worker model P14).

RunBlocker, one of:

kindFieldsMeaning
approvalapproval_id?, titleparked on a human approval; decide it
questionquestionparked on a question; a person answers in Framed, or continue accepts the flagged step
errormessagethe run failed

Step internals are never on the run resource: no acceptance rubrics, judge specs or walkthrough handles. A step's extract is on the result (framed:step_conclusion) and on GET …/latest-record. Connect's framed_fetch run:<id> also returns it, so a host can write from it.

Agent run

FieldTypeMeaning
idstring
workspace_idstring
sourcecustom | scheduledwhere the run is stored: a custom agent's run, or a firing of a catalog or desk agent by the scheduler
agent{ slug, name, kind }the installed agent; name falls back to the slug when the agent is no longer installed; kind is custom or catalog
titlestringthe agent's name
statusrun statussee Agent runs for how the stored words map
settledbooleanno longer queued, running or waiting
steps{ key, title, status, target?, problems? }[]up to 60, from a custom run's trace; empty for a scheduled firing. target is the connected app the step read; problems is why a step failed
blockersRunBlocker[]error with the message, or question when a custom agent's draft waits on its reviewer
stats{ read, kept, outcome }scheduled firings that ended, when the run reported them. read and kept are numbers or null (null: not counted), outcome is kept, below_bar, duplicate, nothing or error
agent_versionintegercustom runs: the version of the agent definition the run used
producedstring[]what the run kept, as the refs MCP prints: insight:<id>, document:<id>
links{ self }
created_attimestamp | nullwhen it started or fired
updated_attimestamp | nullwhen it ended, else when it started
completed_attimestamp | null

Result

FieldTypeMeaning
idstring<run id>.<slot>.<ref>, slot ∈ document, insight, approval, step
process_idstring | null
run_idstringfor an agent run's result, the agent run's id
step{ key, title } | nullthe step that produced it, when known; null for an agent run's result
kindrecord | list | file
schema_refstringwhat the payload is shaped like (see Results in depth)
schema_versionstring"1" for every Framed built-in
titlestring
payloadobjectrecord and list only
file_refFileReffile only
approval{ id, status, decision, links }only on a record that is an approval card
produced_attimestamp | null
statusdraft | awaiting_approval | finalawaiting_approval is a document proposed to a person, or an approval card still open. draft is a document not yet confirmed, a step that ended flagged, or any result that does not fit its own type (see issues). Everything else is final. A result that does not fit its type is never final
provenance{ run_id, process_id, step, produced_at, run_status, review, sources, checks, thin_context }where it came from. review is the run's verdict when there is one. checks carries confidence and flags on a step conclusion and is {} otherwise. thin_context is true when the generator flagged a document as written on thin context, false for any other document, and null for results that are not documents. Cost is not emitted yet. sources lists the pages a finding was written from, as { url, title }, and is [] for results that name none
format"framed-package/1"the package contract this result follows (see Results in depth)
validatedbooleantrue when Framed has a schema for schema_ref and checked the result against it. false when schema_ref is the workspace's own label, which Framed passes through
issues[{ path, code, message }]what is wrong with the result, empty when it fits. path is from the result (payload.content_md), code is a word to switch on (type, required, min_length, truncated, empty_document, ...)
renditions[{ media_type, name, url, expires_at }]the forms the result can be fetched in. Today the file a document already is; [] for a record or list
actions[{ id, kind, label, requires, method, href, result_id }]what a client may propose about this result, as proposals to post back to href; the client never executes one. A finished document, finding or table lists draft_message (kind: "message_draft", requires: "approval"). A decision record and a step's conclusion list none. See POST /platform/results/:id/actions
links{ self, run }

FileRef: { id: 'document:<id>' | 'upload:<id>', kind, name, media_type, size_bytes?, url, url_expires_at }. url is null only when no link could be minted (an upload whose storage object is gone).

Approval

FieldTypeMeaning
idstring
workspace_idstring
kindstringthe card kind: run_gate, connect_run, invoice_check, ads_change, …
title, summarystring, string | null
queueneeds_you | ready | noticeneeds_you: a person has to judge it. ready: Framed finished its own work and waits behind one approval. notice: nothing is asked
statusopen | decided
decisionapproved | rejected | closed | nullnull while open. closed: decided without an approval and without anything running
reasonstring | nullthe decider's note
decided_bystring | null
decided_attimestamp | null
execution{ status, result? }status ∈ none, queued, running, succeeded, failed; result is the executor's outcome, sanitised
writes[Write] | [] | nullwhat approving writes outside Framed, call by call, and how far each got (see What an approval writes, below). []: approving writes nothing outside Framed. null: the action is of a kind only package.content.effect describes in words
follow_upFollowUp | nullafter the write: what Framed follows up until it is done in the other system (see What an approved write follows up, below). null when the write's tool asks for nothing, or nothing was written
run_idstring | nullthe run this card belongs to, when it has one
process_idstring | nullthe process the card was raised for, also when it has no run (an invoice an intake judged)
from_insightstring | nullthe finding the card came with, such as an intake's report of the documents it read
from_result{ result_id, run_id, schema_ref, title, status } | nullthe result this card was proposed about, when a client proposed it so; null otherwise
links{ self, decision, run? }
payloadobjecton the single read only: what is being decided
typeframed:decision_request | framed:message_draftthe typed kind this card is
files[FileRef]on the single read only: the file the card was judged on (an invoice's PDF from the mailbox), with a link minted at that read and good for 15 minutes; read the card again for a new one. id is upload:<id> when the file was filed as an upload, else evidence:<approval id>. Empty when there is none or the reader may not open documents
packagepackageon the single read only: the card as its typed kind (format, type, version, status, title, validated, issues, content, provenance, actions). status is awaiting_approval while open and final once decided
created_at, updated_attimestamp | null

How Framed's own statuses map: pending → open; approved → approved; dismissed, deviation → rejected; done → approved when the action succeeded, else closed.

What an approval writes

A card that calls the workspace's own tools when it is approved (an invoice staged in the property system, a supplier created first) says so in writes, one entry per call, in the order they run. It is read off the card's action, so a client can show the person approving what will go out before they decide, and what went out after:

FieldTypeWhat it is
stepnumber1-based, the order the calls run in
toolstringthe tool's slug
namestring | nullthe tool's own name (Bloxs: stage invoice PDF); null when the workspace has no such tool any more
systemstring | nullthe system it writes in: the tool's name up to its colon (Bloxs), else null
accessread | write | sensitive | nullthe tool's risk class
enabledboolean | nullwhether the tool is switched on (a card can name a tool switched off since)
sends[{ key, value }]what the call sends, argument by argument, as text, at most 12, each clipped at 300 characters. Never a file's bytes or anything shaped like a credential. An object the person picked when deciding (another of the agent's alternatives) is shown as it will go out
filestring | nullthe document the call sends along, by its name
limits[string]what the tool never does, as whoever set it up wrote it (Never books, pays or deletes an invoice.); empty when it states none
statusplanned | running | succeeded | failed | unclear | not_runplanned while the card waits; running once approved; unclear when the system gave no answer in time (it may or may not have gone through); not_run for a declined card, or a call after one that failed
http_statusnumber | nullthe system's answer to this call, when it gave one
errorstring | nullwhy the call failed, when it did
attimestamp | nullwhen it ran, once it did

When the person deciding picks another object than the one the agent proposed (the object question of a judged invoice), the call goes out with their object: every argument that is the proposed object, or a list item that is, carries the chosen one. Only one of the agent's own alternatives for another (payload.object_options): a typed object that is not one of them stays in the decision record for whoever finishes the booking, and the call goes as the agent wrote it. A word inside a longer text is never replaced, and a card whose agent proposed no object has nothing to replace.

What an approved write follows up

A write is often not the end: an invoice staged as a concept still has to be booked by someone in the other system. A tool that writes can say what it wants followed up (follow_up in TOOLS.md): what, until when it counts as done, and a tool of the same workspace that only reads and checks it. When the approved call went through, the approval carries follow_up, and Framed checks it on its own. Proactive, never irritating, by rule (_shared/follow-up.ts):

  • Nothing is said while it waits, and nothing when it is done. Where it stands is here, for whoever looks.
  • The checks thin out: two hours after the write, then four, eight and twelve hours, then once a day.
  • It is said once. A follow-up that waited the days its tool allows (7 unless the tool says otherwise) turns alarm, and one finding a week per workspace on Catch up names the ones that turned since the last.
  • A check that fails is never said by itself. After three in a row, note says Framed cannot check it; the days count on as before.
  • It stops by itself after its last day (30 unless the tool says otherwise), without a word. A person can stop it sooner with POST /platform/approvals/:id/follow-up.
  • The check only ever runs a tool that reads, is switched on and asks nobody: a follow-up never writes anything.
FieldTypeWhat it is
staterunning | alarm | confirmed | stoppedalarm: it waited longer than its tool allows; still checked once a day
whatstringwhat is followed up (Concept invoice 2026-0412)
untilstringwhen it counts as done (Someone books it in the property system)
notestring | nullone line on where it stands: waited too long, cannot be checked, how it ended
sincetimestampwhen Framed started following it (the write)
next_checktimestamp | nullthe next check, while it runs
last_checked_attimestamp | null
checkednumberhow many checks ran
alarm_at, done_at, stopped_attimestamp | nullwhen it turned alarm, was found done, or stopped
stoppedperson | expired | nullwho stopped it: a person, or its last day
check_toolstringthe slug of the read tool that checks
history[{ at, state, note? }]its changes of state, oldest first, at most 20; never every check

How it checks (the arguments, the condition) stays in Framed.


11. Results in depth

A result is one thing a run produced, found on the run row itself: the artifact each step wrote (outputs), the refs in each step's state slice, and the cards written against the finding the run produced. Nothing is copied; a result points at the row that already exists. There is no second document store.

kindpayload / file_refdefault schema_refSource
filefile_ref with a signed document linkframed:document/<type> (memo, report, presentation, …)a Studio document the run wrote (v2_artifacts)
filefile_ref with a storage linkframed:uploadan uploaded file the run referenced (v2_insights, type upload)
list{ query, entity_type, status, found, target, columns, rows, truncated_to? }framed:research_tablea research table (v2_artifacts with content.kind = 'research')
record{ title, type, snippet, content_md }framed:insight/<type>a finding the run wrote (v2_insights)
recordthe card's payload, plus approval: { id, status, decision }framed:approval/<kind>a card the run raised (a gate), or the per-item cards written against its finding (an invoice check writes one per invoice)
record{ summary, extract?, confidence?, flags? }framed:step_conclusionwhat a step concluded: the run row's state slice. Only for steps that ended done or flagged with something to say

A research table as a list. Each row is one flat object: id, name, url, entity_type, criteria_satisfied, criteria_total, then one key per column with its value, <key>_sources (URLs) where the cell cites any, and <key>_status when the cell is not ok (not_found, review). columns carries { key, label, kind }.

Types are read. A result's schema_ref and schema_version name its type (framed-package/1; docs/package-contract.md is the design). For every type Framed defines, the JSON Schema is published at /framed-package-1.json and Framed checks the result against it before delivering it: payload for a record or list, file_ref for a file. A result that does not fit is not final. It is a draft, and issues says what is wrong. A client can rely on the shape of any result with validated: true, and on issues: [] as "this fits".

TypeSchema describesChecked beyond the schema
framed:document/<type>file_refa document with no text in it is empty_document
framed:uploadfile_ref
framed:research_tablepayload: columns, rows (the cells of a row are open)
framed:insight/<type>payload: title, content_mda finding cut off at the length limit is truncated
framed:step_conclusionpayload
framed:approval/<kind>payload: the card's own, open by design

Playbooks may declare their own labels. A plan step may carry schema_ref (any string ≤ 200, e.g. nordhaven:permit_rows/2). When it does, that step's results carry it instead of the Framed default, and the process lists it under schema_refs before anything runs. A ref that is not one of Framed's types is the workspace's own label: Framed passes it through and says so with validated: false. (A ref that is one of Framed's types, set on a step whose result is not shaped like it, is checked like any other.) It rides through normalizeSteps, freshSteps and stepTemplates, so it survives saving the plan, starting a run and a test run.

What a client should not assume. The order inside each kind is the order the rows came back in; sort on produced_at when it matters. A partial read (while the run is going) is honest about that: settled: false, and the list grows on the next poll. A result whose row was deleted in Framed disappears from the list and answers 404 by id.

An agent run's results. The finding and the document an agent kept are built by the same code as a process run's, so they carry the same kinds and the same default schema_refs (framed:insight/<type>, framed:document/<type>, framed:research_table). They are read on GET /platform/agent-runs/:id, with run_id the agent run's id and no process and no step. See Agent runs.


12. Human approvals in depth

A human-approval step is where Framed stops for a person. Three places one can come from, and the Platform API treats them alike:

  1. A gate inside a run (kind: run_gate, action.type: resume_run). The plan said "a person checks this here". The run parks with blockers[0].kind = 'approval'. Approve: the gate is marked done and the run continues. Reject: a decline is a path, not a cancel (12 Oct 2026). The steps the plan put on the declined path run; when there are none the run ends done with outcome: "declined", the steps after the gate read skipped: true, and nothing is delivered.
  2. A start the process wants approved first (kind: connect_run). The card names the process, the client and the reason; the client's input rides on it. Approve: the run starts, the card carries run_id. Reject: nothing runs and Framed writes a rule ("do not start X because a client asked") so the same request is not proposed again tomorrow.
  3. Work an agent finished that waits behind one approval (queue: ready, e.g. an invoice check with a staged booking). Approve: the connector action runs. Reject: the standing rule is written, nothing is sent.

Whatever the kind, the decision is the To review panel's decision, made by a person Framed can name. An assistant over MCP cannot make it (see section 15). A decision can carry answers and, on a message draft, an edit; both are checked against the card and recorded with the decision (see Decision requests and Message drafts).

Idempotency. A card takes one decision. The second answers 409 already_decided with the card as it stands, so a client that retried a timed-out request learns what happened rather than failing.

What to poll after deciding. GET /platform/approvals/:id until execution.status is succeeded or failed. For a gate, the run itself is the thing to poll (blockers empties, status moves on). For an approved start, approval.run_id appears once the executor started it.

What a person's own session can change on a card. The decision route above records resolved_by itself, as the person behind the key. A signed-in member of the account who writes to the card directly (the app does) is held to what the app edits: while a card is pending they can change the draft text of a writing card, choose an object or receiver on a judged document, hand a mail task on and record the decision card's answers, and nothing else. kind, the title, the summary, what the action does and every other part of the payload stay as the producer wrote them, a decided card is frozen whole, and resolved_by can only be the member's own id, once. The list is src/lib/approval-member-edits.ts; the rule is the database's, so it holds for every client of the table.

Decision requests

A question waiting for a person is a framed:decision_request (version 1, framed-package/1): the same card the app draws, as data. GET /platform/approvals/:id carries it as approval.package.

{
  "format": "framed-package/1",
  "type": "framed:decision_request",
  "version": "1",
  "status": "awaiting_approval",
  "title": "Invoice 2026-114 from Hanzeman Installatie",
  "validated": true,
  "issues": [],
  "content": {
    "question": "Invoice 2026-114 from Hanzeman Installatie",
    "summary": "Booking waits for the object.",
    "card_kind": "invoice_check",
    "effect": [],
    "questions": [
      {
        "id": "object", "kind": "single", "prompt": "Which object is this invoice for?", "label": "Object", "required": false,
        "options": [
          { "id": "R-1023", "label": "R-1023", "detail": "Keizersgracht 12" },
          { "id": "R-2001", "label": "R-2001", "detail": "Prinsengracht 3", "disabled": "Sold per 2025-12-01" },
          { "id": "R-3300", "label": "R-3300", "detail": "Herengracht 9", "recommended": true }
        ],
        "other": "Object reference or address"
      },
      { "id": "receiving_party", "kind": "text", "prompt": "Which organization is this invoice addressed to?", "required": false }
    ],
    "outcomes": ["approve", "decline"],
    "decidable": true,
    "not_decidable_because": null,
    "decided": null
  },
  "provenance": { "run_id": "run-001", "produced_at": "2026-09-16T09:00:00.000Z", "…": "…" },
  "actions": []
}
  • status is awaiting_approval while it waits and final once decided.
  • questions are what the card asks before the decision, in the order it asks them: the producer's own, or, for a judged invoice, which object it is for (the agent's pick recommended, a sold object disabled with the reason) and who it is addressed to. They are the card's own, not a second source: a parity test holds this reading to the app's. kind is single, multi or text. required means an approval needs the answer; a decline never does. other says a choice also takes a free answer. max_length appears when a text answer may be longer than the 240 characters it is by default.
  • decidable says whether this client may decide it now, and not_decidable_because says why not in a sentence: already decided, a notice, a real send (decided in the app), or a message draft without the mail grant.
  • decided appears once it is decided: outcome (approved, declined, closed), who (by), when, the reason, and the answers as given (question_id, question, answer in words, option_ids, other, text, skipped).

To answer, post the answers with the decision:

POST /platform/approvals/apr-014/decision
{
  "decision": "approve",
  "reason": "Checked against the contract.",
  "answers": [
    { "question_id": "object", "option_ids": ["R-1023"] },
    { "question_id": "receiving_party", "text": "Stichting Vastgoed Noord" }
  ]
}

An answer is { question_id, option_ids?, other?, text?, skipped? }: a choice takes option_ids (one for single) or, where the question allows it, other; a text question takes text. The answers are checked against the questions before anything is written (every code is in the table above). The record lands under payload.decision in the same write that decides the card, with who decided and through what, and what the answers fill in is filled in: a chosen object becomes the invoice's object_ref and object_address, a named receiver its receiving_party, and their missing marks are cleared. A decline records the answers too if any were sent, and fills in nothing. Nothing creates a finding: a decision lives on the card it decided.

Over Connect the same card is read as typed on framed_fetch approval:<id>, read only (decidable: false: an assistant reads, the person decides).

Message drafts

A mail draft waiting for a person is a framed:message_draft (version 1): the message with its recipients, subject, body and attachments as references, where approving puts it, and what came of it. A client can show it to the person it is for, who approves it, edits it and approves it, or declines it.

{
  "format": "framed-package/1",
  "type": "framed:message_draft",
  "version": "1",
  "status": "awaiting_approval",
  "title": "Two permits expire in October",
  "validated": true,
  "issues": [],
  "content": {
    "channel": "gmail",
    "effect": "creates_draft",
    "from": { "address": null, "mailbox": "Ineke (Gmail)", "connection_id": "conn-gmail-1" },
    "to": [{ "address": "bram@buyer.example.test", "name": "Bram de Vries" }],
    "cc": [],
    "subject": "Two permits expire in October",
    "body": "Hello Bram,\n\nNH-2211 and NH-2218 expire in early October.",
    "body_format": "text",
    "attachments": [{ "ref": "document:doc-7", "name": "permit-status.md", "media_type": "text/markdown" }],
    "editable": true,
    "decidable": true,
    "not_decidable_because": null,
    "decided": null
  },
  "provenance": { "…": "…" },
  "actions": []
}
  • Approving a message draft makes a draft in the approver's own mailbox, on the connection the card names (effect: "creates_draft"). It is never sent from here: whoever opens the draft sends it. That is the approval it has always had in Framed, and it stays the one that decides a write through a connected app.
  • A real send is not a message draft. A send from the workspace's own mail account (mail_send, mail_campaign) is bound by the executor to a hash of the exact content the person saw, so it is decided in the app. Over the API it is a framed:decision_request that is not decidable (not_decidable_because says so), shown without its address or its words.
  • edit takes a subject and a body and nothing else: who it goes to and from which mailbox is what was proposed. A client that wants that changed declines it and asks for a new proposal. The words are written together with the decision, in one update, so what the person approved is what is made. The card keeps the original wording (taste_original_subject, taste_original_body) the way an edit in the app does, and decided.edited says it was edited.
  • Attachments are references into Framed's own store (document:<id>, upload:<id>), never a web address. A card that carries none shows [], and an edit cannot add one: the draft Framed makes in the mailbox carries none yet.
  • The mail grant. Deciding a message needs propose_mail, the grant that lets a person propose one, on top of propose_run. Without it the message is read-only (decidable: false) and a decision is 403 access_policy.
  • Whole or declined. A draft with nobody to send to, no subject or no words is shown with issues and refuses an approval (409 incomplete_draft). A decline is always possible.
  • What a person sees. The message as written, address included. A placeholder from before 14 Oct 2026 is never written back: an edit that holds one is refused (hidden_value).

13. Polling

Runs and approvals on this surface are poll-based in phase 1. A Developer API job (/jobs) started with a webhook_url is told more than the queued start: it is told when a step of the run behind it ends, and when the job itself ends — see Job status webhooks (Developer API).

  • Poll GET /platform/runs/:id every 15–30 seconds while settled is false. A run that does deep research or lead work takes minutes to an hour.
  • When blockers names an approval, stop polling the run and put the decision in front of a person, or decide it. The run does not move on its own.
  • To watch a workspace rather than one run, use the lists with updated_after (below): GET /platform/runs?status=awaiting_input,running and GET /platform/approvals?status=open.
  • A signed file link is good for 15 minutes. Do not store it; store the result id and re-fetch when a person opens it.

Lists as a feed. GET /platform/processes, /runs, /approvals and /runs/:id/results take updated_after (on the row's updated_at; for results on produced_at). With it the list is a feed that loses nothing:

  • Rows at or after updated_after (>=), oldest first, ties by id, limit per page.
  • The answer adds next_updated_after (the last row's time; your own updated_after when the page is empty) and more (true when rows may follow). Send next_updated_after back as updated_after.
  • Rows at the cut-off instant come again, so a row that shares a timestamp with the end of a page is never lost. De-duplicate by id (by id and updated_at to also see a row's later changes).
  • A page never ends inside a millisecond. When the last rows of a page changed in the same millisecond as the rows after them (a bulk update stamps every row it touches with one time), the page runs past limit to the last row of that millisecond, and next_updated_after is that millisecond plus one, so those rows do not come again. Only a millisecond with more than 1,000 rows is still cut; next_updated_after is then the value you sent.
  • Results are served whole: a page ends at the end of a produced_at (so it can hold more than limit), and next_updated_after is that produced_at plus one millisecond, so nothing comes twice.
  • An updated_after that is not an ISO 8601 timestamp is 400 invalid_input (it used to be ignored).
  • Without updated_after nothing changes: newest first, no more.
// Poll approvals as a feed. `seen` holds ids already handled.
let after = loadWatermark() ?? '1970-01-01T00:00:00Z'   // persist it between runs
const seen = new Set()
for (;;) {
  const url = `${BASE}/platform/approvals?workspace_id=${WS}&status=all&limit=100&updated_after=${encodeURIComponent(after)}`
  const page = await (await fetch(url, { headers: { Authorization: `Bearer ${TOKEN}` } })).json()
  for (const a of page.approvals) {
    // a decided card is updated again, so key on id + updated_at to see changes
    const key = `${a.id}@${a.updated_at}`
    if (!seen.has(key)) { seen.add(key); handle(a) }
  }
  after = page.next_updated_after
  saveWatermark(after)
  if (!page.more) { await sleep(30_000) }   // caught up: wait, then poll again
}

A run that goes quiet. A background run is never left hanging. A process run where a long step (research, drafts, a document, a walkthrough) shows no sign of life for 2 hours (setting RUN_WATCHDOG_MINUTES) is closed once with what was ready: it ends done with the steps it skipped saying why, or error with the reason when nothing was ready; a run waiting on a person or an outside event is never closed this way. A Developer API agent job (kind: agent_run) that stays queued/running for 30 minutes (setting JOB_WATCHDOG_MINUTES) becomes failed, and GET /jobs/:id shows result.error and result.watchdog: { reason, stale_minutes, closed_at }. This 30-minute rule is for Developer API jobs only: the agent run behind such a job is closed with it, but a scheduled, in-app or deep-analysis agent run is never closed by it, however long it takes. A job run also stops repeating itself: the third identical tool call is not executed, and a step makes at most 10 tool calls (60 per job). No new status values.


14. Errors and reason codes

Every refusal, on this API and on the Developer API (/api/jobs, /api/memory, and the rest), has one shape:

{ "ok": false, "error": "No such run.", "code": "no_such_run", "reason": "no_such_run" }
FieldForRule
errora personOne sentence. Its wording can change; never switch on it.
codea programOn every error body, always snake_case. The same word on both APIs.
reasona programThe finer class, on the routes that have one. Where there is one, code is the same word. Kept exactly as before.

Switch on code. It is read in this order: a code the route names itself, else its reason, else the error sentence as a slug when that is a short fixed sentence (Missing API key gives missing_api_key), else the word for the HTTP status: invalid_request (400), unauthorized (401), payment_required (402), forbidden (403), not_found (404), method_not_allowed (405), conflict (409), payload_too_large (413), rate_limited (429), internal_error (500), bad_gateway (502), service_unavailable (503). The codes in the tables below are stable inside a version of this API. A refusal that is in no table carries a status word or a slug, so treat it as a class and read the HTTP status with it.

HTTPcodeMeaning
400invalid_inputa required parameter is missing or malformed, including a start input that does not fit: not an object, over 8 000 characters, files that is not a list of references, from_result that is not a result id
400invalid_decisionnot approve/decline/reject, a decline without a reason or a decline_reason, a decline_reason outside the set, or one sent with an approval
400the answer and edit codesinvalid_answers, unknown_question, unknown_option, answer_required, hidden_value, field_not_editable, ...: the full table is under the decision route; issues names each one
400unknown_transitionnot continue/cancel; allowed_transitions says what is
401missing_api_key, invalid_api_key, invalid_sessionno credential, a key Framed does not know, a session that has ended. Every 401 carries WWW-Authenticate: Bearer realm="Framed API", with error="invalid_token" when a credential was sent and refused
403workspace_out_of_reachthis key or person cannot open that workspace
403access_policythe person lacks the grant; grant names it, where says Settings, Access
403grant_requiredthe same, when an administrator could give the grant: status: auth_required, missing_grants, grant_request (id, approval_url, expires_at), retry.same_request. Send the same request again once it is approved
403access_deniedan administrator declined the request: status: denied, retry.same_request: false. An answer, not a failure
403grant_missinga missing grant that could not become a request (nobody to name it for); ask an administrator under Settings, Access
403not_on_this_connectionthe route is not on this key's allowlist
403no_personnobody stands behind this key; it cannot run or decide
403not_task_ownera decision on a browser task's card by someone other than the person who started the task
403scope_requireda key without act_as_issuer asked to start, steer or decide; the body names the scope
403delegation_requireda registered client proved who it is and carries no delegation, so it may only call /health and /whoami
401delegation_invalid, delegation_expired, delegation_revokedthe delegation next to a client's assertion is not valid, ran out, or was withdrawn by the person or an admin
403refusedon a start: v2-process-run checked the person's reach and grant again and said no; error says why
403file_token_invalid, file_token_expireda signed file link
404no_such_grant_requestnot a request of this client, or not there
404unknown_routeno such platform route
404no_such_process, no_such_run, no_such_agent_run, no_such_result, no_such_approval, no_such_file, no_such_recordnot there, or in a workspace, space or channel this person cannot open. An id of a workspace the key cannot reach answers exactly as an id that exists nowhere, so an id is never a probe
409not_runnablethe process has no plan Framed can run
409already_runningone run at a time per process; run_id says which
409transition_not_allowedthe run's state does not take it; allowed_transitions, and approval_id when parked on one
409transition_failedthe runner refused
409already_decided, not_a_decision
409incomplete_drafta message draft that is not whole cannot be approved; issues says what is missing
409action_not_offeredthis result lists no action to propose
409no_mailbox, ambiguous_mailbox, mailbox_not_found, mailbox_not_activethe mailbox a proposed draft would be made in; candidates lists the ones to choose from
413payload_too_largerequest body over 1 MB
429rate_limiteda reseller key's limit (new workspaces per hour, jobs at once, EUR per day); limit, max, used, retry_after_seconds, the Retry-After header and the X-RateLimit-* headers say which and when (see Operations)
502start_faileda process that asks a person first: the approval card could not be queued
502failedon a start: the runner could not start it, or the run could not be read back; error says what it said
502decision_failedthe decision could not be recorded; error says what it said
502upstream_unavailablethe public host could not reach Framed's API
502proposal_faileda proposed action could not be queued as an approval card; error says what it said

Codes the Developer API names itself, where the money, a limit or the body needs one:

HTTPcodeMeaning
400invalid_plana plan job that cannot run; error names the step and its index
400max_cost_above_ceilingmax_cost_eur is over the reseller's ceiling; ceiling_eur says what it is
400webhook_url_blocked, invalid_webhook_urla webhook_url that is not a public https address
403credit_limit_reachedPOST /jobs on an account invoiced monthly whose spend this calendar month (UTC) has reached its monthly credit limit. Nothing is started; the limit blocks no other route
403limit_reachedPOST /workspaces: the account's counted workspaces are at the limit, or its subscription is not active
409blockedDELETE /workspaces/:id on a workspace with legacy knowledge audit entries; Framed support can remove it

15. The same nouns over MCP

Framed Connect (https://www.framed.dev/mcp) speaks the same four nouns. A client that uses both sees one workspace with one set of ids.

NounPlatform API (HTTP)Framed Connect (MCP)
processGET /platform/processes, /processes/:idframed_list of:"processes", framed_fetch process:<id> (latest_record on both)
recordGET /platform/processes/:id/latest-recordframed_fetch process:<id> → latest_record (full JSON). No separate record: ref yet.
playbookplaybook on a process (the method a process may link via playbook_slug)framed_list of:"playbooks", framed_fetch playbook:<slug>, framed_propose_playbook (create or update; always waits for human approval; nothing is written on the call)
startPOST /platform/processes/:id/runsframed_run
runGET /platform/runs, /runs/:idframed_list of:"runs", framed_fetch run:<id>
agent runGET /platform/agent-runs, /agent-runs/:idframed_list of:"runs" and framed_fetch run:<id> list and open an agent's run beside a process's, both kinds (a custom agent's, and the scheduler's firing of a catalog or desk agent), under the reach rule below
steerPOST /platform/runs/:id/transitionsnot exposed: a parked run's question is put to the user, a person answers in Framed
resultGET /platform/runs/:id/results, /results/:idframed_fetch run:<id> → produced refs, then framed_fetch document: / insight: / approval:
filefile_ref.url (signed link)framed_fetch document:<id> (text), format:"html"
approvalGET /platform/approvals, /approvals/:idframed_list of:"approvals", framed_fetch approval:<id> (typed: the card as framed:decision_request or framed:message_draft, read only)
decidePOST /platform/approvals/:id/decision (with answers, and edit on a message draft)not exposed, by design
stop a follow-upPOST /platform/approvals/:id/follow-upnot exposed: framed_fetch approval:<id> reads the card, a person stops a follow-up in their review app
propose a message about a resultPOST /platform/results/:id/actionsframed_draft_mail (the same card; the HTTP route also carries the link back to the result)

A run.id here is the run:<id> ref a host opens over MCP. A result.id is <run id>.<slot>.<ref>, where <ref> is the document: / insight: / approval: id MCP prints. Run statuses are Framed's own words in both; the HTTP surface adds settled and blockers so a client does not have to know which status means "wait" and which means "a person has to act".

Why deciding differs. Over MCP the caller is an assistant, and the person is in the room only through their host; letting the host approve what the host proposed removes the gate. Over HTTP the caller is a system a person operates, and the key names who stands behind it. So the HTTP surface decides, as that person, and MCP reads. The process's Who starts it switch (assistant_start) is read by both, so a process is either startable by a client or it is not, in one place.

Playbook vs process. A playbook is the prescribed method (steps, framework, output structure) stored on the workspace blueprint. A process is the runnable row (v2_processes) that may link that method with playbook_slug. Connect lists and fetches both; framed_run starts a process (or schedules a playbook that has no process row yet). framed_propose_playbook is how a host offers a create or an update of the method itself. Production workspaces always queue that for human approval under Tasks; approval applies the approved snapshot (not a merge). An update syncs name, goal and steps on an existing process with that slug; a create does not invent a process row.


16. Security model

  • One key format, one workspace gate. The Platform API is mounted inside the Developer API's function; the key lookup, the workspace pin/scope check and the account reach are the same code every other route uses.
  • A person behind every write. Reach and grants are the consenting user's, the delegating person's or the issuer's, resolved on every call; a start and a decision are recorded as theirs, and a raw key may do that only with act_as_issuer. Nobody behind the key means read-only.
  • No second runtime. A start and a resume call v2-process-run through a door that only the service role opens and that re-proves the named person's reach and propose_run grant itself. A decision hands the card to v2-approval-execute through a matching door that re-checks reach against the card's own workspace. Neither door trusts the caller about who it acts for.
  • Transitions are a rule, not a menu. continue past a human approval is refused in the pure module, before any runner is called.
  • Spaces. A restricted space is enforced on every list (dropped and counted) and every single read (404, never "not allowed", so a locked space's existence is not disclosed).
  • Agent runs are read under the same reach: the desk of what the run kept and the channel Catch up files it in (the worker bound to the agent, the desk, then the agent's own channel). A run outside them is left out and counted, and answers 404. An agent's definition (agent_def) is never returned.
  • Payload hygiene. Credential-shaped keys are stripped from approval payloads and execution results at every depth; text is clipped; a list is capped.
  • A card is not rewritten under the person deciding it. A member's own session can edit a pending card only where the app does (a draft's text, an object choice, a task's assignee, the decision card's answers), never what the card does, and resolved_by is only ever the caller. The service role (the executor, the producers, the decision route) is the only writer of the rest.
  • File links are HMAC-signed with a secret only the function holds, bound to one file, expire in 15 minutes, and are served with no-store.
  • Supplier names never appear on this surface.

Cost cap per workspace or job (partner API)

create_workspace and start_job accept an optional max_cost_eur (a number, euros of wallet credits, rounded to cents, > 0). Without it: start_job uses the workspace's cap, else the account's default; create_workspace uses the account's default. The default and a ceiling are set per reseller account (accounts under a reseller use that reseller's settings). Accounts under a reseller get a default of EUR 5 and a ceiling of EUR 20 per job unless that reseller has its own values; accounts without a reseller have no default and no ceiling. A value above the ceiling is refused with 400, code: "max_cost_above_ceiling" and ceiling_eur; an inherited cap above the ceiling is lowered to it. The cap is returned on the create_workspace / start_job responses and as max_cost_eur on get_job (null = no cap).

A run keeps inside its cap — the job's, else the workspace's — while it runs. At 80% of the cap it gathers nothing new and finishes with what it has; at the cap it runs nothing more and still delivers. Either way the run ends done (job succeeded): get_job then carries budget_stop: { phase: "wrap_up" | "stopped", reason, cap_eur, spent_eur, at }, null when the run never got near its cap. The run checks its logged spend before each step and each paid search. A long step (research, drafting rows, writing a document, a walkthrough) is only counted once it has finished, so while a cap is set the run starts one long step at a time and starts no other paid step until that one has finished. A step that is already running when the cap is reached is not stopped. What is guaranteed: the run ends over its cap by at most the cost of the one step that was in flight when the cap was reached. The cap is not a hard ceiling on the wallet. No new status values.

A custom agent job counts its model calls toward its cap at the standard credit rate, the same rate the wallet is debited at. Such a run checks its cap before each paid search, and its model calls come after its searches. So they count in cost and in spent_eur, and the model calls are held at the cap too (see below).

Agent jobs and the cap. An agent job (agent_slug) is one piece of work, so it has no later step to skip; the cap is checked before each paid call instead. Both kinds of agent point the job at a run (result.run_id) before they spend anything, so get_job carries cost while the job runs, and the spend counts in the key's EUR per day. Before each model call the run reads what it has spent. At the cap the call does not go ahead: the job ends failed, result.error says why, get_job carries budget_stop (phase stopped), the job.finished webhook says budget_stop, and a start that was waiting for the answer gets 402 with reason: "budget_stop" and the job_id. Near the cap (80%) the model call still goes ahead: it turns what the searches found into the answer. A custom agent checks before each paid search and before its model calls (the independent reviewer is skipped at the cap, which never fails a run); a catalog agent checks once, between its web search and its model call. A model call counts once it has finished, so a run can end over its cap by the cost of that one call. The catalog agents that run on their own engine (the ads partner, the premium data partners and a few more) are counted in cost and in the key's EUR per day, but the cap does not hold them back: they have no check yet.

One-off plan job (partner API)

start_job also takes a plan instead of an agent_slug: a small stepwise plan the caller hands over, run ONCE with no process and no schedule behind it. Job kind plan_run. plan.title (at most 200 characters) and plan.input (a JSON object of at most 8000 characters, kept as the run's input) are optional; plan.steps holds 1 to 8 steps in the shape a process plan uses.

{
  "workspace_id": "ws_123",
  "plan": {
    "title": "Suppliers of recycled packaging in NL",
    "steps": [
      { "key": "find", "action": { "kind": "deep_research",
          "query": "Suppliers of recycled packaging in the Netherlands", "count": 10 } },
      { "key": "summary", "action": { "kind": "synthesize",
          "prompt": "Summarize what was found.", "from": ["find"] } },
      { "key": "report", "action": { "kind": "studio_artifact", "type": "memo",
          "title": "Supplier report", "prompt": "Write a short report." } }
    ],
    "output": { "format": "markdown" }
  },
  "max_cost_eur": 5
}

Allowed step kinds: deep_research, row_drafts, fit_check, synthesize, verify, classify, studio_artifact, keyword_research, keyword_cluster, company_research_ingest, company_research_structure. Everything else (tool_call, read_objects, walkthrough, approval, wait_for_event, signal_harvest, promote_signals, …) is refused: a plan job never reads the workspace's tools or records, opens no browser session, and waits on nobody. Every step runs on_fail: flag_and_continue regardless of what was sent — a failed check never parks the run; the problem lands in the report instead. A bad plan is 400, code: "invalid_plan", naming the step and its index. An account that is invoiced monthly and has reached its monthly credit limit gets 403, code: "credit_limit_reached", exactly as for an agent job; no job and no run are created.

A plan takes the same typed inputs as a run, next to plan.input: plan.files (references, ["document:<id>", "upload:<id>"]) and plan.from_result (a link back to an earlier result). They are checked and looked up as the caller before the job and the run are made: a bad one is 400, code: "invalid_input" with issues (paths start with plan.), a file that is not there for the caller 404 no_such_file, a result that is not theirs to read 404 no_such_result, one of another workspace 409 result_in_other_workspace. The run keeps them as it does for a process run.

A valid start answers 202 with job_id, status: "running", run_id and max_cost_eur. The cost cap and budget stop apply exactly as for an agent job: the run checks before each step, and get_job carries cost and budget_stop.

get_job returns report, null until the run is over: the common fields (format, title, run_id, run_status, completed_at) plus either steps / documents / tables (format json) or one markdown body (format markdown, the default). Status follows the run: running until it ends, then succeeded or failed; a run waiting on a question stays running with result.question. The webhook fires on start (running) and on a failed start only — poll get_job for the end. No new status values.

A job whose steps did not all pass is failed, not succeeded. A plan job never parks, so a step whose check fails is flagged and the plan carries on. The run then ends done. The job does not say succeeded for that: it is failed, with result.partial: true, result.steps_failed, result.step_problems ({ key, title, status, problems }, at most 8) and one sentence in result.error. The report is still there and holds what every step produced, with the steps that did not pass marked (Status: done, but 1 of 3 steps did not pass their checks, and (did not pass its checks) on the step). A job that stopped at its cost cap is unchanged: it ends succeeded and budget_stop says why.

Progress per step (partner API)

get_job also carries progress: a live, per-step read of the stepwise run behind the job — today a one-off plan job (plan_run), and any later job kind whose result.run_id points at a stepwise run. null when the job has no stepwise run behind it: an approval job, a plan job that has not started, or an agent job (an agent run is one piece of work with no steps; its cost and status already say what there is to say).

{
  "run_id": "run_123",
  "run_status": "error",
  "total": 3,
  "done": 1,
  "failed": 1,
  "current": null,
  "steps": [
    {
      "step": "find",
      "title": "Find suppliers",
      "status": "done",
      "started_at": "2026-10-03T09:00:00Z",
      "ended_at": "2026-10-03T09:04:00Z",
      "summary": "Found 12 suppliers in the Netherlands.",
      "cost_eur": 0.0552,
      "cost_so_far_eur": 0.0552
    },
    {
      "step": "check",
      "title": "Check fit",
      "status": "failed",
      "started_at": "2026-10-03T09:04:00Z",
      "ended_at": "2026-10-03T09:05:00Z",
      "summary": "Checked 10 rows.",
      "problems": ["Missing a required field"],
      "cost_eur": 0,
      "cost_so_far_eur": 0.0552
    },
    {
      "step": "report",
      "title": "Write the report",
      "status": "pending",
      "started_at": null,
      "ended_at": null,
      "summary": null,
      "cost_eur": null,
      "cost_so_far_eur": null
    }
  ]
}

total / done / failed count the run's steps (done includes flagged); current is the key of the step running now, else null. A step is pending, running, done, flagged or failed; started_at / ended_at are null until the step has them. summary is a short line of what the step found, at most 280 characters, and problems only appears on a flagged or failed step. cost_eur is that step's own model/tool work, in wallet EUR at the same rate as the job-level cost; cost_so_far_eur is the running total in plan order up to and including that step. The job-level cost stays the billing figure — per-step costs are not expected to add up to it exactly, since some work (and a step whose trace dropped calls, marked cost_partial: true) happens outside any one step. There is no streaming: poll get_job to show progress live. Every other get_job field is unchanged.

Idempotency-Key (partner API)

POST /jobs (start_job), POST /workspaces (create_workspace) and POST /platform/processes/:id/runs (the Platform run start) take an optional Idempotency-Key header, or idempotency_key in the body, so a retry after a timeout does not start a second job, create a second workspace, start a second run or queue a second approval card. Without a key nothing changes.

  • The same key, from the same API key, for the same call, within 24 hours, returns the original response (the same job_id, the same workspace, the same status code) with the header Idempotent-Replay: true. It is the response as first sent: a job's status is not refreshed, GET /jobs/:id is.
  • The same key with a different body is 422, code: "idempotency_key_reused". The body is everything but the key itself, compared whatever the key order.
  • The same key while the first request is still running is 409, code: "idempotency_key_in_progress", with Retry-After: 2. Send it again.
  • A request that failed (any status but 2xx) gives its key back: the same key can try again. A key is up to 255 characters of plain text; anything else is 400, code: "idempotency_key_invalid". If Framed cannot check a key at that moment the call is 503, code: "idempotency_unavailable" and nothing is started.
  • A replay is not counted against a key's limits (workspaces per hour, jobs at once). A kept response goes when its workspace is forgotten or deleted.
  • On the Platform run start, "the same request" is the process (it is in the path), the input and the reason. The key is looked up only for a caller who may start that process: a caller the route refuses (no such process, no access, a locked space) gets the route's own answer and nothing is kept. A start that queued an approval is replayed as that same card and job (status: waiting_for_approval), so a retry never adds a second card. A replay is the response as first sent: the run's status in it is not refreshed, follow the run from its link.

Deploy order: migration 20261005201500 first, then 20261006144513 (it adds the Platform run start to what the table accepts; a keyed run start is 503 until it has run), then v2-partner-api, then the frontend, whose proxy forwards the header and hands Idempotent-Replay back. Calls without a key are unaffected by any of it.

Not yet: the MCP tools. None of the Connect (MCP) tools takes a key. The ones where a retry after a timeout can make a duplicate, in the order they should get one: framed_run (a second run or a second approval card), framed_run_worker (a second run), framed_add_worker (a second worker), framed_draft_mail (a second draft card), framed_remember (a second memory proposal), framed_propose_playbook (a second proposal) and framed_tool when the tool it calls writes. The rest set a value (framed_topic, framed_steer_worker, framed_knowledge, framed_about_me, framed_set_channel_member), decide a card that takes one decision (framed_approve) or already say they are idempotent (framed_save_artifact), so a retry is harmless. A key on a tool would be an optional idempotency_key argument over the same table and the same three functions, one operation name per tool.


17. Where it lives in the code

PieceWhere
Rules: routing, shapes, transition table, result mapping, decision rules, file tokenssupabase/functions/_shared/platform-api.ts (pure: no env, no network, no database)
Tests, including a golden path over the fixturesupabase/functions/_shared/platform-api.test.ts; agent runs in platform-agent-runs.test.ts (handler over the fixture, the Supabase store over a fake of its three tables)
Store on Supabase (every write through the app's own paths)supabase/functions/_shared/platform-store.ts
Fixture store (tests + preview)supabase/functions/_shared/platform-api-fixture.ts
Dispatch, auth, gates, file servingsupabase/functions/v2-partner-api/index.ts, handlePlatform
Ops on the key allowlist / grant map_shared/partner-api.ts CONNECT_KEY_OPS, _shared/connect-access.ts OP_REQUIRED_GRANT (pinned by test)
Public proxy rootsrc/lib/api-partner-rewrite.ts (/platform), src/lib/api-public-proxy.ts (Content-Disposition)
Runner doorsupabase/functions/v2-process-run/index.ts (start, resume, input)
Executor doorsupabase/functions/v2-approval-execute/index.ts (actorUserId, getActor())
What a member's session may edit on a cardsrc/lib/approval-member-edits.ts (the list), the trigger in migration 20261006143543_v2_approvals_freeze_payload_by_kind.sql (tests: scripts/pg-test/approvals-payload-freeze.test.ts, src/lib/__tests__/approval-member-edits.test.ts)
schema_ref on a plan step_shared/agent-runs.ts (AgentStep.schemaRef), _shared/playbook-runs.ts (freshSteps), _shared/process-plan.ts (stepTemplates)
Idempotency-Key on start_job / create_workspace_shared/idempotency.ts (tests: idempotency.test.ts), the claim protocol in migration 20261005201500_v2_partner_idempotency.sql (tests: scripts/pg-test/partner-idempotency.test.ts); the proxy forwards the header and hands Idempotent-Replay back (src/lib/api-public-proxy.ts)
Error code on every refusalsupabase/functions/_shared/api-errors.ts, applied in json() of v2-partner-api and at the exit of handlePlatformRoute
Idempotency-Key on the Platform run start_shared/platform-idempotency.ts (tests: platform-idempotency.test.ts), called from handlePlatform in v2-partner-api/index.ts; the operation is added to the table by migration 20261006144513_v2_partner_idempotency_platform_start.sql
Receipts: claims, canonical JSON, ES256 signing, verification, the key set_shared/receipts.ts (tests: receipts.test.ts); which calls act and how the receipt rides the answer: _shared/partner-receipts.ts, _shared/partner-receipts-edge.ts (receiptForCall in Deno.serve, before the idempotency settle and before the host's privacy pass); keys from FRAMED_RECEIPT_SIGNING_KEY and FRAMED_RECEIPT_KID (and _2), see docs/env-manifest.md; the receipt id is on the audit row (indexes in migration 20261006203702_v2_receipt_audit_index.sql)
Offline verifierscripts/verify-receipt.mjs (tests: scripts/verify-receipt.test.ts, which also holds it to receipts.ts)
The key set on the public host/.well-known/framed-jwks.json through src/lib/api-partner-rewrite.ts (rewriteReceiptKeysPath); answered by v2-partner-api before routing (isReceiptKeysRequest)
Step-up: rules, the request and its card, the client's grant, the poll_shared/grant-stepup.ts (rules, words, bodies), _shared/grant-stepup-store.ts (v2_grant_requests, migration 20261006203639_v2_grant_requests.sql), _shared/grant-stepup-edge.ts (grantsForCall in grantsFor: scopes first, then widenForClient; never for a delegation; stepUpResponse at every grant refusal, pollGrantRequest), _shared/client-identity.ts (who a client is), _shared/grant-request-execute.ts (the decision, in v2-approval-execute); the Access page lists the open requests (src/components/channels/AccessRequests.tsx)
OpenAPIpublic/platform-openapi.yaml → https://www.framed.dev/platform-openapi.yaml
OpenAPI coverage (a ratchet: routes with no line in the file may only shrink)supabase/functions/_shared/openapi-coverage.test.ts
Next steps and asks: the steps, the request, the chat's message, v2-chat's stream as the ask's eventssupabase/functions/_shared/platform-ask.ts (pure; tests: platform-ask.test.ts), the routes and prepareAsk in platform-api.ts, the stream in v2-partner-api/index.ts (serveAsk; pinned by platform-ask-wiring.test.ts), the chat's origin in migration 20261012144707_v2_chat_thread_origin_ask.sql, the public host passing the stream on as it comes in scripts/serve-v2.mjs (pipeEventStream; tests: scripts/serve-event-stream.test.ts), isolation in the conformance suite (core/ask-isolation)
Chats and workers for a review app: the shapes, the parsers, the person's message with its cards, who may read a thread, a worker's state, the refs a run echoessupabase/functions/_shared/platform-chat.ts (pure; tests: platform-chat.test.ts), the routes, the reads and prepareChatTurn / prepareWorkerAct in platform-api.ts, the streams and the worker acts in v2-partner-api/index.ts (serveChatTurn, serveWorkerAct), the cards on a run's report in review-app-reports.ts (refs.donna)
Public docssrc/routes/marketing/docs.tsx → /docs#platform
Previewsrc/routes/dev/platform-api-preview.tsx → /dev/platform-api-preview

The store split is deliberate: handlePlatformRoute decides every status code, shape and rule over a PlatformStore; the Supabase store and the fixture store implement the same interface, so the tests and the preview prove the contract without a database, and the edge function adds only the reads and writes.


18. Operations

Deploy order. v2-process-run and v2-approval-execute first (the Platform API calls their internal doors; an old executor answers Approval not found or not accessible to the service bearer), then v2-partner-api, then the frontend (the /platform proxy root lives in src/lib/api-partner-rewrite.ts; until it is deployed the routes answer 404 on the public host and work on the function's own URL).

No new table in this version. GET …/latest-record wraps v2_stepwise_runs.state.extract. A v2_process_records write at the end of the run is the follow-up.

Environment. Nothing new. The file-link secret is derived from the function's service role key (platform-files:${SERVICE_KEY}); rotating that key invalidates outstanding links, which last 15 minutes anyway.

Audit. A start leaves created_by on the run; a decision leaves resolved_by, note and evidence.decided_via on the card. Platform calls do not yet write a v2_tool_calls row (the Connect audit keeps only the framed_* MCP tools; see On our roadmap).

Rate. A reseller key carries three abuse limits on the Developer API: at most 20 new workspaces per rolling hour (create_workspace), and 5 jobs queued or running at once and EUR 50 per day (Amsterdam day) of AI use by the runs its jobs started (both on start_job). Framed can set other values per key. Deleting a workspace does not reset what a key used: spend and open jobs are counted from a per-key ledger that outlives the workspace. Over a limit answers 429 rate_limited. Otherwise the 1 MB body cap applies and a list is capped at 100. An account's own (connect) key has no rate limit today, and no other call has one.

Rate limit headers. POST /workspaces and POST /jobs with a reseller key say where the key stands, on every successful answer and on the 429:

HeaderMeaning
X-RateLimit-Limitthe most the key may do in the window
X-RateLimit-Remainingwhat is left after this call; 0 on a 429
X-RateLimit-Resetwhen the window frees, in unix seconds
X-RateLimit-Resourcewhich limit: workspaces_per_hour, concurrent_jobs or eur_per_day
Retry-Aftera 429 only: seconds until the call may be tried again

A start answers for the tighter of its two limits. The EUR figures are euros with cents. A slot of concurrent_jobs has no clock, so its reset is a minute ahead, the same as its Retry-After. The figures are read just before the call: a guide for pacing, not a promise. The headers reach a browser client too (Access-Control-Expose-Headers).

Health. GET https://www.framed.dev/api/health is the Developer API's health check and covers this surface too (same function). Besides the documented ok, service, api_version, docs and base it reports status (ok, degraded, down), degraded, reasons (stable codes) and checks (database, the age of each cron tick, background tasks, config problems as codes). 200 unless the database cannot be read (503). No key, no workspace data. See docs/go-live-checks.md.

Job status webhooks (Developer API)

A job's webhook URL must be a public https address. A webhook_url on a request that names localhost, a private, loopback or link-local address (10/8, 172.16/12, 192.168/16, 169.254/16, ::1, fc00::/7 and the like, in any spelling, an IPv4 written inside IPv6 such as [::ffff:127.0.0.1] too; a trailing dot changes nothing) or a name that resolves to one is refused with 400, code: "webhook_url_blocked", before anything else on the request is looked at. The same check runs again, after DNS, before every delivery: a URL that fails it (a key's stored one too) is not called, and the event ends failed with blocked address. Redirects are not followed.

A Developer API job (/jobs) started with a webhook_url gets three kinds of event, all signed, retried and dead-lettered the same way. The first is the start ping (event: "job.status"), sent when the job starts; the other two follow as the run behind it goes on:

  • job.status (the start ping): where the job stood when it started (running, awaiting_approval, or failed when it never started). One per job. It has the fields it always had, plus event_id, occurred_at and get_job:

    {
      "event": "job.status",
      "api_version": "2026-08-21",
      "event_id": "JOB_ID:start",
      "job_id": "JOB_ID",
      "workspace_id": "WORKSPACE_ID",
      "kind": "plan_run",
      "status": "running",
      "occurred_at": "2026-10-03T19:30:00Z",
      "get_job": "https://www.framed.dev/api/jobs/JOB_ID"
    }
    
  • job.step — a step of the run finished done, flagged or failed. Only a job whose run has steps gets these (a one-off plan job); an agent job's run has no steps, so it gets job.finished only:

    {
      "event": "job.step",
      "api_version": "2026-08-21",
      "event_id": "JOB_ID:step:draft_memo:done",
      "job_id": "JOB_ID",
      "workspace_id": "WORKSPACE_ID",
      "kind": "plan_run",
      "status": "running",
      "occurred_at": "2026-10-03T19:40:00Z",
      "get_job": "https://www.framed.dev/api/jobs/JOB_ID",
      "step": { "key": "draft_memo", "title": "Draft the memo", "status": "done" }
    }
    
  • job.finished — the job ended, with why in reason: done, failed, rejected, budget_stop (the run stopped on its cost cap) or watchdog (the run was closed by the watchdog):

    {
      "event": "job.finished",
      "api_version": "2026-08-21",
      "event_id": "JOB_ID:finished",
      "job_id": "JOB_ID",
      "workspace_id": "WORKSPACE_ID",
      "kind": "agent_run",
      "status": "succeeded",
      "occurred_at": "2026-10-03T19:52:00Z",
      "get_job": "https://www.framed.dev/api/jobs/JOB_ID",
      "reason": "done"
    }
    

Headers. X-Framed-Event-Id, X-Framed-Event, X-Framed-Timestamp (unix seconds), and X-Framed-Job-Signature when the job started with an API key or Connect token. Events of one job arrive in order within a round; a retried event can arrive after a later one, so order by occurred_at.

The start ping used to be signed differently, as X-Framed-Signature: sha256=... (HMAC-SHA256 of the raw body, key = the API key), sent once and never retried. It now carries X-Framed-Job-Signature like every other event. Its first try also still carries X-Framed-Signature, so a receiver that checks the old header keeps working while it moves over; a retry carries only the job signature, because the API key is not stored. X-Framed-Signature will go in a later release, announced in the changelog first.

Verifying it. The job secret is hex(HMAC-SHA256(key = your API key or Connect token, message = job_id)); the signature is sha256= + hex(HMAC-SHA256(key = the job secret, message = "${timestamp}.${raw body}")). Reject a timestamp older than a few minutes (5 is a reasonable line) to close a replay window. A job started without an API key or Connect token (an OAuth Connect sign-in, or a signed-in session) is sent unsigned.

Delivery. The start ping is tried at once; the others are checked once a minute. A 2xx answer is a delivery; anything else retries after 1 min, 5 min, 30 min, 2 h, then 6 h: 6 tries in total, then it gives up. 410 stops retrying at once. A redirect is not followed and is not a delivery. At most once per event per job, but treat event_id as the dedupe key on your side too: a 2xx your server sent but we never saw still reads here as a retry.

A delivery that gives up is a dead letter: its row stays, marked failed with the last status and error, and Framed's ops channel is told (the address's host and the event, never the body). Framed can put it back for another round of six tries (replayDeadLetters, per job and per event); an event that was delivered is never sent again. There is no route for a client to replay its own yet: get_job always has the truth, so a client that missed an event can read the job.

Metadata only. A payload never carries a step's summary, extract or problems — call get_job (the URL is on every payload) for the detail.

The watch on a job's webhook ends after 7 days if the job never reaches a final event by then. Two new service-role-only tables carry it (v2_partner_job_hooks, v2_partner_job_webhooks), delivered by v2-turn-sweep alongside its other once-a-minute work. No new environment variables.


Donna's memory layer (Developer API)

Framed runs under the hood of Donna (28 Oct 2026): Donna is the desk, Framed keeps the memory. A Donna board is linked to one workspace and keeps a read-through cache of its core memory; the contract, both sides, is docs/framed-memory-layer.md in framed-desk. Code: _shared/donna-memory.ts, migration 20261028134936_v2_donna_memory_layer.sql.

  • GET /memory/about?workspace_id=…&subjects=…&include=core,deep,pending&query=…&k=…: core memory about the subjects in full (believed now, the head of each chain, a person's own only for that person), deep memory top-k by query (the newest without one) and memory proposals still waiting. A subject is entity:ent_…, card:GN-… or node:<key>; * is all of them. scope=team leaves out the caller's own rows even when a person stands behind the call (what Donna caches is the whole board's).
  • POST /memory/facts, POST /memory/facts/:memory_id, DELETE /memory/facts/:memory_id (body { workspace_id, source: "donna", agent, fact, source_ref, subject_ref? }; a delete takes the first three): Donna's direct write. Loek decided (28 Oct 2026) that a memory write from Donna takes effect at once, with no approval: this deliberately skips Framed's approval flow for Donna-sourced memory, and only for it (POST /context stays a proposal for every other caller). Open only on a workspace a Donna board is linked to (a subscription), for team memory, under the caller's reach and grants (propose_memory for a person's token), with the same credential redaction and Never remember as POST /context. A change is a new head that supersedes the fact; a delete forgets it (hidden, kept for the audit). Every write is on the record: a change on Knowledge with its Undo, and a line in the activity (donna_memory_write) naming the agent and source: donna. Code: _shared/donna-memory-write.ts.
  • Whose credential. Every call carries a person's Connect token, never a key Loek pastes. A board whose owner connected their own Framed account with OAuth is reached with that person's token. Every other board (free boards included) lives on Donna's own Framed account, which an admin of Donna connected once with the same OAuth, asking for framed:workspaces besides the default scope. Such a token may call /memory/about, the subscriptions and the direct write besides the Platform API (PLATFORM_TOKEN_PARTNER_OPS), and, with framed:workspaces, POST /workspaces.
  • framed:workspaces (WORKSPACES_SCOPE, connect-oauth.ts): a Connect token may create a workspace in its own account, the one thing a reseller key did here before. Only when asked for at consent (the consent page says so), only on a grant for the whole account (a grant for chosen workspaces drops it), and only while the person behind it is still an account admin (workspaceCreateRefusal, connect-grant.ts: scope_missing, token_pinned, not_account_admin, all 403). Then the same rules as every caller: the account's workspace limit (limit_reached), the cost cap, an Idempotency-Key. The person becomes the new workspace's member. whoami names the account (account.name) and the granted scope (connect_scope) for a Connect token. The token row keeps its scope (v2_connect_tokens.scope, carried across a refresh; a token from before reads as the default two).
  • POST /context takes subject_ref; the approval carries it and the fact is written with it.
  • POST /memory/forget { workspace_id, memory_id, reason? }: forgetting one fact, queued for approval (Donna itself now forgets with the direct write).
  • POST /memory/subscriptions { workspace_id, external_ref: "donna:<board>", callback_url } and DELETE /memory/subscriptions/:workspace_id: Framed tells Donna when the workspace's core memory changes. Nothing is configured by hand: the caller names where its events go (callback_url, a public https address, checked against internal addresses at registration and before every delivery, redirects not followed), and Framed makes a random signing secret for this subscription, keeps it encrypted (V2_CONNECTOR_SECRET_KEY, as connector credentials) and answers it once as signing_secret (fmhs_<64 hex>, Cache-Control: no-store). Subscribing again is the rotation: a new secret, the old one signs nothing more (rotated: true). One POST per workspace per minute (v2-turn-sweep) to that address, X-Framed-Event: memory.batch, signed like the job webhooks (X-Framed-Timestamp, X-Framed-Signature: sha256=<HMAC of "<timestamp>.<body>"> with that subscription's secret), ids and subject refs only, retried 1 min, 5 min, 30 min, 2 h, 6 h, then a dead letter and one ops alert.

19. Client example

Plain fetch, no SDK. Start a process, wait for it, decide its gate, read the memo.

const API = 'https://www.framed.dev/api/platform'
const headers = { 'X-Framed-Api-Key': process.env.FRAMED_API_KEY, 'Content-Type': 'application/json' }

async function call(method, path, body) {
  const res = await fetch(`${API}${path}`, { method, headers, body: body && JSON.stringify(body) })
  const json = await res.json()
  if (!json.ok) throw Object.assign(new Error(json.error), { status: res.status, reason: json.reason, body: json })
  return json
}

const sleep = (ms) => new Promise((r) => setTimeout(r, ms))

// 1. Start.
const started = await call('POST', `/processes/${PROCESS_ID}/runs`, {
  input: { region: 'north' },
  reason: 'Weekly check from the dashboard',
})
let runId
if (started.status === 'started') {
  runId = started.run.id
} else {
  // The process asks a person first. Decide it here, or wait for a colleague.
  const decided = await call('POST', `/approvals/${started.approval.id}/decision`, {
    decision: 'approve',
    reason: 'Scheduled by the dashboard.',
  })
  // The run id appears once the executor started it.
  let card = decided.approval
  while (!card.run_id && card.execution.status !== 'failed') {
    await sleep(3000)
    card = (await call('GET', `/approvals/${card.id}`)).approval
  }
  if (!card.run_id) throw new Error(card.execution.result?.error ?? 'The start failed')
  runId = card.run_id
}

// 2. Follow, deciding gates as they appear.
let run
for (;;) {
  run = (await call('GET', `/runs/${runId}`)).run
  if (run.settled) break
  const gate = run.blockers.find((b) => b.kind === 'approval' && b.approval_id)
  if (gate) {
    const card = (await call('GET', `/approvals/${gate.approval_id}`)).approval
    // Put card.payload in front of a person; here we approve.
    await call('POST', `/approvals/${card.id}/decision`, { decision: 'approve', reason: 'Checked.' })
    continue
  }
  const question = run.blockers.find((b) => b.kind === 'question')
  if (question) {
    // A person answers in Framed; or cancel:
    // await call('POST', `/runs/${runId}/transitions`, { transition: 'cancel', reason: '…' })
  }
  await sleep(20_000)
}

// 3. Results.
const { results } = await call('GET', `/runs/${runId}/results`)
const memo = results.find((r) => r.kind === 'file' && r.schema_ref === 'framed:document/memo')
if (memo?.file_ref.url) {
  const text = await (await fetch(memo.file_ref.url)).text() // no key needed; link lasts 15 minutes
  console.log(text)
}
const rows = results.find((r) => r.kind === 'list')?.payload.rows ?? []

20. On our roadmap

What comes next on this surface. Each has an obvious seat in the same model; none of it changes what is here.

LaterShape it will take
Chat: create / get / post / list/platform/chats, over the v2_chat_threads + v2-chat path the Developer API already exposes at /chats
Studio: create / get / list / update, attach artifacts/platform/documents, over v2_artifacts + v2-studio-dispatch; a document result already points at the row
Event webhooks (run.status, approval.decided)still later; a Developer API job already receives signed job.status / job.step / job.finished POSTs on the key's webhook_url (REQ-109). Poll this surface until then
Overview / funnel projectionderived from process + run + result + approval over the same ids; never stored beside them
updated_after on GET /platform/agent-runsA run has no updated_at to filter on yet
A per-key "may start" override of a process's assistant_starttoday the process decides, for MCP and HTTP alike
A dedicated "decide" granttoday deciding sits behind propose_run
Audit rows on v2_tool_calls for platform callsbuildConnectAuditRow keeps only calls whose tool is a framed_* MCP tool, so a platform call leaves no row there yet. A platform.<op> slug on the audit row is the next step, so Connect activity lists these too
Cursor paginationupdated_after + limit + next_updated_after is enough for a workspace's volume today

21. Changelog

Version
unreleasedDonna's memory layer (see Donna's memory layer): GET /memory/about (with scope=team), POST /memory/forget, POST and DELETE /memory/subscriptions (with callback_url, answering its own signing_secret once), Donna's direct write (POST /memory/facts, POST and DELETE /memory/facts/:memory_id), these routes on a person's Connect token, subject_ref on POST /context, and the Connect scope framed:workspaces (POST /workspaces on a token; account.name and connect_scope on whoami). Additive.
unreleasedA run that worked items one by one carries items ({ count, by_outcome, failed, waiting }) and its report ({ lines, closing }), read off the run itself once its stages settled. Over MCP framed_list of:"runs" and framed_fetch run:<id> carry the same items and the report's closing, and a finished items run's says names the count. Additive (agentic worker model P14; for Loek's review).
unreleasedDecisions carry their reason: POST /platform/approvals/:id/decision takes decline_reason (one word of a closed set) with a decline, which then needs no sentence, and an approval carries decline_reason back. Every decision, wherever it is made, is kept as a judgment Framed learns from (agentic worker model P6). Additive.
unreleasedPlatform API: Framed's messenger for a review app (see Chats and workers, for a review app). A worker carries does, voice, chat_id, mark, working and waiting; POST /platform/workers/:id/chat opens its own conversation; GET /platform/chats/framed is Framed's own, with its name and mark; a chat carries worker_id and framed; a message carries worker, blocks and files. A message the chat wrote as a worker in that worker's conversation now reads role: worker with the worker's name, where it read framed. A worker's conversation off every desk is readable when the worker is in reach. A page of messages with after now reads past the first 400 messages of a long chat. Additive.
unreleasedPlatform API: chats and workers for a review app (see Chats and workers, for a review app). GET /platform/chats, GET /platform/chats/:id/messages, POST /platform/chats and POST /platform/chats/:id/turn (streamed like an ask, with the review app's cards as refs), GET /platform/workers, POST /platform/workers/:id/run (the cards ride on the run, and its reports name them as refs.donna) and POST /platform/workers/:id/steer. Additive.
unreleasedPlatform API: a feed page no longer ends inside a millisecond. With updated_after, /processes, /runs and /approvals run past limit to the last row of a millisecond they would cut (up to 1,000 rows), and next_updated_after moves one millisecond past it. Before, a millisecond with more rows than limit (a bulk update) kept next_updated_after on that millisecond, and every poll read the same page. Additive.
unreleasedPlatform API: an approval carries follow_up, what its approved write left to follow up until it is done in the other system (see What an approved write follows up), and POST /platform/approvals/:id/follow-up stops it as the person. Framed checks it quietly and says it once a week at most when one waits too long. Additive.
unreleasedPlatform API: GET /platform/next-steps and POST /platform/ask (see Next steps and asks). An ask is a turn of the person's own chat, streamed as server-sent events; a Connect key may run it, as the person, on the account's credits. The public host now passes an event stream on as it comes. Additive.
unreleasedPlatform API: a Connect OAuth token issued for resource=https://www.framed.dev/api/platform works on /api/platform/*, GET /api/whoami and GET /api/insights, as the person who consented (until now this page said a Connect token worked and every one answered 401 Invalid session). /.well-known/oauth-protected-resource/api/platform describes it. A token for /mcp stays MCP-only. Additive.
unreleasedPlatform API: lists poll without gaps. GET /platform/approvals takes process_id. With updated_after, /runs, /approvals, and the new updated_after on /processes and /runs/:id/results (on produced_at) are a feed: oldest first by time then id, >=, with next_updated_after and more added. Without updated_after nothing changes. An updated_after that is not a timestamp is 400 invalid_input, where it was ignored. Additive.
unreleasedReceipts: every call that acts answers with receipt: { jws, claims }, a compact JWS signed ES256 over who called, where, under which grants and the hash of the arguments. Public keys at /.well-known/framed-jwks.json; receipt: null while no key is configured. GET /whoami lists capabilities. Additive.
unreleasedStep-up: a grant an administrator could give is no longer a dead end. The 403 is grant_required (status: auth_required, missing_grants, grant_request, retry), an approval card of the kind grant_request waits for the administrator, and GET /platform/grant-requests/:id follows it. A decline is access_denied. A result can say status: auth_required. Additive; reason and grant stay on the body.
unreleasedResults carry status (draft, awaiting_approval, final) and provenance. Additive.
unreleasedPartner API: optional Idempotency-Key header (or idempotency_key in the body) on start_job and create_workspace: a retry within 24 hours returns the original response with Idempotent-Replay: true; a different body under the same key is 422 idempotency_key_reused.
unreleasedDeveloper API: POST /workspaces and POST /jobs with a reseller key carry X-RateLimit-Limit, -Remaining, -Reset and -Resource on every successful answer and on a 429, which also carries Retry-After. Retry-After was set by the function but dropped by the public host; it now arrives. No new limit: these are the ones that already existed. The versioning policy is written down in section 4.
unreleasedDeveloper API: an agent job (agent_slug) now counts. A catalog agent's job points at a run, so get_job carries cost and the spend counts in the key's EUR per day, as a plan job's and a custom agent's already did. Both kinds hold max_cost_eur before each model call: at the cap the job ends failed with budget_stop instead of spending past it (see Agent jobs and the cap). budget_stop.reason now reads "nothing more was run" for every stop.
unreleasedDeveloper API: the job start ping is delivered like every other job webhook. It is queued on the same outbox, signed with X-Framed-Job-Signature, retried up to 6 times and, when it gives up, a dead letter Framed is alerted to and can replay. It gains event_id, occurred_at and get_job. Its first try still carries X-Framed-Signature; that header will be removed in a later release, announced here first.
unreleasedBoth APIs: every error body carries a snake_case code beside error and any reason, which are unchanged (see section 14). A start whose input is not an object or is over 8 000 characters now answers 400 invalid_input, as this page always said, instead of starting the run without it. The OpenAPI file parses again (four descriptions were not valid YAML), carries the error shape, and now also describes /health, /whoami, /workspaces, /agents, /insights and /jobs.
unreleasedBoth APIs: a resource named by id in a workspace the key cannot reach is 404 with the answer of an id that exists nowhere (no_such_run, no_such_approval, Insight not found, ...), where it was 403 workspace_out_of_reach and so told a caller which ids exist elsewhere. This covers the Platform API's reads and writes by id, and the Developer API's reads of a process, a run, a finding, an approval, a chat and a Studio item. A list names its workspace itself and stays 403 for an unknown and a foreign workspace alike.
unreleasedBoth APIs: a 401 carries a WWW-Authenticate challenge (Bearer realm="Framed API", with error="invalid_token" for a credential that was refused), as RFC 9110 asks. Additive.
unreleasedPlatform API: read-only agent runs. GET /platform/agent-runs and GET /platform/agent-runs/:id list and open the runs of a workspace's agents (custom agents, and the catalog and desk agents the scheduler fires), with what they kept as results in the same envelope as a process run's. Additive; runs is unchanged.
unreleasedPlatform API: optional Idempotency-Key header (or idempotency_key in the body) on POST /platform/processes/:id/runs, with the same replay, 422, 409 and 503 answers as start_job.
unreleasedA run is started with typed inputs: files (references into Framed's store) and from_result (a link back to an earlier result) next to input, validated against the JSON Schema framed:run_input before anything starts and looked up as the person (no_such_file, no_such_result, result_in_other_workspace, access_policy for the Studio grant). The run resource carries input_files and input_from. A plan job takes plan.files and plan.from_result. A start whose input does not fit is now 400 invalid_input with issues; a malformed input used to start the run without it.
unreleasedDecisions carry answers: an approval is a typed framed:decision_request (approval.type, approval.package) with its questions and options, POST /platform/approvals/:id/decision takes answers, decline as a word for reject, and every refusal of an answer says code and issues. The decision and its record are one write. Additive.
unreleasedA mail draft is a typed framed:message_draft that can be approved, edited and approved (edit: { subject, body }) or declined over the API, behind the propose_mail grant. A real send stays decided in the app. Over Connect framed_fetch approval:<id> carries the typed view read only. Additive.
unreleasedA result lists what can be proposed about it (actions), and POST /platform/results/:id/actions takes the proposal: a message draft behind the propose_mail grant, written as the approval card an assistant's proposal writes, with a link back (approval.from_result). Nothing is sent. A link back to a result in a start now also needs the read grant. Additive.
unreleasedA plan job whose run ended done with a step that did not pass its checks is failed (result.partial, result.step_problems), not succeeded.
unreleasedResults are packages (framed-package/1): format, validated, issues, renditions and actions, provenance.sources. A result that does not fit its type is a draft, never final; a finding cut off at the length limit and a document with no text are such results. JSON Schemas at /framed-package-1.json. Additive, except that those results are no longer final.
unreleasedPartner API: optional ephemeral flag on create_workspace (one workspace per order).
unreleasedGET /whoami carries capabilities, a list of names for what the server can do (packages, files), so a client, and the conformance suite, can tell which parts of the contract a server has. Additive.
unreleasedPlatform API: a worker, its runs and their results follow the channels of the person the call acts as. What is outside them answers 404 no_such_process or no_such_run, and a list counts it in withheld. Approvals listed with updated_after are now ordered by updated_at, so a card decided now is not missed behind the limit.
unreleasedPartner API: a one-off plan job now follows its run without a get_job call: the dispatcher carries a finished run onto the job each tick, so a client that waits on webhooks no longer leaves jobs counted against its concurrent-jobs limit. A job whose start never finished (queued, no run, past 10 minutes) is closed failed.
unreleasedPartner API: DELETE /workspaces/:id for a reseller's own one-off workspace, and forget_after_hours on create_workspace (forget after delivery).
2026-09-21GET /platform/processes/:id/latest-record. Process resources carry latest_record. Connect framed_fetch run:<id> returns step extract.
2026-09-16Phase 1: processes, runs, results, approvals, signed file links.