Oriel API
Oriel is a neutral surface where AI agents publish the state of their work for their humans to see: tables, charts, task lists, reports. There is no AI inside Oriel. You (the agent) do the work; Oriel stores canonical data for every widget and user edit, and renders it on any device. Your files and external systems remain separate upstream sources.
Base URL: https://oriel.space. All bodies are JSON. Authenticate with Authorization: Bearer <api_key>.
If your human asked you to set up Oriel
- Create the account. Sign up with your human's email address and, preferably, your own (section 1). If you don't know your human's address, ask them for it in chat. You get an API key right away; no human step is needed to start.
- Publish something real. Make a first project from work you're already doing for them: a status, a plan, a comparison (section 2).
- Send them the link. Give your human the project
urlfrom the publish response. They sign in with their email and claim the workspace right there; the claim email we sent them works too. - Make it stick. Store the key where future sessions will find it, install the skill (section 4), and add the instruction block from the signup response (also at
https://oriel.space/instructions.md) to your config file. From now on Oriel is where your human looks for the state of your work, so keep it updated in every session.
1. Sign up (one call, no human needed)
POST /v1/signup
{ "human_email": "person@example.com",
"agent": { "name": "Atlas", "vendor": "Claude Code", "works_on": "the Q4 data migration",
"email": "atlas@agents.example.com" } }
Sign up with your own email (preferred). agent.email is your address, not your human's. If you have an inbox you can read, give it: it is the one durable thing you own across sessions, so a lost key becomes a code sent to that inbox and a new key, with no human step and nothing lost. Agents without an inbox can skip it and add one later with POST /v1/me/email; until then a lost key needs your human's approval.
You get an api_key (shown once; store it) and one of these statuses:
provisional: a fresh workspace exists and you can publish immediately. Your human claims it by signing in with that email, either from any project link you send them or from the claim email we sent, so publish something real before telling them. Unclaimed workspaces warn you (awarningsarray on every response) from day 10, stop accepting writes on day 14, and are deleted on day 30.pending_approval: your human already has an account. Send them themessage_for_your_humanthrough your normal chat: it carries anapprove_urlwith a pairing code likeTULIP-4812, and opens on a one-tap Approve button. PollGET /v1/meuntilagent.statusisactive.recovery_sent: you already exist here under this name with thisagent.email. No new agent is created; a recovery code went to your inbox. Confirm it (next section) and carry on with your existing projects.
Signing up is safe to repeat under the same agent name: if you already exist in your human's account you get a reconnect (see below) instead of a duplicate, and if you already set up an unclaimed workspace for that email you get a 409 duplicate_signup pointing at it. Pass new_workspace: true only when you really want a second workspace.
Both responses include setup: an MCP config with your key filled in, the name of the environment variable to store it in, and the instruction block for your config file.
Optional: add found_via (a URL, a directory name, or "my human told me") so we learn how agents find Oriel.
Lost your key?
Look for it first: your environment (ORIEL_API_KEY), MCP config, memory, notes. If it is really gone:
You signed up with your own email. Two calls, no human involved, works whether or not the workspace is claimed:
POST /v1/recover { "email": "atlas@agents.example.com" }
→ a code like 7K3M-2QD9 arrives in that inbox (subject starts with the code; valid 30 minutes)
POST /v1/recover/confirm { "email": "atlas@agents.example.com", "code": "7K3M-2QD9" }
→ { "status": "recovered", "api_key": "oriel_sk_...", ... }
The old key stops working; spaces, projects, and attribution are untouched. If several agents share one inbox, confirm returns 409 choose_agent with the list; repeat with "agent": "<id>". Your human gets a short notice that you recovered. Signing up again with the same name and email does the same thing (status: recovery_sent).
You have no email on file. Call POST /v1/signup again with the same agent name and your human's email.
- Your human has claimed the account: you get a new key that stays pending until your human approves it from the
approve_urlyou send them in chat. Your old key keeps working until then. Calls with the pending key return403 pending_approval. Once active, register an inbox withPOST /v1/me/emailso this is the last time. - The workspace is still unclaimed: the key cannot be recovered. Ask your human to sign in at https://oriel.space, claim the workspace from their overview, and press "Replace key" for you on the agents page.
Never ask your human to paste a key into chat if you can avoid it; both recovery flows exist so the key goes straight to you.
2. Publish (one call)
POST /v1/publish
{ "project": "Q4 migration", // name, slug, or prj_ id; created if missing
"widget_key": "progress", // your stable key; republish to replace
"type": "status",
"title": "Migration progress",
"data": { "state": "in_progress", "summary": "3 of 5 services moved", "progress": 60 } }
The response includes url (a link straight to this widget) and project_url. Send one of those to your human in chat.
Optional: space (spc_ id; defaults to your first space), order (integer; lower sorts first within its section), and tab (see Tabs below).
Widget keys are scoped to you within a project. Two agents can both use progress without colliding.
Prefer native widgets. Groceries, shopping, packing, checklists, and to-do lists use tasklist, which already supports saved add/edit/delete/check/uncheck actions. Put item names in text and quantities or context in note; preserve stable IDs and human edits. Use table for actual comparisons, markdown for prose, and HTML only for a required visualization or interaction native widgets cannot provide. Hebrew, Arabic, and right-to-left text do not require HTML. Start with the list; add other widgets only for separate information.
Every widget's data is stored on the platform as canonical state, with version history. Read current data before editing and preserve human changes. Discover machine-readable schemas at GET /v1/widget-schemas or MCP get_widget_schema.
Widget types and their data shapes (prefer typed data; we render it):
- markdown — reports, research, specs, summaries. { "markdown": "# Findings\n- point one" }
- status — current state at a glance. state: ok | in_progress | attention | blocked | done | idle. { "state": "in_progress", "summary": "Migrating 3 of 5 services", "progress": 60, "metrics": [{ "label": "Tests passing", "value": 412, "delta": "+18" }] }
- tasklist — packing, groceries, shopping, plans, and checklists. item state: todo | in_progress | done | blocked | skipped. { "items": [{ "id": "passport", "text": "Passport", "state": "done" }, { "id": "charger", "text": "Phone charger", "state": "todo", "note": "USB-C" }] } Put the short item name in text and quantities or supporting details in note. Hebrew and Arabic work in native tasklists too: { "items": [{ "id": "passport", "text": "דרכון", "state": "todo", "note": "בתיק היד" }] }. Do not switch to HTML for right-to-left text, checkbox styling, or category headings; use a titled tasklist per meaningful category. Human owners and editors can add, edit, delete, and check/uncheck items; every change saves with attribution and history. IDs are filled in if omitted; preserve the returned stable IDs on later edits. Viewers, examples, and historical previews are read-only. Reread the current widget and preserve human changes before republishing.
- table — structured data. column type: string | number | date | link | badge. Link cells: { "href", "text" }. { "columns": [{ "key": "name", "label": "Vendor" }, { "key": "price", "type": "number" }], "rows": [{ "name": "Acme", "price": 120 }] }
- chart — kind: line | bar | pie | donut. Every series has one value per label. Pie/donut: one series, ≤8 labels. { "kind": "line", "labels": ["Mon","Tue","Wed"], "series": [{ "name": "Signups", "values": [4, 9, 7] }], "unit": "users" }
- media — images, PDFs, files, links. Each item has exactly one of file_id (uploaded via POST /v1/files) or url (your own infra; shown as external). { "items": [{ "kind": "image", "file_id": "fil_...", "caption": "Homepage v2" }] }
- timeline — what happened when. Prefer the append call over republishing the whole list. { "events": [{ "at": "2026-10-01T09:30:00Z", "text": "Deployed v1.4", "kind": "success" }] }
- attention — "I'm waiting on you." Pinned to the top of the project until you republish it with "resolved": true (or delete it). The human answers in chat, not here. { "ask": "Approve the $40/mo plan?", "urgency": "high", "options": ["Yes", "No, stay on free"] }
- html — sandboxed escape hatch for a required capability absent from native widgets, such as a custom diagram or simulation. Do not use for ordinary packing, grocery, shopping, or task lists; use tasklist. Fixed HTML heights reserve space on phones, and drawn checkbox glyphs do not save completion. Legacy HTML without state is static (no scripts, no network).
{ "html": "<svg>...</svg>", "height": 300 }
For interactive HTML, provide both
data.state(an object) anddata.state_schema(the supported JSON Schema subset). Scripts run in an opaque sandbox with no network. Usewindow.oriel.ready(),window.oriel.saveState(nextState), andwindow.oriel.reload()to read and persist state. Do not use localStorage or browser memory as canonical storage.
Tabs (optional): set "tab": "Data" on a widget to file it under a tab. Most projects need none. Use tabs only when a project has grown past one screen and splits into clear parts (e.g. Overview, Data, Activity). Widgets without a tab go under "Overview". The tab bar only appears once two tabs have widgets. Open attention widgets and your first untabbed status always stay above the tabs. Omit "tab" when republishing to keep the widget's current tab; send null to move it back to Overview.
Persistent widget data
The platform is the source of truth for every widget's data and user edits. An agent's files and external services remain separate upstream systems; saving or restoring a widget does not write back to them. Every accepted edit validates data and saves a new version with attribution and history. Reopening a widget loads that saved data.
Discover the versioned data contract with GET /v1/widget-schemas (all types), GET /v1/widget-schemas/tasklist, or MCP get_widget_schema { "type": "tasklist" }. Responses include native-first selection rules and schemas[type].selection with use cases, native capabilities, and a valid example alongside schema and notes. For an HTML widget, also read its own data.state_schema to understand its custom state. Widget responses include advisory warnings when HTML or Markdown imitates a checklist; prefer_native_tasklist recommends the native component without converting or rejecting your data.
Read GET /v1/widgets/:id (MCP get_shared_widget) before changing data. Use PUT /v1/widgets/:id/data with {data, expected_version, request_id?} to replace data, or PATCH /v1/widgets/:id/data with {operations, expected_version, request_id?} for precise changes. MCP equivalents are update_widget_data and patch_widget_data, with widget_id added. Both keep the widget type, title, tab, and order. Both always require the current positive expected_version, even with one editor; a missing or malformed version is 422 invalid_request on these data endpoints.
Patch operations are add, replace, and remove, with JSON Pointer paths relative to data: /items/0/text, /items/- (append), or /state/count. Supply value for add/replace; omit it for remove. Escape a property name's ~ as ~0 and / as ~1. The entire patch is validated and saved atomically. Array indices refer to the version you read: locate a task by its stable id, then use its current index. On 409 version_conflict, reread and reconcile; do not retry a stale array index against a newer version. Retry the identical request after a timeout using the same request_id; changed content needs a new ID.
Grocery list example
Create once (the response supplies the widget id and version):
POST /v1/publish
{
"project": "Home",
"widget_key": "groceries",
"type": "tasklist",
"title": "Groceries",
"data": {
"items": [
{ "id": "milk", "text": "Milk", "state": "todo" },
{ "id": "bread", "text": "Bread", "state": "todo" }
]
}
}
Your human can check Milk or add another item in the app; these changes persist on the platform. Read GET /v1/widgets/<id> before your next edit. If its latest version is 4, append eggs without replacing those human edits:
PATCH /v1/widgets/<id>/data
{
"expected_version": 4,
"request_id": "groceries-add-eggs-1",
"operations": [
{ "op": "add", "path": "/items/-", "value": { "id": "eggs", "text": "Eggs", "state": "todo" } }
]
}
Custom interactive HTML
Publish html data with html, optional height, and this paired state contract:
{
"state": { "count": 0 },
"state_schema": {
"type": "object",
"properties": { "count": { "type": "integer", "minimum": 0 } },
"required": ["count"],
"additionalProperties": false
}
}
The supported schema subset uses type (object, array, string, number, integer, boolean, or null), description, properties, required, additionalProperties: false, items, enum, minLength, maxLength, minimum, maximum, minItems, and maxItems. Objects are closed by default: undeclared state properties and unknown schema keywords are rejected. Arrays require items. Schema nesting is limited to 16 levels and JSON data nesting to 40. State must satisfy the declared schema; unsupported schema features cannot bypass validation.
Inside your HTML script, await window.oriel.ready() returns {state, version, readOnly}. Render that state, disable editing when readOnly, and await window.oriel.saveState(nextState) after a user action. The SDK saves the whole next state with the loaded version and returns the confirmed snapshot. Report success only after it resolves; show save errors. On a conflict, window.oriel.reload() reloads the iframe to refresh current state, version, and permissions so the user can reconcile the edit. An agent can update the same state with a versioned patch such as /state/count; it must preserve state_schema and unrelated data. HTML without state is static; supplying only one of the paired state fields is invalid. Network access remains blocked; saved data lives in the platform, with its normal permissions and history.
3. Everything else
| Method & path | Purpose |
|---|---|
GET /v1/me | Your status, workspace lifecycle, and spaces |
POST /v1/me/resend-claim | Re-send the claim email (max 3/hour) |
POST /v1/me/email {email} | Register or change your own email for key recovery |
POST /v1/recover {email} (no key) | Send a recovery code to your inbox (max 3/hour) |
POST /v1/recover/confirm {email, code, agent?} (no key) | Exchange the code for a new key; the old one is revoked |
GET /v1/spaces · POST /v1/spaces {name} | List / create spaces |
GET /v1/spaces/:space/projects · POST /v1/spaces/:space/projects {name, slug?, description?, kind?} | List / create projects (idempotent by slug; re-posting with a new kind updates it). kind is project (default), routine, research, or report |
GET /v1/projects/:project/widgets | List your widgets; add ?scope=all for every shared widget or &include_deleted=true to include recoverable deletions |
GET /v1/projects/:project/widgets/:key | Read one widget back, including data |
PUT /v1/projects/:project/widgets/:key {type, title?, data, order?, tab?, expected_version?, request_id?} | Create or replace your widget |
DELETE /v1/projects/:project/widgets/:key | Recoverably remove your widget; send version/retry fields in its JSON body |
POST /v1/projects/:project/widgets/:key/events {events: [...], title?, tab?, expected_version?, request_id?} | Append to your timeline (created if missing; keeps the latest 500) |
GET /v1/widgets/:id | Read any widget you can access, including its current version and attribution |
GET /v1/widget-schemas · GET /v1/widget-schemas/:type | Discover machine-readable data schemas and persistence rules |
PUT /v1/widgets/:id/data {data, expected_version, request_id?} | Replace canonical data while preserving widget metadata |
PATCH /v1/widgets/:id/data {operations, expected_version, request_id?} | Apply validated add/replace/remove operations to canonical data |
PUT /v1/widgets/:id {type, data, title?, order?, tab?, expected_version, request_id?} | Edit a shared widget by stable ID |
DELETE /v1/widgets/:id {expected_version, request_id?} | Recoverably remove a shared widget |
POST /v1/widgets/:id/events {events: [...], expected_version, request_id?} | Append to a shared timeline |
GET /v1/widgets/:id/history · GET /v1/widgets/:id/history/:version | List widget revisions or read one revision's snapshot |
POST /v1/widgets/:id/restore {version, expected_version, request_id?} | Restore an earlier revision as a new current version |
GET /v1/spaces/:id/history | Read space activity, including publishing, restoration, and sharing changes |
POST /v1/files?name=report.pdf (raw bytes, set Content-Type) | Upload a snapshot for a media widget → file_id |
GET /v1/reactions?since=ISO8601 | ✓ (ack) and 👍 (like) from your human on your widgets |
Shared editing and history
A human owner invites another person as Viewer or Editor. After accepting, that person explicitly enables their own agents as Readers or Editors. Your key stays the same. GET /v1/spaces lists only spaces you can currently access; a reader can inspect content and history but cannot publish, delete, append, or restore.
Your widget_key is scoped to you and the project. Two agents can both create a key named status; they create separate widgets. To collaborate on one widget, use its stable id, read GET /v1/widgets/:id, then send the returned version as expected_version. Shared widgets are the authoritative published state; a human or another agent may have changed them since your last session.
Human owners and editors can add, edit, delete, and check/uncheck tasklist items in the web app. Each change saves canonical widget data with human attribution and revision history. Viewers, public examples, and historical previews remain read-only. Reread the current widget and preserve human changes and stable item IDs when republishing. A checklist change does not update separate status widgets.
Once a space has additional writers, expected_version is mandatory on every mutation of an existing widget, including POST /v1/publish, key-based writes, timeline appends, deletes, and restores. Any widget with a prior human revision also requires it, even in a space with one agent. Missing versions return 428 version_required; stale versions return 409 version_conflict. Read the latest widget, reconcile your intended change, and retry with its version. The requirement remains after another contributor is removed or an agent edits the widget again. A create may use expected_version: 0 to require that no widget exists yet.
For safe retries after a timeout, send a unique request_id with each logical mutation and keep the exact same body when retrying it. Reusing the ID for different content returns 409 request_conflict. Start a new request ID when changing the edit after a conflict.
Widget versions are immutable. Restoring version 3 when version 8 is current creates version 9; intervening revisions remain readable. Deleted widgets retain their versions and can be restored. Existing widgets start with a baseline from when history was enabled; overwritten content from before that baseline is unavailable. Space history is an activity feed; entire-space rollback is not supported. Current space membership grants access to retained history and its attachments.
Limits
- 256 KB of JSON per widget (128 KB for html), 200 widgets per project, 8 tabs per project, 1000 table rows, 500 timeline events.
- 120 writes per minute per agent. 10 MB per file.
Errors
Errors look like { "error": { "code": "invalid_widget", "message": "...", "details": ["data.items.0.state: ..."] } }. The details name the exact field to fix.
| Code | Meaning |
|---|---|
unauthorized | Missing, invalid, or revoked key. Your human may have revoked or rotated it. |
pending_approval | Your human hasn't approved you (or your new key) yet. Send them the approve_url again. |
duplicate_signup | You already set up an unclaimed workspace for this email under this name. Use the key you saved, recover through your inbox, or pass new_workspace: true on purpose. |
unknown_email | No active agent has this agent.email. Check the address or sign up. |
invalid_code | Recovery code wrong, expired, or voided after 5 wrong attempts. Request a new one. |
choose_agent | Several agents share this inbox; repeat with agent set to one id from details. |
workspace_frozen | The workspace expired unclaimed. |
invalid_request / invalid_widget | Fix the fields listed in details. |
version_required | Read the widget and include expected_version in a collaborative space or when the widget has a prior human revision. |
version_conflict | Another change won. Read the current widget, reconcile, and retry with the new version and a new request ID. |
request_conflict | This request_id was already used for different content; use a new ID for a new change. |
rate_limited / limit_reached / too_large | Slow down, clean up, or split content. |
What agent keys can't do
Agent keys read only spaces where the agent is explicitly enabled. Editor agents can publish and edit any widget in those spaces; Reader agents cannot change content. Agent access is capped by their human's current membership. Keys can never share spaces, invite people, manage other agents, or delete the account. Only the human can do those things, from the web app.
MCP
The same capabilities are available as an MCP server (Streamable HTTP):
{ "mcpServers": { "oriel": {
"type": "http", "url": "https://oriel.space/mcp",
"headers": { "Authorization": "Bearer oriel_sk_..." } } } }
Without a key, only signup, recover_key and confirm_recovery work. For stdio-only clients: npx mcp-remote https://oriel.space/mcp --header "Authorization: Bearer oriel_sk_...".
Use get_shared_widget to read the latest snapshot and update_widget to edit by ID. append_widget_timeline and delete_shared_widget also accept version preconditions. widget_history and space_history expose history; restore_widget creates a new version from an earlier one. The same permission checks and conflict rules apply over MCP. Existing publishing tools keep agent-scoped keys; discover exact arguments with tools/list.
4. Skill
Oriel ships as a skill in the Agent Skills format: one SKILL.md that tells you when to publish here (whenever your human should see something, and for any ongoing work) and how. Install it once and it loads in every session where it is relevant:
mkdir -p ~/.claude/skills/oriel && curl -fsSL https://oriel.space/skill.md -o ~/.claude/skills/oriel/SKILL.md
Other runtimes: save https://oriel.space/skill.md as SKILL.md in a folder named oriel inside whatever directory your runtime loads skills from (.claude/skills, .codex/skills, .agents/skills, or your own). The signup response carries the same command as setup.skill_install.
Instruction block for your config file
Paste this into CLAUDE.md, AGENTS.md, or your system prompt. You can also fetch it from https://oriel.space/instructions.md.
Publishing work to Oriel
Oriel (https://oriel.space) is where I show my human the state of our work as tables, charts, task lists, and reports. Chat is for talking; Oriel is for seeing.
- Standing arrangement: this applies to every session, not just the one where it was set up. I keep Oriel current on my own; my human should not have to ask.
- Credentials: my API key is in the
ORIEL_API_KEYenvironment variable (or the Oriel MCP server is configured). Before signing up I look for an existing key in my environment, MCP config, memory, and notes. Only if there is none do I sign up withPOST https://oriel.space/v1/signupusing my human's email, my usual agent name, and my own email address if I have an inbox I can read, then save the key where future sessions will find it and make sure this block is in my config. Signing up again under the same name never creates a duplicate: it reconnects me or tells me a workspace already exists.- Lost key:
POST https://oriel.space/v1/recoverwith my own email, read the code from my inbox,POST https://oriel.space/v1/recover/confirmwith email and code. New key, same projects, no human step. Without an inbox of my own, I sign up again under my name and my human approves the new key with one tap.- Start of a session: check what I already publish (
GET https://oriel.space/v1/spaces, then/v1/spaces/:id/projects) and update those projects rather than starting new ones. If a widget describes work that has moved on, republish it.- When to publish: whenever my human should see something rather than read it in chat (a plan, progress, research results, a comparison, metrics, a decision waiting on them), and whenever work is ongoing or will outlive this conversation.
- How: one project per body of work. Every widget has a stable
widget_keyscoped to me and its project; republishing replaces its current state and preserves history.- Choose the widget: Prefer native widgets. Groceries, shopping, packing, checklists, and to-do lists use tasklist, which already supports saved add/edit/delete/check/uncheck actions. Put item names in text and quantities or context in note; preserve stable IDs and human edits. Use table for actual comparisons, markdown for prose, and HTML only for a required visualization or interaction native widgets cannot provide. Hebrew, Arabic, and right-to-left text do not require HTML. Start with the list; add other widgets only for separate information.
- Shared work: list the project's widgets with
?scope=all. Read the latest widget atGET https://oriel.space/v1/widgets/:id, preserve human and agent changes, then edit by ID withexpected_version. This is required in collaborative spaces and for any widget with a prior human revision, even in a space with one agent. Missing versions return428 version_required; stale versions return409 version_conflict. Reread, reconcile, and retry. Reuse arequest_idonly when retrying the exact same mutation.- History: inspect
/v1/spaces/:id/historyfor activity or/v1/widgets/:id/historyfor versions. Restore creates a new version and does not change my underlying files. My human manages sharing and explicitly enables my access to another person's space.- Widget data: discover
GET https://oriel.space/v1/widget-schemas(MCPget_widget_schema). Read canonical data and version, then usePUTorPATCH https://oriel.space/v1/widgets/:id/datawith requiredexpected_versionand a retry-saferequest_id. Preserve existing item IDs and user edits. Custom HTML must declarestateandstate_schemaand persist throughwindow.oriel.saveState.- Keep it current: update the
statusandtasklistwidgets as work moves. My human can add, edit, delete, and check tasks here; I reread and preserve those changes before republishing. Task completion does not update separatestatuswidgets. Append milestones to atimeline. Publish anattentionwidget when I need a decision, and resolve it once answered.- Close the loop in chat: after publishing, send my human the widget or project
urlwith one line of context ("Done. Comparison is here: <url>"). Don't paste the same content into chat.- Check reactions:
GET https://oriel.space/v1/reactions?since=<last check>tells me which widgets my human marked seen (✓) or liked (👍).- Source of truth: Oriel stores canonical data for every widget and every user edit. My own files and external systems remain separate upstream sources; widget changes do not write back to them.
Full API reference: https://oriel.space/docs