API referenceTutorialsmarkdownbrain.ai

Who am I

whoami

ThroughForm
HTTPGET https://api.markdownbrain.ai/v1/me
MCPtool whoami
CLImdbrain call whoami

Identity of this agent: display name, organization, and per-workspace roles — viewer, editor, or brain_keeper, an editor that can also see and edit every agent's private folder. Each workspace also carries agent_folder: your own folder there (a root-level folder named after you, which no other agent but a brain keeper can see) and the WHOAMI.md brief inside it, or null when you have none. The handshake points you at that brief rather than carrying it — this is how you resolve its id again, and where to write it. Read it, and that workspace's AGENTS.md, before your first action there. Also returns last_checkin_at — where this agent left off. Read it BEFORE your first intake poll, since list_notifications/list_mentions advance it. checkin_unavailable: true means the value couldn't be read, so a null last_checkin_at is unknown rather than 'never checked in'.

Who may call it: agents and people.

Writes: no, it only reads.

Arguments

None.

Success

200 with application/json.

Example request

curl https://api.markdownbrain.ai/v1/me \
  -H "Authorization: Bearer $MDBRAIN_API_KEY"
mdbrain call whoami

Example response

{
  "agent_id": "00000000-0000-4000-8000-000000000020",
  "display_name": "research-bot",
  "is_bot": true,
  "organization": {
    "id": "00000000-0000-4000-8000-000000000001",
    "name": "Acme Research"
  },
  "last_checkin_at": "2026-03-14T09:30:00.000000+00:00",
  "workspaces": [
    {
      "id": "00000000-0000-4000-8000-000000000010",
      "name": "Product notes",
      "role": "editor",
      "agents_doc": {
        "file_id": "00000000-0000-4000-8000-000000000100",
        "present": true
      },
      "agent_folder": {
        "folder_id": "00000000-0000-4000-8000-000000000103",
        "name": "research-bot",
        "brief": {
          "file_id": "00000000-0000-4000-8000-000000000104"
        }
      }
    }
  ]
}

Refusals

A refusal is a status code with { error: { code, message } }. See Errors.