> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hookie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List a project's Brain reads

> What agents and people read from this project's brain (#686), on every plan. Kept for the plan's Brain history retention (Free 7 days, Starter 30, Pro 90, Team and Ultimate 365). Owners and admins see every read; anyone else sees only their own and their agents' (an agent is held to its grant, so it sees every read only at hookie:manage). A project hidden from the caller never shows; a caller with hidden projects (or an agent pinned to some) sees no read with no project, and of each read only the items of projects they can see. The list and the export take the same filters, so a file holds exactly the rows on screen.



## OpenAPI

````yaml /openapi.json get /admin/api/projects/{project_id}/brain/reads
openapi: 3.1.0
info:
  title: Hookie API
  version: 1.0.0
  summary: Capture, route and deliver webhooks.
  description: >-
    Hookie exposes three HTTP surfaces.


    **Ingest + streaming** is the public plane. A path-form endpoint URL
    authenticates by its own high-entropy slug — there is no key, token or
    cookie — and an `ik_live_…` ingest key authenticates the `/v1/*` routes. An
    endpoint URL files each payload into the endpoint's own dataset through the
    endpoint's own criteria and mappings (none means the whole payload, as one
    record); `/v1/ingest/{ingest_key}/{dataset}` stores the payload whole into
    the named dataset. Project mapping rules are evaluated on exactly one shape,
    `POST /v1/ingest/{ingest_key}` with no dataset segment, and never on an
    endpoint URL.


    **The customer portal API** is a separate, token-authed surface for your end
    customers, scoped to one portal and one customer.


    **The admin API** drives the console. It accepts either a browser session or
    an OAuth bearer token from a connected coding agent — the same routes, the
    same validation, the same audit trail. An agent's authority is its user's
    workspace role narrowed to the scopes granted in the console. It also
    accepts an **admin API key** (`hk_…`, Settings → API keys) for CI,
    infrastructure-as-code and vendor backends: the key acts as the member who
    created it, capped at the key's role (viewer, developer or admin — never
    billing or platform administration), optionally limited to one project, with
    an optional expiry and IP allowlist. Keys are stored as a SHA-256 hash and
    shown once; if their creator leaves the workspace they stop working. The
    same key works on the hosted MCP server at `/mcp`.


    **A refused agent is told how to proceed.** An agent's grant is one rung of
    a ladder — `hookie:read` < `hookie:write` < `hookie:manage` — and a call
    above it answers 403 with `code: "agent_scope_insufficient"`, the
    `required_scope`, the `granted_scopes` and a `manage_url` to the console
    page where its user widens it. When the user's own role is the limit the
    code is `insufficient_role` and there is no link, because no grant can
    exceed the user; billing, platform admin, managing connected agents and
    destination signing secrets answer `agent_not_permitted` at every scope. A
    human in the console still reads `Insufficient role`.


    **A suspended workspace** (an operator action, for abuse or non-payment)
    answers every surface with 403 and `reason: "workspace_suspended"`: ingest
    (endpoint URLs and ingest keys), `/v1/data` and `/v1/stream` refuse before
    anything is stored or counted, and every admin API write — console, OAuth
    agent or hosted MCP alike — is refused except billing, platform admin,
    connected-agent management, revoking an API key, revoking an invite,
    removing a member or leaving, accepting an invite to another workspace,
    switching workspaces and the POST-bodied searches. The customer portal API
    is read-only in the same way: destination writes answer 403
    `workspace_suspended`. Reads keep working. Nothing is sent while it is
    suspended: pending deliveries are paused, workflow runs already under way
    are paused, open `/v1/stream` connections are closed, and cron triggers,
    database sources and WebSocket listeners stop. Reinstating sends the paused
    deliveries, resumes the paused workflow runs where they stopped, and resumes
    the rest; no stored data is lost.


    **Rate limits.** `/admin/api/*` and `/mcp` allow about 100 requests every 10
    seconds per credential — per API key, per connected agent, or per signed-in
    person. Over that, the answer is 429 with `Retry-After` (seconds). Like
    every burst limit here, ingest's included, it is a best-effort guard rather
    than an exact count: it is counted separately at each Cloudflare location
    and catches up within seconds, so a short burst can get through above it.
    The monthly event quota is the exact count.


    **Idempotency.** A `POST` to `/admin/api/*` may carry an `Idempotency-Key`
    header (1–255 printable characters, e.g. a UUID). The first request runs and
    its response is stored for 24 hours. A retry with the same key, credential,
    access scope, path, query string and body returns the stored response with
    `Idempotent-Replayed: true`. A mismatch returns 422 and retains the original
    receipt. Check the original operation before issuing a new key. Only an
    unrestricted workspace owner using a console session can replay a workspace
    receipt created before scope tracking. An in-progress retry returns 409.
    Server errors are not stored. POST requests under `/admin/api/api-keys`,
    `/admin/api/invites` and `/admin/api/mfa` refuse the header. Workspace
    creation uses a durable per-person `request_id`. If an `Idempotency-Key` is
    sent to `POST /admin/api/workspaces`, it must match that UUID.


    **Versioning.** Every `/admin/api/*` and `/mcp` response carries
    `Hookie-Version` (currently `2026-09-29`). Additive changes — a new route, a
    new response field, a new optional parameter — ship under the current
    version, so clients must ignore fields they do not know. A breaking change
    gets a new dated version, announced in the changelog, and the previous
    version stays available for at least 12 months; a client pins one by sending
    `Hookie-Version` on its requests. A version this deployment does not serve
    is refused with 400 and the list of `supported_versions`.


    **Agent self-registration.** An AI agent can create its own account with no
    person involved (#331): `GET /v1/agents/register/challenge` returns a signed
    proof-of-work challenge, and `POST /v1/agents/register` with the solution,
    the agent's name, an optional operator contact and `accept_terms` set to the
    current Terms version creates a WorkOS identity for the agent, a workspace
    on the Free plan with its Default project, and an admin API key (`hk_…`,
    role admin) returned once, with a one-time claim token a person uses later
    to take ownership (`POST /admin/api/agent-accounts/claim`). The key works on
    `/admin/api/*`, on the hosted MCP server at `/mcp` and with the CLI
    (`HOOKIE_TOKEN`). Until a person claims the workspace, billing, SSO and
    organization requests, invites, Google Workspace linking and creating more
    API keys are refused to it (`agent_not_permitted`), and Free-plan quotas
    apply in full. The registration is rate limited per IP (an IPv6 address by
    its /64), capped per day across the platform with no one network taking more
    than a tenth of the cap, asks for more proof of work as the day's cap fills,
    and can be switched off by the operator.


    **Request limits (#450).** Admin API mutating request bodies (methods other
    than GET and HEAD) and hosted MCP request bodies are limited to 1 MiB,
    measured from the stream whether or not `Content-Length` is sent. HTTP 413
    means reduce the body before retrying. The hosted MCP accepts legacy
    JSON-RPC batches of at most 20 messages; an over-limit batch returns HTTP
    400 with JSON-RPC error `-32600`, so split it into smaller batches. Other
    HTTP 400 responses are malformed or invalid requests and should be
    corrected, not retried unchanged. The hosted MCP transport is not modeled as
    an OpenAPI path.


    This document is generated from the request handlers and adversarially
    verified against them.
  contact:
    name: Hookie
    url: https://hookie.ai
  license:
    name: Proprietary
    url: https://hookie.ai/legal/terms
servers:
  - url: https://app.hookie.ai
    description: Production
security: []
tags:
  - name: Ingest
    description: Send events to Hookie.
  - name: Streaming
    description: Tail events in real time over SSE or WebSocket.
  - name: Portal
    description: Token-authed surface for your end customers.
  - name: Projects
    description: Projects and their settings.
  - name: Routing
    description: Rules, endpoints, datasets and records.
  - name: Delivery
    description: Destinations, deliveries and replay.
  - name: Workflows
    description: Multi-step workflows, triggers and AI agents.
  - name: Observability
    description: Search, correlation, stats and the audit log.
  - name: Workspace
    description: >-
      The workspace itself: its name and slug, its members and their roles,
      shareable-link invites, ownership transfer, the switcher between the
      workspaces a person belongs to, admin API keys, data export and closure.
  - name: Data API
    description: >-
      Read-only access to the datasets and columns a project exposes, with
      per-project keys.
  - name: Broadcast Logs
    description: >-
      Forward a project's logs and traces over OTLP/HTTP (JSON) to Datadog,
      Grafana Cloud, an OpenTelemetry Collector, PostHog or Sentry.
  - name: Status
    description: >-
      Whether the API can answer at all: the public health check that
      hookie.ai/status reads.
  - name: Agents
    description: >-
      Agent self-registration (#331): an AI agent creates its own Hookie
      account, with no person involved, and gets an admin API key for the admin
      API, the hosted MCP server and the CLI. The account starts on the Free
      plan; a person can later claim it with the one-time claim token. See
      docs.hookie.ai → Agents and the design note
      docs/design/agent-self-registration.md.
  - name: Knowledge graph
    description: >-
      Dedicated workspace knowledge, bounded agent context, asynchronous
      mutations and execution lineage.
paths:
  /admin/api/projects/{project_id}/brain/reads:
    get:
      tags:
        - Projects
      summary: List a project's Brain reads
      description: >-
        What agents and people read from this project's brain (#686), on every
        plan. Kept for the plan's Brain history retention (Free 7 days, Starter
        30, Pro 90, Team and Ultimate 365). Owners and admins see every read;
        anyone else sees only their own and their agents' (an agent is held to
        its grant, so it sees every read only at hookie:manage). A project
        hidden from the caller never shows; a caller with hidden projects (or an
        agent pinned to some) sees no read with no project, and of each read
        only the items of projects they can see. The list and the export take
        the same filters, so a file holds exactly the rows on screen.
      operationId: listProjectBrainReads
      parameters:
        - name: project_id
          in: path
          required: true
          description: Project id (UUID) belonging to the caller workspace.
          schema:
            type: string
        - name: agent
          in: query
          schema:
            type: string
          description: >-
            One reader's credential: session, oauth:<client id>, api_key:<id> or
            oauth:workos_registration:<id>.
        - name: user
          in: query
          schema:
            type: string
          description: >-
            One person's user id (their reads and their agents'). With agent,
            that person's copy of the agent: one client id can be several
            people's agents.
        - name: kind
          in: query
          schema:
            type: string
            enum:
              - agents
              - people
              - all
          description: agents, people or all (the default).
        - name: operation
          in: query
          schema:
            type: string
            enum:
              - knowledge
              - search
              - context
              - document_get
              - document_content
              - document_version
              - workspace_search
              - memory_get
              - memory_search
              - graph_context
          description: One kind of read.
        - name: document
          in: query
          schema:
            type: string
          description: Only reads that returned this document id.
        - name: q
          in: query
          schema:
            type: string
          description: Part of the query text.
        - name: since
          in: query
          schema:
            type: string
            format: date-time
          description: ISO 8601 time, inclusive.
        - name: until
          in: query
          schema:
            type: string
            format: date-time
          description: ISO 8601 time, inclusive.
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
          description: 1 to 100 (default 25).
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
          description: Rows to skip.
        - name: format
          in: query
          schema:
            type: string
            enum:
              - csv
              - json
          description: >-
            csv or json downloads every matching row (up to 10,000) as a file:
            owner/admin only, and audited as export_brain_reads.
      responses:
        '200':
          description: >-
            Newest first. With format=csv the body is a text/csv attachment
            (brain-reads-<date>.csv) whose items column reads name (id); name
            (id). With format=json it is an attachment holding {reads}.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    required:
                      - reads
                      - total
                      - limit
                      - offset
                    properties:
                      reads:
                        type: array
                        items:
                          $ref: '#/components/schemas/BrainRead'
                      total:
                        type: integer
                      limit:
                        type: integer
                      offset:
                        type: integer
                    description: The paged list (no format).
                  - type: object
                    description: >-
                      format=json: the export file, every matching row (up to
                      10,000) with no paging fields.
                    required:
                      - reads
                    properties:
                      reads:
                        type: array
                        items:
                          $ref: '#/components/schemas/BrainRead'
            text/csv:
              schema:
                type: string
        '400':
          description: Invalid input
        '403':
          description: Plan, role, or project scope does not allow this operation
        '404':
          description: Resource not found in this workspace
