Membase Agent Protocol API

The agent-protocol API from Membase — 20 operation(s) for agent-protocol.

GitHub OpenAPI

Operations 20

POST /v1/ask Ask #
GET /v1/capabilities Capabilities #
GET /v1/documents List Documents #
POST /v1/documents/add Add Document #
GET /v1/documents/{document_id} Get Document #
POST /v1/documents/{document_id}/delete Delete Document #
GET /v1/media List Media #
POST /v1/media/search Search Media #
GET /v1/media/{media_id} Get Media #
POST /v1/media/{media_id}/delete Delete Media #
GET /v1/media/{media_id}/file Media File #
GET /v1/media/{media_id}/thumbs/{thumb} Media Thumb #
GET /v1/memories List Memories #
POST /v1/memories/add Add Memory #
GET /v1/memories/{memory_id} Get Memory #
POST /v1/memories/{memory_id}/forget Forget Memory #
GET /v1/profile-facts List Profile Facts #
POST /v1/profile-facts/add Add Profile Fact #
POST /v1/profile-facts/{fact_id}/forget Forget Profile Fact #
POST /v1/search Search #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/membase-ai:membase-ai-agent-protocol-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

membase-ai-agent-protocol-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 'What a script, an SDK or an AI acting for a Membase account may do with its memory: search it, add to it, read what it learned and what it was given, forget or withdraw, read the profile and the rules, ask. No request names a Memory: reads cover the credential''s reach, writes land in its write target. Bearer: a developer key from the Connect page, or the token an MCP client obtained through consent.'
  title: Membase Agent Protocol API
  version: 0.3.0
