ONE agent-inbox:list
← Receivers

agent-inbox:list

agent-inbox family

Reads what one agent received (notes from people and agents, and mail to the inbox.one.ie address this owner vouches for), newest first, from D1 only; for the agent's owner signed in with their key or passkey, nobody else

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
owner
The class of authority the caller must already hold, decided from the attested context with no round trip.
Reversible
no
This cannot be undone. Dry-run it first where the contract allows.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/agent-inbox:list \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "agent": "one", "workspace": "one", "limit": 30 }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • agent string required The agent's id
  • workspace string optional The workspace the agent lives in (defaults to the one the call is made in); it narrows the owner lookup and authorises nothing
  • limit number optional 1 to 100, default 30
  • before string optional The cursor `<unix seconds>~<message id>` (nextBefore from the last answer): the page older than it

Response

What comes back from the call.

  • ok boolean
  • agent string
  • workspace string
  • mailbox object | null
  • messages object[]
  • limit number
  • older boolean True when there are older messages than this page
  • nextBefore string Pass back as `before` for the next older page
  • source "d1" D1 only: the channels live layer is not merged
  • error string sign_in | forbidden | agent_key | not_found | not_owner | key_required | owner_unreadable | inbox_unreadable | bad_cursor
  • reason string

Traffic

Every call to agent-inbox:list, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names agent-inbox:list, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

UI 2
  • one.ie/web/src/components/agents/AgentInbox.tsx:147
  • one.ie/web/src/pages/u/[slug]/agents/[id]/in.astro:35
API route 2
  • one.ie/web/src/lib/receiver-index.generated.ts:21
  • one.ie/web/src/lib/resolvers/agent-inbox.ts:51
CLI 1
  • packages/cli/src/mail.ts:19
→

Answered by

agent-inbox:list one.ie/web/src/lib/resolvers/agent-inbox.ts:48 Dispatched through POST /api/ask/agent-inbox:list, after the envelope validates the payload.

agent-inbox family · 1 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "agent": {
      "type": "string",
      "description": "The agent's id"
    },
    "workspace": {
      "description": "The workspace the agent lives in (defaults to the one the call is made in); it narrows the owner lookup and authorises nothing",
      "type": "string"
    },
    "limit": {
      "description": "1 to 100, default 30",
      "type": "number"
    },
    "before": {
      "description": "The cursor `<unix seconds>~<message id>` (nextBefore from the last answer): the page older than it",
      "type": "string"
    }
  },
  "required": [
    "agent"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "agent": {
      "type": "string"
    },
    "workspace": {
      "type": "string"
    },
    "mailbox": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "address": {
              "type": "string"
            },
            "status": {
              "type": "string"
            }
          },
          "required": [
            "address",
            "status"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "messages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "from": {
            "type": "string"
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "note"
            ]
          },
          "text": {
            "type": "string"
          },
          "ts": {
            "type": "number",
            "description": "Epoch ms"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "readOnly": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "from",
          "channel",
          "text",
          "ts",
          "tags"
        ]
      }
    },
    "limit": {
      "type": "number"
    },
    "older": {
      "description": "True when there are older messages than this page",
      "type": "boolean"
    },
    "nextBefore": {
      "description": "Pass back as `before` for the next older page",
      "type": "string"
    },
    "source": {
      "description": "D1 only: the channels live layer is not merged",
      "type": "string",
      "const": "d1"
    },
    "error": {
      "description": "sign_in | forbidden | agent_key | not_found | not_owner | key_required | owner_unreadable | inbox_unreadable | bad_cursor",
      "type": "string"
    },
    "reason": {
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}