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.
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/mengram-io:mengram-io-memory-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
openapi: 3.2.0
info:
title: Mengram Memory API
description: '## Human-Like Memory for AI — Semantic + Episodic + Procedural
The only AI memory API with 3 memory types. Your AI remembers facts, events, and learned workflows.
### 3 Memory Types
- **Semantic** — facts, preferences, skills (entities, relations, knowledge graph)
- **Episodic** — events, decisions, experiences (what happened, when, outcome)
- **Procedural** — workflows, processes, habits (learned step-by-step procedures)
### Key Features
- **Cognitive Profile** — one API call generates a system prompt from all memory types
- **Unified Search** — search across all 3 types simultaneously
- **Procedure Feedback** — AI learns which workflows succeed
- **Memory Agents** — autonomous cleanup, pattern detection, weekly digests
- **Team Sharing** — shared memory across team members
- **LangChain** — drop-in replacement for ConversationBufferMemory
- **CrewAI** — 5 tools with procedural learning (agents learn optimal workflows)
- **OpenClaw** — plugin with auto-recall/capture hooks, 12 tools, and Graph RAG across all channels
### Authentication
All endpoints require `Authorization: Bearer YOUR_API_KEY` header.
### Quick Start
```python
from mengram import Mengram
m = Mengram(api_key="om-...")
m.add([{"role": "user", "content": "I use Python and Railway"}])
results = m.search_all("deployment") # semantic + episodic + procedural
profile = m.get_profile() # instant system prompt
```'
version: 2.49.0
tags:
- name: Memory
description: Store and retrieve semantic memories
paths:
/v1/add:
post:
tags:
- Memory
summary: Add
description: 'Add memories from conversation.
Returns immediately with job_id, processes in background.'
operationId: add_v1_add_post
parameters:
- name: sub_user_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AddRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/add_text:
post:
tags:
- Memory
summary: Add Text
description: Add memories from plain text (wraps into a single user message).
operationId: add_text_v1_add_text_post
parameters:
- name: sub_user_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AddTextRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/add_file:
post:
tags:
- Memory
summary: Add File
description: 'Upload a file (PDF, DOCX, TXT, MD) and extract structured memories.
PDF files use premium two-pass GPT-5.4 vision extraction.
Each page/chunk counts as 1 add from your quota.
Returns immediately with job_id; processes in background.'
operationId: add_file_v1_add_file_post
parameters:
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/Body_add_file_v1_add_file_post'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/memories:
get:
tags:
- Memory
summary: Get All
description: Get all memories (entities). Supports pagination with limit/offset.
operationId: get_all_v1_memories_get
parameters:
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: limit
in: query
required: false
schema:
type: integer
maximum: 500
minimum: 1
default: 100
title: Limit
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
title: Offset
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/export:
get:
tags:
- Memory
summary: Export Memory
description: 'Export this memory as plain files you own.
`format=markdown` returns a zip of an Obsidian-native tree — one file per
entity, relations as `[[wikilinks]]`, procedures with their track record
and the failures that changed them. `format=files` returns that same
tree as `{path: text}` for clients that write files themselves rather
than unpack an archive — the Obsidian plugin''s pull. `format=json`
returns the underlying records, for callers doing their own thing.
Read-only, and deliberately not charged against the add or search quota:
getting your data out should never cost you the ability to use the
product. The per-minute rate limit still applies.'
operationId: export_memory_v1_export_get
parameters:
- name: format
in: query
required: false
schema:
type: string
pattern: ^(markdown|json|files)$
default: markdown
title: Format
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/reindex:
post:
tags:
- Memory
summary: Reindex
description: Re-generate all embeddings (includes relations now).
operationId: reindex_v1_reindex_post
parameters:
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/dedup:
post:
tags:
- Memory
summary: Dedup
description: Find and merge duplicate entities.
operationId: dedup_v1_dedup_post
parameters:
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/entity/{name}:
delete:
tags:
- Memory
summary: Delete Entity
description: Delete an entity and all its facts, relations, knowledge, embeddings.
operationId: delete_entity_v1_entity__name__delete
parameters:
- name: name
in: path
required: true
schema:
type: string
title: Name
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/identity:
post:
tags:
- Memory
summary: Set Identity
description: 'Pin which entity is YOU. Extraction, ''User'' merging and profile generation
anchor to the pinned entity instead of guessing by name/fact-count heuristics.
Fixes identity drift when third parties are frequently co-mentioned (issue #54).'
operationId: set_identity_v1_identity_post
parameters:
- name: entity
in: query
required: true
schema:
type: string
title: Entity
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/merge_user:
post:
tags:
- Memory
summary: Merge User Entity
description: Merge 'User' entity into the primary person entity (e.g. 'Ali Baizhanov').
operationId: merge_user_entity_v1_merge_user_post
parameters:
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/merge:
post:
tags:
- Memory
summary: Merge Entities Endpoint
description: Merge source entity into target. Source gets deleted, all data moves to target.
operationId: merge_entities_endpoint_v1_merge_post
parameters:
- name: source
in: query
required: true
schema:
type: string
title: Source
- name: target
in: query
required: true
schema:
type: string
title: Target
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/entity/{name}/dedup:
post:
tags:
- Memory
summary: Dedup Entity
description: Use LLM to deduplicate facts on an entity. Keeps best version, archives redundant ones.
operationId: dedup_entity_v1_entity__name__dedup_post
parameters:
- name: name
in: path
required: true
schema:
type: string
title: Name
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/dedup_all:
post:
tags:
- Memory
summary: Dedup All Entities
description: 'Deduplicate facts across this user''s entities, up to 25 per call
(one model call each). `remaining` says how many are left; pass the
returned `next_after` to continue.'
operationId: dedup_all_entities_v1_dedup_all_post
parameters:
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: after
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: next_after from the previous call
title: After
description: next_after from the previous call
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/archive_fact:
post:
tags:
- Memory
summary: Archive Fact
description: Manually archive a wrong fact.
operationId: archive_fact_v1_archive_fact_post
parameters:
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: true
title: Req
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/timeline:
get:
tags:
- Memory
summary: Timeline
description: 'Temporal search — what happened in a time range?
after/before: ISO datetime strings (e.g. 2025-02-01T00:00:00Z)'
operationId: timeline_v1_timeline_get
parameters:
- name: after
in: query
required: false
schema:
type: string
title: After
- name: before
in: query
required: false
schema:
type: string
title: Before
- name: limit
in: query
required: false
schema:
type: integer
default: 20
title: Limit
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/memories/full:
get:
tags:
- Memory
summary: Get All Full
description: Get all memories with full facts, relations, knowledge. Supports pagination.
operationId: get_all_full_v1_memories_full_get
parameters:
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: limit
in: query
required: false
schema:
type: integer
maximum: 500
minimum: 1
default: 100
title: Limit
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
title: Offset
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/memory/{name}:
get:
tags:
- Memory
summary: Get Memory
description: Get specific entity details.
operationId: get_memory_v1_memory__name__get
parameters:
- name: name
in: path
required: true
schema:
type: string
title: Name
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- Memory
summary: Delete Memory
description: Delete a memory.
operationId: delete_memory_v1_memory__name__delete
parameters:
- name: name
in: path
required: true
schema:
type: string
title: Name
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/memories/all:
delete:
tags:
- Memory
summary: Delete All Memories
description: 'Delete ALL memories for this sub-user — entities and their facts,
plus episodes, procedures, raw conversation text and triggers.
Irreversible.'
operationId: delete_all_memories_v1_memories_all_delete
parameters:
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/graph:
get:
tags:
- Memory
summary: Graph
description: Knowledge graph for visualization. Returns top N nodes by connections.
operationId: graph_v1_graph_get
parameters:
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: limit
in: query
required: false
schema:
type: integer
maximum: 500
minimum: 1
default: 150
title: Limit
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/feed:
get:
tags:
- Memory
summary: Feed
description: Memory feed — recent facts with timestamps for dashboard.
operationId: feed_v1_feed_get
parameters:
- name: limit
in: query
required: false
schema:
type: integer
default: 50
title: Limit
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
title: Offset
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/profile/{target_user_id}:
get:
tags:
- Memory
summary: Get Profile
description: 'Cognitive Profile — generates a ready-to-use system prompt from user memory.
Returns a personalization prompt that can be inserted into any LLM.
Cached for 1 hour. Use force=true to regenerate (Pro+ only).'
operationId: get_profile_v1_profile__target_user_id__get
parameters:
- name: target_user_id
in: path
required: true
schema:
type: string
title: Target User Id
- name: force
in: query
required: false
schema:
type: boolean
default: false
title: Force
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/profile:
get:
tags:
- Memory
summary: Get Own Profile
description: Cognitive Profile for the authenticated user.
operationId: get_own_profile_v1_profile_get
parameters:
- name: force
in: query
required: false
schema:
type: boolean
default: false
title: Force
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/rules:
get:
tags:
- Memory
summary: Generate Rules
description: 'Generate a CLAUDE.md, .cursorrules, or .windsurfrules file from memory.
Returns structured project rules and conventions extracted from all memory types.'
operationId: generate_rules_v1_rules_get
parameters:
- name: format
in: query
required: false
schema:
type: string
default: claude_md
title: Format
- name: force
in: query
required: false
schema:
type: boolean
default: false
title: Force
- name: sub_user_id
in: query
required: false
schema:
type: string
default: default
title: Sub User Id
- name: authorization
in: header
required: true
schema:
type: string
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
AddRequest:
properties:
user_id:
type: string
title: User Id
default: default
messages:
items:
$ref: '#/components/schemas/Message'
type: array
maxItems: 500
title: Messages
agent_id:
anyOf:
- type: string
- type: 'null'
title: Agent Id
run_id:
anyOf:
- type: string
- type: 'null'
title: Run Id
app_id:
anyOf:
- type: string
- type: 'null'
title: App Id
source:
anyOf:
- type: string
- type: 'null'
title: Source
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
expiration_date:
anyOf:
- type: string
- type: 'null'
title: Expiration Date
dry_run:
type: boolean
title: Dry Run
default: false
prompt_version:
anyOf:
- type: string
- type: 'null'
title: Prompt Version
agent_mode:
type: boolean
title: Agent Mode
default: false
additionalProperties: false
type: object
required:
- messages
title: AddRequest
AddTextRequest:
properties:
user_id:
type: string
title: User Id
default: default
text:
type: string
maxLength: 100000
title: Text
agent_id:
anyOf:
- type: string
- type: 'null'
title: Agent Id
run_id:
anyOf:
- type: string
- type: 'null'
title: Run Id
app_id:
anyOf:
- type: string
- type: 'null'
title: App Id
source:
anyOf:
- type: string
- type: 'null'
title: Source
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
expiration_date:
anyOf:
- type: string
- type: 'null'
title: Expiration Date
additionalProperties: false
type: object
required:
- text
title: AddTextRequest
Body_add_file_v1_add_file_post:
properties:
file:
type: string
contentMediaType: application/octet-stream
title: File
user_id:
type: string
title: User Id
default: default
agent_id:
anyOf:
- type: string
- type: 'null'
title: Agent Id
run_id:
anyOf:
- type: string
- type: 'null'
title: Run Id
app_id:
anyOf:
- type: string
- type: 'null'
title: App Id
type: object
required:
- file
title: Body_add_file_v1_add_file_post
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
Message:
properties:
role:
type: string
title: Role
content:
type: string
maxLength: 100000
title: Content
type: object
required:
- role
- content
title: Message