tags:
- name: agent-protocol
paths:
  /v1/ask:
    post:
      description: 'One answer from the memory itself — the engine reads the Memories in reach and

        answers once, with no agent and no tools. The citations name the Memory the answer

        came from, never the passages.'
      operationId: ask_memory
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AskBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Ask Memory
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Ask
      tags:
      - agent-protocol
  /v1/capabilities:
    get:
      operationId: get_capabilities
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CapabilitiesView'
          description: Successful Response
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Capabilities
      tags:
      - agent-protocol
  /v1/documents:
    get:
      description: 'The material the Memories in reach were given, newest first; every kind unless

        `kind` narrows it (a kind added later is listed too).'
      operationId: list_documents
      parameters:
      - description: '`file` (a file or page) or `note` (a fact as said); omit for both.'
        in: query
        name: kind
        required: false
        schema:
          anyOf:
          - enum:
            - file
            - note
            type: string
          - type: 'null'
          description: '`file` (a file or page) or `note` (a fact as said); omit for both.'
          title: Kind
      - description: 'How many, newest first: 1–1000, default 100.'
        in: query
        name: limit
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: 'How many, newest first: 1–1000, default 100.'
          title: Limit
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response List Documents
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: List Documents
      tags:
      - agent-protocol
  /v1/documents/add:
    post:
      description: Hand in a document (text or a url) to this credential's write target.
      operationId: add_document
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentBody'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Add Document
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Add Document
      tags:
      - agent-protocol
  /v1/documents/{document_id}:
    get:
      description: One document, with how far each Memory got in learning it.
      operationId: get_document
      parameters:
      - in: path
        name: document_id
        required: true
        schema:
          title: Document Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Get Document
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Get Document
      tags:
      - agent-protocol
  /v1/documents/{document_id}/delete:
    post:
      description: Withdraw a document and what every Memory learned from it.
      operationId: delete_document
      parameters:
      - in: path
        name: document_id
        required: true
        schema:
          title: Document Id
          type: string
      - description: True to carry it out (a Full access developer key).
        in: query
        name: confirm
        required: false
        schema:
          default: false
          description: True to carry it out (a Full access developer key).
          title: Confirm
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Delete Document
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Delete Document
      tags:
      - agent-protocol
  /v1/media:
    get:
      description: The photos and videos the media Memories in reach hold, newest first.
      operationId: list_media
      parameters:
      - description: 'How many, newest first: 1–1000, default 100.'
        in: query
        name: limit
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: 'How many, newest first: 1–1000, default 100.'
          title: Limit
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response List Media
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: List Media
      tags:
      - agent-protocol
  /v1/media/search:
    post:
      description: 'Photos and videos matching what was seen or said, best first, each with the moments

        that matched (a shot or a spoken line, its time and speaker).'
      operationId: search_media
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MediaSearchBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Search Media
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Search Media
      tags:
      - agent-protocol
  /v1/media/{media_id}:
    get:
      description: 'One photo or video with its moments: shots and spoken lines with their times,

        speakers and thumbnails.'
      operationId: get_media
      parameters:
      - in: path
        name: media_id
        required: true
        schema:
          title: Media Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Get Media
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Get Media
      tags:
      - agent-protocol
  /v1/media/{media_id}/delete:
    post:
      description: Forget a photo or video and remove its file.
      operationId: delete_media
      parameters:
      - in: path
        name: media_id
        required: true
        schema:
          title: Media Id
          type: string
      - description: True to carry it out (a Full access developer key).
        in: query
        name: confirm
        required: false
        schema:
          default: false
          description: True to carry it out (a Full access developer key).
          title: Confirm
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Delete Media
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Delete Media
      tags:
      - agent-protocol
  /v1/media/{media_id}/file:
    get:
      operationId: media_file
      parameters:
      - in: path
        name: media_id
        required: true
        schema:
          title: Media Id
          type: string
      - in: header
        name: Range
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Range
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Media File
      tags:
      - agent-protocol
  /v1/media/{media_id}/thumbs/{thumb}:
    get:
      operationId: media_thumb
      parameters:
      - in: path
        name: media_id
        required: true
        schema:
          title: Media Id
          type: string
      - in: path
        name: thumb
        required: true
        schema:
          title: Thumb
          type: string
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Media Thumb
      tags:
      - agent-protocol
  /v1/memories:
    get:
      description: 'The newest facts the Memories in reach hold — newest by when it happened, the

        engine''s own order. `has_more` says more were left out; a Memory that could not answer

        is named in `partial` and the others are still listed.'
      operationId: list_memories
      parameters:
      - description: 'How many, newest first: 1–1000, default 100.'
        in: query
        name: limit
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: 'How many, newest first: 1–1000, default 100.'
          title: Limit
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response List Memories
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: List Memories
      tags:
      - agent-protocol
  /v1/memories/add:
    post:
      description: 'Save one fact into this credential''s write target. The answer is the note it was

        written as — a document of kind `note`; poll `GET /v1/documents/{id}` for its learning.'
      operationId: add_memory
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemoryBody'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Add Memory
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Add Memory
      tags:
      - agent-protocol
  /v1/memories/{memory_id}:
    get:
      description: One fact, of any age — a search can name one older than any list shows.
      operationId: get_memory
      parameters:
      - in: path
        name: memory_id
        required: true
        schema:
          title: Memory Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Get Memory
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Get Memory
      tags:
      - agent-protocol
  /v1/memories/{memory_id}/forget:
    post:
      description: Forget one learned fact; the material it was learned from stays.
      operationId: forget_memory
      parameters:
      - in: path
        name: memory_id
        required: true
        schema:
          title: Memory Id
          type: string
      - description: True to carry it out (a Full access developer key).
        in: query
        name: confirm
        required: false
        schema:
          default: false
          description: True to carry it out (a Full access developer key).
          title: Confirm
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Forget Memory
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Forget Memory
      tags:
      - agent-protocol
  /v1/profile-facts:
    get:
      description: 'Who the user is: their standing statements, newest first, each with where it came

        from (`source_kind`: `user_stated`, `imported` or `model_generated`).'
      operationId: list_profile_facts
      parameters:
      - description: 'How many, newest first: 1–1000, default 100.'
        in: query
        name: limit
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: 'How many, newest first: 1–1000, default 100.'
          title: Limit
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response List Profile Facts
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: List Profile Facts
      tags:
      - agent-protocol
  /v1/profile-facts/add:
    post:
      description: 'Keep one standing statement about the user. The same statement again keeps the one

        already there (`created: false`).'
      operationId: add_profile_fact
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfileFactBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Add Profile Fact
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Add Profile Fact
      tags:
      - agent-protocol
  /v1/profile-facts/{fact_id}/forget:
    post:
      description: 'Forget one profile fact. There is no editing one: to correct it, add the new

        statement and forget the old.'
      operationId: forget_profile_fact
      parameters:
      - in: path
        name: fact_id
        required: true
        schema:
          title: Fact Id
          type: string
      - description: True to carry it out (a Full access developer key).
        in: query
        name: confirm
        required: false
        schema:
          default: false
          description: True to carry it out (a Full access developer key).
          title: Confirm
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Forget Profile Fact
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Forget Profile Fact
      tags:
      - agent-protocol
  /v1/search:
    post:
      description: 'Passages the Memories in reach hold on a question, most relevant first. A Memory

        that could not answer, or whose passages all lost to `limit`, is named in `partial`.'
      operationId: search_memories
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Search Memories
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Error envelope (ADR 0027)
      summary: Search
      tags:
      - agent-protocol
