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

# Sync captured agent memory

> Capture-only upload of an agent's parsed memory. The server DIFFs each memory against prior captures by `content_hash`, embeds the new/changed ones, upserts them, then runs the dedup + contradiction funnel. Identical memories merge onto the existing belief; contradictions (and low-confidence matches) are returned in `conflicts` for resolution via `/memory/resolve`. Scoped to your API key's account.




## OpenAPI

````yaml /openapi.yaml post /memory/sync
openapi: 3.1.0
info:
  title: Versuno Public API
  description: >
    The Versuno Public API lets you manage AI assets, projects, and version
    history programmatically.


    All endpoints except key management require a Bearer API key in the
    `Authorization` header.

    API keys are formatted as
    `uk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`.
  version: 1.0.0
  contact:
    email: support@versuno.ai
servers:
  - url: https://versuno.ai/api/public
    description: Production
  - url: http://localhost:3000/api/public
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Verify API key validity and retrieve the caller's identity.
  - name: Teams
    description: Teams the authenticated user owns or is an active member of.
  - name: Assets
    description: AI assets — prompts, personas, contexts, system prompts, and skills.
  - name: Asset Trash
    description: Single-asset soft-delete, restore, and permanent delete lifecycle.
  - name: Bulk Asset Trash
    description: Bulk trash operations across multiple assets at once.
  - name: Projects
    description: Project folders for organising assets and teams.
  - name: Project Trash
    description: Project trash lifecycle — trashing deletes the entire subtree.
  - name: Versioning
    description: Full-snapshot version history with non-destructive revert support.
  - name: Public Brains
    description: >-
      Graph-based knowledge structures composed of containers (folders/groups)
      and nodes (content items). Read the graph, or run semantic RAG queries
      against it.
  - name: Memory
    description: >-
      The universal agent-memory layer. Capture coding-agent memory, recall it
      semantically, and resolve contradictions. Capture-only, scoped to your API
      key's account.
  - name: Key Management
    description: >-
      Create, update, and delete API keys. These endpoints do not require a
      Bearer token.
paths:
  /memory/sync:
    post:
      tags:
        - Memory
      summary: Sync captured agent memory
      description: >
        Capture-only upload of an agent's parsed memory. The server DIFFs each
        memory against prior captures by `content_hash`, embeds the new/changed
        ones, upserts them, then runs the dedup + contradiction funnel.
        Identical memories merge onto the existing belief; contradictions (and
        low-confidence matches) are returned in `conflicts` for resolution via
        `/memory/resolve`. Scoped to your API key's account.
      operationId: syncMemory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - source
                - memories
              properties:
                source:
                  type: string
                  description: >-
                    Channel the memory came through, e.g. claude-code,
                    github-copilot, or codex.
                  example: claude-code
                memories:
                  type: array
                  maxItems: 1000
                  items:
                    type: object
                    required:
                      - location
                      - content
                      - content_hash
                    properties:
                      location:
                        type: object
                        required:
                          - path
                        properties:
                          path:
                            type: string
                            description: >-
                              Where the memory lives within the source (a file
                              path, or a conversation id).
                            example: ~/.claude/projects/app/memory/stack-db.md
                          section_anchor:
                            type: string
                            nullable: true
                            description: >-
                              The section within the file, or null for a
                              whole-file memory.
                            example: null
                      content:
                        type: string
                        minLength: 1
                        example: The project database is Postgres (Supabase).
                      canonical:
                        type: string
                        nullable: true
                        description: The memory's name / header / name frontmatter.
                        example: stack-db
                      summary:
                        type: string
                        nullable: true
                        example: null
                      content_hash:
                        type: string
                        description: >-
                          Caller-computed hash of the parsed memory; drives the
                          idempotent DIFF.
                        example: sha256:0f2b1c9d4e
                      type_hint:
                        type: string
                        nullable: true
                        enum:
                          - fact
                          - preference
                          - episode
                          - procedure
                        example: fact
                      wikilinks:
                        type: array
                        items:
                          type: string
                        description: >-
                          Claude wikilink targets (canonical names);
                          materialized into edges.
                        example: []
      responses:
        '200':
          description: Per-memory sync outcome.
          content:
            application/json:
              schema:
                type: object
                properties:
                  new:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        content_hash:
                          type: string
                  updated:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        content_hash:
                          type: string
                  unchanged:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        content_hash:
                          type: string
                  conflicts:
                    type: array
                    description: >-
                      Contradictions / low-confidence matches surfaced for human
                      resolution.
                    items:
                      type: object
        '400':
          description: Invalid request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
components:
  schemas:
    Error400:
      type: object
      properties:
        error:
          type: string
          example: 'Wrong data: assetType is required'
    Error401:
      type: object
      properties:
        error:
          type: string
          example: Invalid API key
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Versuno API key. Must be prefixed with `Bearer`. Format: `Bearer
        uk_live_...`
      x-default: Bearer uk_live_your_api_key_here

````