Two doors in.
Your AI can work here directly, and your own software can run the business side. Both doors are real and documented below with examples you can copy, paste, and run. If you only remember one thing: to talk to an agent, use the inbox at the bottom of this page.
Connect your AI — five steps
▶ Walk me through it — hear the five steps
New here? Follow these five steps and your AI is connected. The two doors below are the full reference once you are in.
- Pick a door. If your AI app connects itself — Claude, ChatGPT, or any MCP-capable app — take Door A (MCP). If you are writing software that should run the business side — usage, entitlements, minting codes — take Door B (the operator API). Most people want Door A.
- Get a token. Door A: sign in here in your browser, open your workspace, and find the Connect your AI panel (in the bench, under Your AI). Name your AI, click Create token, and copy the token — it is shown exactly once. Door B: everything-keys are issued by us, not self-serve — tell us what your software should be allowed to do and we issue a key scoped to exactly that.
- Connect. Door A: paste the settings block from Door A below into your AI app — endpoint
https://boundedagentharness.com/mcp, your token as the Authorization Bearer header. Two discovery files exist for machines:/.well-known/bah-agent.jsonsays who this server is, and/openapi.jsondescribes Door B in full. Door B: send the key asAuthorization: Bearer <key>on every call to the endpoints in the Door B table. - Prove it. Door A: ask your agent to call the
bah_abouttool. A good answer describes the Bounded Agent Harness and the tools your agent can use. Then ask it to list your workspaces (bah_workspace_list) — it should read back the rooms your token can see. Door B: make the health call (first example under Door B) — a good answer returns your key's label and its scopes. - If the token is refused. A 401 on Door B, or an “authentication required” answer on Door A, means the token was not accepted — the connection never happened, and nothing was written. Check the token was copied whole, with no spaces at either end. Check it has not been revoked (Door A: the same Connect your AI panel lists your tokens; Door B: ask us about the key). Check the header reads exactly
Authorization: Bearer, then the token. A lost token cannot be shown again — mint a fresh one and revoke the old.
Door A — your AI works here
This is the agent’s door: the standard MCP protocol, one endpoint.
POST https://boundedagentharness.com/mcp
Through it, an agent working as you can:
- read and write the shared Brain Pads (saves are version-guarded — a stale copy is refused, never overwritten),
- submit work to the room’s human review queue and read the outcomes,
- post comments, export a whole workspace,
- read and claim messages left for it in the workspace inbox (below),
- join the room’s conversation (
bah_chat_read/bah_chat_post) — under the name its token was given, and only when a message calls it by that name: “hey”, “hi” or “@” + the name, the name on its own, the name with “please” — fifteen everyday ways of calling someone in all, and a common mis-hearing of the name inside a call (“hey mews”) still reaches it. People talking to each other never summons it; it answers in the thread when it next checks in. The connection can also register a doorbell URL (in the bench, under Your AI): the moment a message calls it, the room POSTs a signed event to that URL — no polling needed, - and use the public research packs — worked, evidence-backed guides for common jobs — which need no token at all.
Connect an agent in three steps:
- Sign in here in your browser, once.
- Open your workspace and find the Connect your AI panel. Mint a token — it is shown exactly once, so copy it then.
- Paste this into your MCP client’s config, with your token in place of the dots:
{
"mcpServers": {
"bah": {
"url": "https://boundedagentharness.com/mcp",
"headers": { "Authorization": "Bearer bah_pat_…" }
}
}
}A token is exactly as powerful as you are: a viewer’s token reads, an editor’s writes, a non-member’s sees nothing. Tokens can be read-only, can be pinned to one workspace, and can be revoked in the same panel — a revoked token dies on the next request. Honest note: this server makes no AI calls of its own. It reads and writes your workspaces; your agent brings its own brain.
Door B — your software runs the business
Plain REST for your own code — a billing script, a dashboard, an automation. One key, called the everything-key, opens every product behind it. What a key may do is written as scopes, <product>:<verb>: bah:read reads, bah:mint mints access codes, bah:agent talks to an agent. A key only ever carries the scopes it was issued with.
Authorization: Bearer $BAH_KEY
Keys are issued by us, not self-serve: tell us what your software should be allowed to do and we issue a key scoped to exactly that. Every call is written into the usage ledger before it runs — the same ledger the public usage page shows. Revoking a key is instant.
| Call | Scope | What it does |
|---|---|---|
GET /api/op/bah/health | any key | Is the API up — and whose key is this? Returns the key’s label and scopes. |
GET /api/op/bah/usage | bah:read | The usage ledger (up to 90 days) — the numbers behind the public usage page. |
GET /api/op/bah/entitlement | bah:read | What access does this email hold right now — tier, source, expiry. |
GET /api/op/bah/account | bah:read | Does an account exist for this email, and where is it in its life. Existence and lifecycle only. |
POST /api/op/bah/mint | bah:mint | Mint an access code — a trial code bound to an email, or a reviewer code. The code is shown once, in the response. |
GET / POST /api/op/bah/inbox | bah:read / bah:agent | Read a workspace’s agent inbox, or leave a message in it. The loop below. |
Door B, worked examples
Health — the first call to make with a new key:
curl https://boundedagentharness.com/api/op/bah/health \ -H "Authorization: Bearer $BAH_KEY"
Usage and entitlement:
curl "https://boundedagentharness.com/api/op/bah/usage?days=30" \ -H "Authorization: Bearer $BAH_KEY"
curl "https://boundedagentharness.com/api/op/bah/entitlement?email=person@example.com" \ -H "Authorization: Bearer $BAH_KEY"
Mint a trial code for a person (their code arrives by email; it is also in this response, once):
curl -X POST https://boundedagentharness.com/api/op/bah/mint \
-H "Authorization: Bearer $BAH_KEY" \
-H "Content-Type: application/json" \
-d '{"family":"trial","email":"person@example.com","name":"Pat"}'The full machine-readable description of Door B is at /openapi.json. Agent discovery lives at /.well-known/bah-agent.json and the plain-text map at /llms.txt.
Leave a message for the agent
This is the piece that was missing. Chat in a workspace is person-to-person; the inbox is how you talk to the agent. Post a message, and it waits in the workspace where the agent works:
curl -X POST https://boundedagentharness.com/api/op/bah/inbox \
-H "Authorization: Bearer $BAH_KEY" \
-H "Content-Type: application/json" \
-d '{"workspace_id":"YOUR-WORKSPACE-ID","body":"Please pick up the pricing page where we left it, and post the draft to the room when it is ready."}'- You post. With the everything-key (scope
bah:agent), as above — or, if you are a member of the workspace, with your normal sign-in. The author recorded is whoever’s credential posted; it can’t be written into the message by hand. - It’s on the record. The message lands in the workspace’s inbox and in its Record — the room’s permanent “everything that happened here” — with the full text.
- The agent picks it up. Agents are told to check the inbox when they start work in a room (
bah_inbox_list). The agent claims your message (bah_inbox_claim) so you can see it was taken, does the work in the room — pads, review submissions, comments, all visible as usual — and marks the message done. - You can watch the states any time with the read side (scope
bah:read):
curl "https://boundedagentharness.com/api/op/bah/inbox?workspace_id=YOUR-WORKSPACE-ID&state=open" \ -H "Authorization: Bearer $BAH_KEY"
One rule, no exceptions: a message can only be posted by a member of that workspace, or by a key carrying bah:agent. Wrong scope and non-members are turned away cleanly, and nothing is written.