components:
  schemas:
    BrainRead:
      type: object
      description: >-
        One read from the Brain (#686): who read, how, the query and the ids and
        titles it returned. Never a document body, passage text, memory content
        or node properties.
      required:
        - id
        - at
        - project_id
        - user_id
        - actor_kind
        - credential
        - via
        - operation
        - items
        - item_count
        - status
      properties:
        id:
          type: string
        at:
          type: string
          format: date-time
        project_id:
          type:
            - string
            - 'null'
          description: null for a read of the workspace Brain.
        project_name:
          type:
            - string
            - 'null'
        user_id:
          type: string
          description: The person. An agent or API key reads for this person.
        user_email:
          type:
            - string
            - 'null'
        actor_kind:
          type: string
          enum:
            - person
            - oauth_agent
            - api_key
            - agent_registration
            - agent_account
        credential:
          type: string
          description: >-
            session, oauth:<client id>, api_key:<id> or
            oauth:workos_registration:<id>.
        agent_name:
          type:
            - string
            - 'null'
          description: >-
            The agent's registered name, the API key's name, or its client id.
            null for a person.
        via:
          type: string
          enum:
            - console
            - api
            - mcp
        operation:
          type: string
          enum:
            - knowledge
            - search
            - context
            - document_get
            - document_content
            - document_version
            - workspace_search
            - memory_get
            - memory_search
            - graph_context
        query:
          type:
            - string
            - 'null'
          description: >-
            At most 500 characters; [withheld: looks like a credential] when it
            looked like one.
        items:
          type: array
          maxItems: 50
          items:
            type: object
            required:
              - k
              - id
            properties:
              k:
                type: string
                enum:
                  - doc
                  - memory
                  - node
                  - issue
                  - decision
              id:
                type: string
              name:
                type:
                  - string
                  - 'null'
                description: >-
                  The title. null for a private memory (its author's alone) and
                  a document that was not found.
              p:
                type:
                  - string
                  - 'null'
                description: >-
                  The item's project: an id, null for none (the workspace Brain,
                  a workspace memory), absent when unknown. A caller with hidden
                  projects is shown only items of projects they can see.
        item_count:
          type: integer
          description: How many were returned, even when items holds only the first 50.
        status:
          type: string
          enum:
            - ok
            - not_found

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.