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

# Create memories

> Create one memory, or a batch of up to 100 via `{ "memories": [...] }`. Commits by default; pass `apply: false` to stage a delta.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/memories
openapi: 3.1.0
info:
  title: Penumbra Platform API
  version: 1.0.0
  description: >-
    The Penumbra /v1 REST surface. Developer-intent nouns (memories, documents,
    submissions, connections, preflight, bridge) over a typed, governed
    knowledge graph. Every write stages through a reviewable delta; verdicts are
    dispositions and findings, never scores.
servers:
  - url: https://pnbr.io
security:
  - bearerAuth: []
tags:
  - name: Memories
    description: Store and recall agent memory as first-class REST.
  - name: Documents
    description: Add and search documents over the source/file substrate.
  - name: Submissions
    description: A generic capture door for app events, forms, and payloads.
  - name: Search
    description: Hybrid, graph, and retrieval search.
  - name: Ontology & Shapes
    description: Read the active ontology, types, and shapes.
  - name: Deltas
    description: 'The governed-write primitive: stage, plan, apply, revert.'
  - name: Graph
    description: >-
      Direct reads of the typed graph: nodes, edges, and counts. Scope:
      graph:read.
  - name: Extraction
    description: Coerce source material into typed entities through a shape.
  - name: Context & Slices
    description: >-
      Author reusable context scopes (slices) and compile them into context. A
      slice is a saved scope; the context verbs act on a scope or a saved slice.
  - name: Preflight
    description: >-
      Read-only decision-quality verdicts: is the graph fit to act on?
      Disposition plus findings, never a score.
  - name: Loops
    description: Bounded agentic extraction and hydration loops over your context.
  - name: Connections
    description: Headless integration connect for token-paste platforms.
  - name: Bridge
    description: Map an external API's type system onto your ontology.
paths:
  /v1/memories:
    post:
      tags:
        - Memories
      summary: Create memories
      description: >-
        Create one memory, or a batch of up to 100 via `{ "memories": [...] }`.
        Commits by default; pass `apply: false` to stage a delta.
      operationId: createMemories
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - content
              properties:
                content:
                  type: string
                  description: The memory text (required).
                kind:
                  type: string
                  enum:
                    - preference
                    - decision
                    - fact
                    - lesson
                    - observation
                    - signal
                scope:
                  type: string
                  enum:
                    - agent
                    - commons
                    - project
                subject:
                  type: object
                  additionalProperties: true
                source_context:
                  type: string
                forget_after:
                  type: string
                  format: date-time
                  description: 'Time-bound memory: recallable until this timestamp.'
                forget_reason:
                  type: string
                shape_id:
                  type: string
                project_id:
                  type: string
                apply:
                  type: boolean
                  default: true
                memories:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  description: Batch form (1-100). Omit for a single memory.
            examples:
              single:
                summary: One memory, committed
                value:
                  content: Enterprise buyers stall on procurement, not price.
                  kind: observation
                  project_id: 9142fa4d-7aad-4a1b-8f99-b522fd37518d
              staged:
                summary: Stage without committing (apply:false)
                value:
                  content: 'Renewal risk: champion left in Q2.'
                  kind: signal
                  project_id: 9142fa4d-7aad-4a1b-8f99-b522fd37518d
                  apply: false
              batch:
                summary: Batch up to 100
                value:
                  project_id: 9142fa4d-7aad-4a1b-8f99-b522fd37518d
                  memories:
                    - content: ACME prefers async demos.
                      kind: preference
                    - content: Chose Postgres over Mongo for the pilot.
                      kind: decision
      responses:
        '201':
          description: Applied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteReceipt'
              example:
                id: 92e22e9e-ace5-4f88-9972-a2b099f313b1
                status: applied
                project_id: 9142fa4d-7aad-4a1b-8f99-b522fd37518d
                delta_id: ad281004-a2bc-43a8-8fa0-cf8671e7d97b
                applied: true
                memories:
                  - id: 92e22e9e-ace5-4f88-9972-a2b099f313b1
                    delta_entity_id: 92e22e9e-ace5-4f88-9972-a2b099f313b1
                    content: Enterprise buyers stall on procurement, not price.
                    name: Enterprise buyers stall on procurement, not price.
                    status: applied
                shape_id: ebe174d1-f979-4cc9-80c2-4ddfb09228fb
                request_id: 71322b3f-2090-413d-a16b-2466d0dc17de
        '202':
          description: Staged (apply:false)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteReceipt'
              example:
                id: null
                status: staged
                project_id: 9142fa4d-7aad-4a1b-8f99-b522fd37518d
                delta_id: 13e34994-f8ff-415c-b053-c1b9128d4214
                applied: false
                memories:
                  - id: null
                    delta_entity_id: 43c9624c-b4ed-4702-9f25-7f3b541efebe
                    content: 'Renewal risk: champion left in Q2.'
                    name: 'Renewal risk: champion left in Q2.'
                    status: staged
                shape_id: ebe174d1-f979-4cc9-80c2-4ddfb09228fb
                request_id: ba657185-d154-4c01-81a9-91e3be6ff530
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WriteReceipt:
      type: object
      description: >-
        Returned by governed writes. `status` is `applied` (committed) or
        `staged` (apply:false). Descend via `delta_id`.
      properties:
        id:
          type: string
          nullable: true
        status:
          type: string
          enum:
            - applied
            - staged
            - failed
        project_id:
          type: string
        delta_id:
          type: string
        applied:
          type: boolean
        request_id:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        request_id:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A `pnbr-` API key. Project-scoped keys make `project_id` implicit;
        org-scoped keys require it.

````