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

# A customer's working memory

> The agents' working states about one customer, as the Console shows them: size, version and dates, never the content.



## OpenAPI

````yaml openapi/en/cell.json GET /v1/profiles/{profile_id}/agent-state
openapi: 3.1.0
info:
  title: Niadra data API
  version: '1'
  description: >-
    Writing, context, history, objects, identity, privacy and governance of one
    space. Every space has a stable address, with the space and the region in
    its name.
servers:
  - url: https://{space}.{region}.api.niadra.com
    variables:
      space:
        default: acme-prod
        description: The space, which comes in the source key.
      region:
        default: us-east-2
        description: The region of the space, which also comes in the key.
security: []
paths:
  /v1/profiles/{profile_id}/agent-state:
    get:
      tags:
        - state
      summary: A customer's working memory
      description: >-
        The customer's working states, as the Console shows them: size, version
        and dates, never the

        content.


        **Authentication.** Console person token with the `security`, `review`,
        `analysis`, `integration` role (or admin), or a source key with the
        `admin` scope. It answers only in a space with the `agent_state` feature
        on (the `features` document); in a space without it, 404.
      operationId: profile_agent_states_v1_profiles__profile_id__agent_state_get
      parameters:
        - in: path
          name: profile_id
          required: true
          schema:
            format: uuid
            title: Profile Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentStateMetaPage'
          description: Successful Response
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - sourceKey: []
        - personToken: []
components:
  schemas:
    AgentStateMetaPage:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/AgentStateMeta'
          title: Items
          type: array
      required:
        - items
      title: AgentStateMetaPage
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object
    AgentStateMeta:
      additionalProperties: false
      description: >-
        One working state of a customer, as the Console shows it: never its
        content.
      properties:
        agent:
          maxLength: 256
          minLength: 1
          title: Agent
          type: string
        bytes:
          description: The size of the state's body.
          title: Bytes
          type: integer
        schema_version:
          anyOf:
            - maxLength: 256
              minLength: 1
              type: string
            - type: 'null'
          title: Schema Version
        scope_kind:
          enum:
            - conversation
            - task
            - object
            - subject
          title: Scope Kind
          type: string
        source_id:
          maxLength: 512
          minLength: 1
          title: Source Id
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
        valid_until:
          format: date-time
          title: Valid Until
          type: string
        version:
          title: Version
          type: integer
      required:
        - agent
        - scope_kind
        - source_id
        - bytes
        - version
        - updated_at
        - valid_until
      title: AgentStateMeta
      type: object
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````