components:
  schemas:
    CapabilitiesView:
      properties:
        actions:
          default: []
          items:
            type: string
          title: Actions
          type: array
        features:
          default: []
          items:
            type: string
          title: Features
          type: array
        memories:
          default: []
          items:
            additionalProperties: true
            type: object
          title: Memories
          type: array
        principal:
          title: Principal
          type: string
        rules:
          additionalProperties: true
          default: {}
          title: Rules
          type: object
        surfaces:
          items:
            type: string
          title: Surfaces
          type: array
        tools:
          items:
            type: string
          title: Tools
          type: array
      required:
      - principal
      - surfaces
      - tools
      title: CapabilitiesView
      type: object
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      required:
      - error
      title: ErrorEnvelope
      type: object
    ErrorBody:
      properties:
        code:
          description: Stable machine-readable error code.
          type: string
        details:
          additionalProperties: true
          description: Optional structured context (e.g. validation fields).
          nullable: true
          type: object
        message:
          description: Human-readable summary.
          type: string
        retryable:
          type: boolean
        trace_id:
          description: Maps to the OTel trace for support.
          type: string
      required:
      - code
      - message
      - retryable
      - trace_id
      title: ErrorBody
      type: object
    MediaSearchBody:
      additionalProperties: false
      properties:
        kind:
          anyOf:
          - enum:
            - image
            - video
            type: string
          - type: 'null'
          description: Omit for both.
          title: Kind
        limit:
          anyOf:
          - maximum: 50.0
            minimum: 1.0
            type: integer
          - type: 'null'
          description: How many items in all.
          title: Limit
        q:
          description: What was seen or said, in any language.
          title: Q
          type: string
      required:
      - q
      title: MediaSearchBody
      type: object
    ProfileFactBody:
      additionalProperties: false
      properties:
        content:
          description: One standing statement about the user.
          maxLength: 2000
          minLength: 1
          title: Content
          type: string
      required:
      - content
      title: ProfileFactBody
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    DocumentBody:
      additionalProperties: false
      properties:
        content:
          anyOf:
          - type: string
          - type: 'null'
          description: The document's full text.
          title: Content
        custom_id:
          default: ''
          description: Your own id; adding the same custom_id again is a no-op.
          maxLength: 200
          title: Custom Id
          type: string
        title:
          default: ''
          maxLength: 200
          title: Title
          type: string
        url:
          anyOf:
          - type: string
          - type: 'null'
          description: A public web address to fetch instead.
          title: Url
      title: DocumentBody
      type: object
    AskBody:
      additionalProperties: false
      properties:
        message:
          description: The question to answer.
          maxLength: 4000
          minLength: 1
          title: Message
          type: string
      required:
      - message
      title: AskBody
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
      - loc
      - msg
      - type
      title: ValidationError
      type: object
    SearchBody:
      additionalProperties: false
      properties:
        limit:
          anyOf:
          - maximum: 50.0
            minimum: 1.0
            type: integer
          - type: 'null'
          description: How many passages in all.
          title: Limit
        mode:
          default: full
          description: '`full`: the engine''s whole retrieval. `fast`: one round, no model call.'
          enum:
          - full
          - fast
          title: Mode
          type: string
        q:
          description: The question, in natural language.
          title: Q
          type: string
      required:
      - q
      title: SearchBody
      type: object
    MemoryBody:
      additionalProperties: false
      properties:
        content:
          description: The fact, as said.
          maxLength: 20000
          minLength: 1
          title: Content
          type: string
        title:
          default: ''
          maxLength: 200
          title: Title
          type: string
      required:
      - content
      title: MemoryBody
      type: object