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

# List the pinned memories this agent reads

> The pinned memories one run of this agent reads beside its custom instructions, chosen as the run chooses them: the memories for the agent's surface (`surface`), minus those limited to other agents. Every run reads the MSP-wide ones; pass `end_company_id` to add the ones a run on that company's ticket or session also reads. Order is the prompt's order, company memories first.

`block_chars` is the length of the pinned block before the prompt's cap, `block_char_cap`, and each memory's `chars_in_prompt` says how much of it the prompt holds: its length, fewer when the cap cuts it, 0 when it starts past the cap.

`reads_company_memories: false` means no run of this agent has a company in context (a scheduled Agent, an internal Chat Agent), so `end_company_id` is ignored. `reads_pinned_memories: false` means no run of this agent reads pinned memories: the workspace has memories off, or the Workflow has no Acknowledge, Triage, Dispatch or L1 action. A Workflow reads only memories not limited to agents, and a Chat Agent reads none on a turn from a person who is not a member of the workspace. Reached through Neo Support, this route sits in the Agent Memories permission group.



## OpenAPI

````yaml https://api.neoagent.io/public-api/openapi.json get /public-api/agents/{agent_id}/pinned-memories
openapi: 3.1.0
info:
  description: >-
    Neo's public contract for the dashboard ChatAgent, partner integrations, and
    MSP automation. Every response is wrapped in a `{data, meta}` envelope;
    errors use `{error: {code, message, details?}, meta: {request_id}}`.
    Authenticate with a `Bearer neo_sk_<env>_<secret>` API key (service account)
    or a Microsoft Entra ID JWT (dashboard user). Signed-URL endpoints (end-user
    feedback links) take a `signature` query parameter instead.
  title: Neo Public API
  version: 1.0.0
servers:
  - url: https://api.neoagent.io
security: []
tags:
  - description: Service metadata — health, OpenAPI.
    name: Meta
  - description: Agents and workflows — read, version history, delete, stats.
    name: Agents
  - description: Agent/workflow execution history, sub-resources, retry/cancel.
    name: Executions
  - description: >-
      Every tool call the tenant's agents made in the last 30 days, within the
      caller's workflow access.
    name: Audit Log
  - description: PSA webhook events and their workflow-match results.
    name: Callbacks
  - description: Technician-in-the-loop approval requests.
    name: TIL requests
  - description: RMM script executions triggered by agents.
    name: RMM scripts
  - description: Dispatch-agent field-update decisions.
    name: Dispatch
  - description: The authenticated tenant.
    name: Tenant
  - description: Agent-builder schema catalogs (raw JSON payloads).
    name: Schemas
  - description: Escalate to the Neo team (HubSpot ticket).
    name: Escalation
  - description: Tenant settings.
    name: Settings
  - description: Tenant API-key management (dashboard JWT only).
    name: API keys
  - description: End-user feedback links (signed-URL auth).
    name: Feedback
  - description: End-client companies (CRUD + bulk-update).
    name: End companies
  - description: Channels — bind a CONVERSATIONAL agent to a transport (Teams or Slack).
    name: Channels
  - description: PSA/RMM/M365 integration status and connection management.
    name: Integrations
  - description: Technician roster (controls TIL routing and paging).
    name: Technicians
  - description: Future runs queued for TRIGGERED agents.
    name: Scheduled work
  - description: Subscription state and customer-facing credit usage (no provider $).
    name: Billing
  - description: Inbox messages and announcements.
    name: Inbox & Comms
  - description: Tenant-authored agent skills (CRUD) and the built-in skill catalog.
    name: Skills
paths:
  /public-api/agents/{agent_id}/pinned-memories:
    get:
      tags:
        - Agents
        - Memories
      summary: List the pinned memories this agent reads
      description: >-
        The pinned memories one run of this agent reads beside its custom
        instructions, chosen as the run chooses them: the memories for the
        agent's surface (`surface`), minus those limited to other agents. Every
        run reads the MSP-wide ones; pass `end_company_id` to add the ones a run
        on that company's ticket or session also reads. Order is the prompt's
        order, company memories first.


        `block_chars` is the length of the pinned block before the prompt's cap,
        `block_char_cap`, and each memory's `chars_in_prompt` says how much of
        it the prompt holds: its length, fewer when the cap cuts it, 0 when it
        starts past the cap.


        `reads_company_memories: false` means no run of this agent has a company
        in context (a scheduled Agent, an internal Chat Agent), so
        `end_company_id` is ignored. `reads_pinned_memories: false` means no run
        of this agent reads pinned memories: the workspace has memories off, or
        the Workflow has no Acknowledge, Triage, Dispatch or L1 action. A
        Workflow reads only memories not limited to agents, and a Chat Agent
        reads none on a turn from a person who is not a member of the workspace.
        Reached through Neo Support, this route sits in the Agent Memories
        permission group.
      operationId: public_api.agents_pinned_memories_get
      parameters:
        - in: path
          name: agent_id
          required: true
          schema:
            type: string
        - description: >-
            The end-client company whose pinned memories to add: the `scope_id`
            of its company memories.
          in: query
          name: end_company_id
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/AgentPinnedMemories'
                  meta:
                    $ref: '#/components/schemas/SuccessMeta'
                required:
                  - data
                  - meta
                type: object
          description: Success.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Bad request — malformed input.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unauthenticated — missing or invalid credentials.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Forbidden — authenticated but not allowed.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Not found.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Conflict — the resource is in a state that blocks this operation.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Request validation failed.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Rate limited — see Retry-After.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Internal server error.
      security:
        - bearerAuth: []
