# Orbgem: a guide for AIs > Orbgem is a hosted notebook for engineers: plain Markdown notes linked by [[Title]], a daily timeline, full-text search, a graph and Onyx, its assistant. Each notebook is an orb. An AI reads and changes one orb over MCP, or calls the REST API with the person's `orb_` token. Send the header `x-orbgem: 1` with every POST, PUT, PATCH and DELETE under https://orbgem.com/api/: one without a token is refused without it (403 `intent_required`), and one with a token takes it harmlessly. Every refusal is JSON, `{ "error": "", "code": "" }`. ## Set someone up When a person asks you to set them up with Orbgem, ask for the email address they read and the name they go by. Then make the account: ```sh curl -sS -X POST https://orbgem.com/api/agent/signup \ -H 'Content-Type: application/json' -H 'x-orbgem: 1' \ -d '{"email":"ada@example.com","name":"Ada","timezone":"Europe/London","agent":"Claude Code on macOS"}' ``` - `email` (required): the person's own address, which the account is proven by. A throwaway inbox is refused. - `agent` (required, at most 80 characters): you, as the person would read it (`Claude Code 2.1 on macOS`). It names the account's maker and its token, and the welcome mail quotes it, so it holds letters, digits, spaces and `. - _ ( ) / + ' ,` only, and no web address or phone number. - `name`, `timezone` (an IANA name; UTC when left out) and `orb` (a name for their first orb): optional. The answer, 201: `{ "token": "orb_…", "vault": { "id", "name" }, "account": { "email", "verified": false, "madeBy" }, "app": "https://orbgem.com", "guide": "https://orbgem.com/llms-full.txt", "next": [ … ] }`. Keep the token secret: it is the account's only one until the address is confirmed. `next` is what to tell the person, in words. The person gets one mail. Its link confirms the account is theirs and signs them in, and keeps your token; there is no password until they set one. If they get in any other way first (a sign-in link they ask for, a password reset, Google), the account is theirs but your token is revoked, since only the welcome mail names you: ask them for a new one. Until they click it the account costs nothing to serve: Onyx answers no questions and searches nothing (0 a day), it holds 200 notes, 5 MB of text and 1 token, its notes wait to be indexed for Onyx (`account_status` and `GET /api/ai/assistant`'s `index.held` say so), and it makes no public links, shared notes, daily digest, invitations or alert webhooks; those refusals say `confirm_address`. An account nobody confirms is deleted 7 days after it was made, with a mail the day before. What a refusal's code means, and what to do: - `agent_required`, `agent_too_long`, `agent_not_a_name`: name yourself in `agent`, in one line, as a name. - `disposable_address`: ask for an address the person keeps. - `email_taken`: the person has an account. They sign in at https://orbgem.com/#login, or ask for a sign-in link at https://orbgem.com/#login?link=1. - `agent_signup_waiting`: an account made from this network waits to be confirmed; the person confirms it from its mail, or signs in to it. - `agent_signups_network`: this network has made 3 accounts through an AI in 30 days. `agent_signups_mailbox`: an AI made one for this inbox this month (a +tag or a dot is the same inbox). - `agent_signups_asn`: as many accounts were made through an AI from this provider today as it takes (two from a hosting or VPN provider); run from the person's own machine, or try tomorrow. - `agent_signups_cap`, `agent_signups_mail`, `agent_signups_off`, `site_full`, `signups_closed`, `too_many_signups`: not now; the person can sign up themselves at https://orbgem.com/#signup (`agent_signups_mail` and `site_full` lift by tomorrow). Made it for the wrong address? While nobody has claimed it, `DELETE https://orbgem.com/api/agent/account` with its token (and `x-orbgem: 1`) deletes it and everything in it; once the person has, it is theirs to delete. This is for an AI that can make web requests: Claude Code, Codex, Gemini CLI, Cursor, an MCP client's own tooling. Claude on the web connects from its connector settings instead, with the person signing in to Orbgem there. ## Connect Claude Code, with the token: ```sh claude mcp add --transport http orbgem https://orbgem.com/mcp --header "Authorization: Bearer orb_…" ``` Any other MCP client: the address is `https://orbgem.com/mcp`, the transport Streamable HTTP, and every request carries `Authorization: Bearer orb_…`. A client with a browser can add `https://orbgem.com/mcp` with no token and sign in with OAuth instead (discovery at `https://orbgem.com/.well-known/oauth-protected-resource/mcp`), where the person chooses an orb and whether you may change notes. The REST API takes the same token: `curl -sS https://orbgem.com/api/me -H "Authorization: Bearer orb_…"` says who it is. Without an MCP client, speak to it over plain HTTP: one JSON-RPC 2.0 message per POST, answered with JSON. It keeps no session, so `initialize` is optional; `tools/list` answers every tool with its `inputSchema`, the arguments it takes. A call: ```sh curl -sS -X POST https://orbgem.com/mcp -H 'Content-Type: application/json' -H 'Accept: application/json' -H "Authorization: Bearer orb_…" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"create_note","arguments":{"title":"Welcome","body":"First note."}}}' ``` The answer's `result.content[0].text` is Markdown to read or pass on; `result.isError` is true when the tool refused, with the reason in that text. ## Tools - `search_notes`: Full-text search over the person's Orbgem notes (titles and text, keyword matching, not semantic). - `read_note`: Reads one note's Markdown text, then its tags, aliases, the notes it links to and the notes that link to it (as [[Title]]), and whether anyone besides you has written in it. - `recent_notes`: Lists the notes changed most recently, newest first, with each one's title, path, type and when it changed. - `list_notes`: Lists the notes of one type (`Issue`, `Runbook`, …), most recently changed first, each with its title, path, version, when it changed and its properties: every note of the type, a page at a time, which search_notes (at most 25 hits) cannot. - `daily_note`: Reads the daily note for one day: what the person captured that day. - `open_tasks`: Lists unchecked checklist items (`- [ ]`) across the person's notes, high priority first, each with the note it is in and its line. - `read_manual`: How Orbgem works: its features, its Markdown syntax, its keys and its settings, from the manual of the version the person is using. - `list_files`: Lists the files kept in this orb (PDFs, spreadsheets, archives, recordings, pictures), newest first: each one's name, what kind it is, its size and the notes that link it, a page at a time. - `read_file`: Reads a kept file's words, from the note Orbgem made of them when a document came in, or a log's own text, and never the bytes of anything else. - `account_status`: Where the person's Orbgem account stands: its plan, the notes, storage, orbs and API tokens it holds against the plan's lines, Onyx's questions today, whether its address is confirmed and a password set, who made it, and what waits on the person (a link to click before Onyx answers, say). - `create_note`: Makes a new note from a title and its body. - `append_to_note`: Adds text at the end of a note, on its own lines after a blank line, and changes nothing above it. - `edit_note`: Replaces one exact passage of a note with another and leaves every other character alone. - `replace_note`: Rewrites a note's whole Markdown text, properties and `# Title` line included, as the editor's Source view would. - `tag_note`: Adds tags to a note, or takes them off, in its `tags:` property; the text stays as it is. - `tick_task`: Ticks a task in a note, or unticks one with checked false, changing nothing else: the way to mark work done, instead of edit_note on the line. - `set_property`: Sets one front-matter property of a note, or takes it out with a null value, changing nothing else: the way to move a card to a column (its status) or change a field a form shows, instead of rewriting the note. - `log_entry`: Adds an entry to today's daily note, the person's timeline, under the time it is now by the orb's clock, as the capture box and `orb` do; the day's first entry makes the note and carries yesterday's open tasks forward. - `delete_note`: Deletes a note: it leaves the orb, its share link stops working, and links to it from other notes become links to nothing. - `import_notes`: Brings many notes in at once, each made exactly as create_note makes one: up to 50 notes and 2 MB of text a call, so a few hundred notes from another app are a few calls. - `open_app`: Makes a link that signs a browser in to this orb, so the person sees it without a password: open it yourself (`open ` on a Mac, `xdg-open` on Linux, `start` on Windows) or hand it to them. `account_status` is the place to start: it says what the account holds against its plan and what waits on the person. ## Bring notes in `import_notes` makes up to 50 notes a call (2 MB of text), each as `create_note` makes one: `{ "notes": [{ "title", "body", "created", "tags" }], "format": "markdown" | "html", "onExisting": "skip" | "rename" }`. Send a larger set 50 at a time; the plan's note line stops a batch where it is reached, and the answer says how many were made. Apple Notes, on a Mac: ```sh curl -fsSLO https://orbgem.com/apple-notes.applescript osascript apple-notes.applescript "Folder name" > notes.json # every folder when no name is given ``` It prints a JSON array of `{ title, body, created, folder }`: send them to `import_notes` with `format: "html"`, each `created` as it is and its folder as a tag. The first run asks the person to let the terminal control Notes. A locked note is left out. Without MCP: zip Markdown, HTML or text files (a folder of notes kept by another app) and send the zip, at most 60 MB and 300 imports an hour, to `https://orbgem.com/api/import` as the request's body, with the token and `x-orbgem: 1`. Nothing is overwritten; what was not imported is named with the reason. ## Open the app To show the person their orb without a password: `open_app`, or `POST https://orbgem.com/api/auth/handoff` with the token and `x-orbgem: 1` (body `{ "open": "#note?file=" }` to land on a note, the path a tool answered with, such as `welcome.md`), answers 201 `{ "url", "expires" }`, `expires` in milliseconds since 1970 (UTC). Open the URL (`open ` on a Mac) or give it to the person. It works once, for two minutes. The sign-in it makes lasts a day and cannot change their password, billing or tokens; asked for through MCP, it keeps sealed values shut as the connection does. ## The shell ```sh curl -fsSL https://orbgem.com/install | sh ``` It installs shell functions in one file and edits no profile. `orb_login` saves the token (it prompts, so it stays out of history); `orb "text"` adds a timestamped entry to today's note; `orb_last` captures the command just run; `orb_find "words"` searches; `orb_show ` prints a note; `orb_today` prints today's note; `orb_ask "question"` asks Onyx. ## Limits and what unlocks them - Made by an AI, before the person clicks the mail's link: 200 notes, 5 MB of text, 1 token, no Onyx questions, no public links, shared notes, daily digest, invitations or alert webhooks; deleted after 7 days. - Solo, $0, once confirmed: 1,000 notes across up to 3 orbs, 2 tokens, 10 Onyx questions a day. - Sync, $8 per user / month: unlimited notes in up to 25 orbs, 25 tokens, Ask with no daily limit, teams and alert webhooks. The person upgrades in Settings; you cannot. ## Rules Read a note before changing it, change only what was asked, and prefer appending or a small edit to rewriting: every change keeps the text it replaced in the note's History, where the person can see it and bring it back. A report that needs a chart, a diagram or a layout Markdown cannot draw may hold a fenced block whose info string is `html preview`: Orbgem draws its HTML live in a sandboxed frame styled like the app (use var(--bg), var(--surface), var(--line), var(--text), var(--muted), var(--accent), var(--highlight), var(--danger), var(--font-sans), var(--font-mono); inline SVG and scripts work; a library may come from cdn. Change only the orb the person gave you. Tell the person what you did, with [[Title]] links to the notes you made.