components:
  schemas:
    AgentPinnedMemories:
      description: >-
        The pinned memories a run of this agent reads, in the order its prompt
        holds them.
      properties:
        agent_id:
          title: Agent Id
          type: integer
        block_char_cap:
          title: Block Char Cap
          type: integer
        block_chars:
          title: Block Chars
          type: integer
        end_company_id:
          anyOf:
            - type: string
            - type: 'null'
          title: End Company Id
        memories:
          items:
            $ref: '#/components/schemas/AgentPinnedMemory'
          title: Memories
          type: array
        reads_company_memories:
          title: Reads Company Memories
          type: boolean
        reads_pinned_memories:
          title: Reads Pinned Memories
          type: boolean
        surface:
          $ref: '#/components/schemas/MemoryAudience'
      required:
        - agent_id
        - surface
        - reads_pinned_memories
        - reads_company_memories
        - end_company_id
        - memories
        - block_chars
        - block_char_cap
      title: AgentPinnedMemories
      type: object
    SuccessMeta:
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        request_id:
          format: uuid
          type: string
        timings_ms:
          additionalProperties:
            type: number
          type: object
        warnings:
          description: >-
            Non-fatal warnings about the created/updated resource (e.g. an
            unhealthy PSA callback).
          items:
            type: string
          type: array
      required:
        - request_id
        - timings_ms
      type: object
    ErrorEnvelope:
      properties:
        error:
          properties:
            code:
              description: Stable machine-readable error code.
              type: string
            details:
              additionalProperties: true
              type: object
            message:
              type: string
          required:
            - code
            - message
          type: object
        meta:
          properties:
            request_id:
              format: uuid
              type:
                - string
                - 'null'
          type: object
      required:
        - error
        - meta
      type: object
    AgentPinnedMemory:
      properties:
        audiences:
          items:
            $ref: '#/components/schemas/MemoryAudience'
          title: Audiences
          type: array
        chars_in_prompt:
          title: Chars In Prompt
          type: integer
        content:
          title: Content
          type: string
        id:
          title: Id
          type: string
        limited_to_agents:
          title: Limited To Agents
          type: boolean
        pinned_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Pinned At
        scope_id:
          title: Scope Id
          type: string
        scope_type:
          $ref: '#/components/schemas/ScopeType'
      required:
        - id
        - scope_type
        - scope_id
        - content
        - audiences
        - limited_to_agents
        - pinned_at
        - chars_in_prompt
      title: AgentPinnedMemory
      type: object
    MemoryAudience:
      description: >-
        Which agent surface a memory targets: `ALL` (every surface),
        `TRIGGERED_SCHEDULED_AGENTS` (automation agents working tickets),
        `CHAT_AGENTS_INTERNAL` (technician-facing chat), or
        `CHAT_AGENTS_EXTERNAL` (end-user-facing chat).
      enum:
        - ALL
        - TRIGGERED_SCHEDULED_AGENTS
        - CHAT_AGENTS_INTERNAL
        - CHAT_AGENTS_EXTERNAL
      title: MemoryAudience
      type: string
    Pagination:
      properties:
        has_more:
          type: boolean
        next_cursor:
          type:
            - string
            - 'null'
      required:
        - next_cursor
        - has_more
      type: object
    ScopeType:
      description: >-
        What a memory is scoped to: `CLIENT` (facts about the MSP itself) or
        `END_CLIENT` (facts about one end-client company, keyed by its PSA
        company id).
      enum:
        - CLIENT
        - END_CLIENT
      title: ScopeType
      type: string
  securitySchemes:
    bearerAuth:
      description: >-
        `Authorization: Bearer <token>` where `<token>` is either a
        `neo_sk_<env>_<secret>` API key (service account) or a Microsoft Entra
        ID access token (dashboard user).
      scheme: bearer
      type: http

````

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