Agent skill

API Reference

by matrixorigin in matrixorigin/memoria

Memoria REST API endpoints, request/response formats, auth, rate limits.

Apache-2.0Auto-check passedBackend & APIs

Install API Reference

skills CLI
$ npx skills add matrixorigin/memoria --skill api-reference -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install matrixorigin/memoria api-reference --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/matrixorigin/memoria.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/api-reference .claude/skills/api-reference && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-reference
GitHub stars
607
Token cost
~2.3k tokens
SKILL.md length
790 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Memoria REST API endpoints, request/response formats, auth, rate limits.

  • Works in 5 steps: User retrieves memories via… → Agent uses memories to answer questions → Agent calls memory_feedback with signal… → …
  • Implementing API endpoints
  • SKILL.md covers Memory CRUD, Snapshots, Branches and Governance, plus 5 more sections
  • Needs LLM_API_KEY

What it does

API Reference is an agent skill from matrixorigin/memoria. Memoria REST API endpoints, request/response formats, auth, rate limits. Use when calling or implementing API endpoints.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering REST APIs, Rate limiting and Structured output and tool calling. The repository describes itself as: Secure memory management for AI Agents • Ensures data integrity • Reduces hallucinations • Maintains consistent long-term context. The licence is Apache-2.0.

When your agent uses it

  • Implementing API endpoints
  • Tasks that involve REST APIs
  • Tasks that involve Rate limiting

Example prompts

  • “/api-reference”

Requirements

  • A credential in LLM_API_KEY

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. User retrieves memories via memory_retrieve or memory_search
  2. Agent uses memories to answer questions
  3. Agent calls memory_feedback with signal based on outcome
  4. System adjusts feedback_weight parameter (auto-tuned daily by governance)
  5. Future retrievals rank memories higher/lower based on accumulated feedback

What it can do on your machine

Read from SKILL.md and the folder at commit 81c5cc6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • LLM_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Reference loads about 2.3k tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 790 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from matrixorigin/memoria at commit 81c5cc6, republished under its Apache-2.0 licence (© matrixorigin). 790 words, ~2,339 tokens.

Download SKILL.mdSave it as .claude/skills/api-reference/SKILL.md (or your agent's skills folder).
name
api-reference
description
Memoria REST API endpoints, request/response formats, auth, rate limits. Use when calling or implementing API endpoints.

Memory CRUD

List: GET /v1/memories?limit=50&cursor=...&memory_type=semantic

Response: { "items": [...], "next_cursor": "..." }

Store: POST /v1/memories
json
{ "content": "...", "memory_type": "semantic", "session_id": null }

Returns 201 with MemoryResponse.

Types: semantic (default), profile, procedural, working, tool_result

Batch Store: POST /v1/memories/batch
json
{ "memories": [{ "content": "..." }, { "content": "...", "memory_type": "profile" }] }
Retrieve: POST /v1/memories/retrieve

Hybrid vector + fulltext search, ranked by relevance.

json
{ "query": "...", "top_k": 10, "memory_types": ["semantic"], "session_id": null, "explain": false }

explain: false | true (timing) | "verbose" (detailed) | "analyze" (full diagnostics)

Search: POST /v1/memories/search
json
{ "query": "...", "top_k": 10, "explain": false }

Same as retrieve but without session prioritization.

Full-text Search: POST /v1/memories/fulltext-search

Pure MatrixOne lexical full-text search with optional exact SQL pre-filters. It does not generate embeddings or run vector, graph, hybrid, temporal, or confidence scoring and is intentionally not exposed as an MCP tool.

json
{
  "query": "MatrixOne database",
  "extra_metadata_filter": {"scene": "incident", "rank": 2},
  "subject_id": "subject-123",
  "memory_types": ["semantic"],
  "session_id": "session-123",
  "trust_tier": "T2",
  "branch": "main",
  "limit": 20
}

All supplied filters use AND. session_id is strict: unscoped memories with session_id: null are not included. This differs from retrieve/search session scoping, which can include unscoped memories. Metadata equality preserves JSON type families: number 2 may equal 2.0, while string "2" does not equal number 2. Query length is limited to 4096 UTF-8 bytes and limit to 1–100.

Returns a plain memory array ordered by MatrixOne full-text score and then memory_id; each result exposes the score as retrieval_score.

Correct by ID: PUT /v1/memories/{id}/correct
json
{ "new_content": "...", "reason": "..." }
Correct by Query: POST /v1/memories/correct
json
{ "query": "...", "new_content": "...", "reason": "..." }

Finds best match via semantic search, corrects it. Response includes matched_memory_id.

Delete: DELETE /v1/memories/{id}?reason=...
Bulk Purge: POST /v1/memories/purge
json
{ "memory_ids": ["id1"], "memory_types": ["working"], "before": "2026-01-01T00:00:00", "reason": "..." }

All fields optional. Auto-creates safety snapshot. Response: { "purged": N, "snapshot_name": "..." }

Observe: POST /v1/observe
json
{ "messages": [{ "role": "user", "content": "..." }] }
Profile: GET /v1/profiles/me

Snapshots

EndpointDescription
POST /v1/snapshotsCreate: { "name": "...", "description": "..." }
GET /v1/snapshotsList all
GET /v1/snapshots/{name}?detail=brief&limit=50&offset=0Detail (brief/normal/full)
DELETE /v1/snapshots/{name}Delete
GET /v1/snapshots/{name}/diff?limit=50Diff vs current state
POST /v1/snapshots/{name}/rollbackRestore to snapshot

Branches

EndpointDescription
POST /v1/branchesCreate: { "name": "..." }
GET /v1/branchesList all
POST /v1/branches/{name}/checkoutSwitch to branch
GET /v1/branches/{name}/diffPreview changes vs main
POST /v1/branches/{name}/mergeMerge into main: { "strategy": "append" }
DELETE /v1/branches/{name}Delete

Governance

EndpointCooldownDescription
POST /v1/governance?force=false1 hourQuarantine low-confidence, cleanup stale
POST /v1/consolidate?force=false30 minDetect contradictions, fix orphans
POST /v1/reflect?force=false2 hoursSynthesize insights (needs LLM)
POST /v1/extract-entities—Extract entities, build graph (needs LLM)
POST /v1/extract-entities/link—Manually link entities to memories
GET /v1/entities—List user's entities

LLM-free alternatives: POST /v1/reflect/candidates, POST /v1/extract-entities/candidates — return raw data for the calling agent to process.

Feedback & Adaptive Retrieval

Feedback signals improve retrieval ranking over time. The system learns which memories are useful/irrelevant for each user.

How It Works
  1. User retrieves memories via memory_retrieve or memory_search
  2. Agent uses memories to answer questions
  3. Agent calls memory_feedback with signal based on outcome
  4. System adjusts feedback_weight parameter (auto-tuned daily by governance)
  5. Future retrievals rank memories higher/lower based on accumulated feedback

Quantified Impact: With default feedback_weight=0.1, a memory with 3 useful signals scores ~1.3x higher; one with 2 wrong signals scores ~0.9x lower. At feedback_weight=0.3, these become ~1.9x and ~0.7x respectively.

Record Feedback: POST /v1/memories/{id}/feedback
json
{ "signal": "useful", "context": "helped answer the question" }

Signals: useful, irrelevant, outdated, wrong

Returns 201 with { "feedback_id": "..." }

Errors:

  • 404: Memory not found
  • 422: Invalid signal value
Get Stats: GET /v1/feedback/stats

Returns aggregated feedback counts:

json
{ "useful": 42, "irrelevant": 5, "outdated": 3, "wrong": 1 }
Get by Tier: GET /v1/feedback/by-tier

Returns feedback breakdown by trust tier (T1-T4).

Show full SKILL.md (313 more words)Show less
Tune Parameters: POST /v1/retrieval-params/tune

Manually adjust retrieval scoring weights:

json
{ "feedback_weight": 0.15 }

feedback_weight: 0.01–0.5 (default 0.1). Higher = feedback has more impact on ranking.

Auto-tuning: POST /v1/retrieval-params/tune with empty body triggers automatic tuning based on accumulated feedback.

Errors:

  • 422: feedback_weight out of range
  • 200 with "message": Not enough feedback (requires ≥10 signals)
Get Parameters: GET /v1/retrieval-params

Returns current retrieval parameters for the user.

ToolRelationship
memory_retrieve / memory_searchFeedback affects their ranking results
memory_correctUse instead of wrong feedback when content needs fixing
memory_purgeUse instead of outdated feedback when memory should be deleted
memory_governanceAuto-tunes feedback_weight daily based on feedback patterns

Episodic Memory

Generate Summary: POST /v1/sessions/{session_id}/summary
json
{ "mode": "full", "sync": true, "generate_embedding": true }

Modes: full (topic/action/outcome) | lightweight (3-5 bullets, max 3/session)

Requires LLM (LLM_API_KEY). Returns 503 without it.

Poll Task: GET /v1/tasks/{task_id}

Response: { "task_id": "...", "status": "completed|processing|failed", "result": {...} }

Auth

EndpointAuthDescription
POST /auth/keysMasterCreate API key: { "user_id": "...", "name": "..." }
GET /auth/keysBearerList my keys
GET /auth/keys/{id}BearerGet key detail
PUT /auth/keys/{id}/rotateBearerRotate (revoke old, issue new)
DELETE /auth/keys/{id}BearerRevoke

Admin (Master key required)

EndpointDescription
GET /admin/statsSystem stats
GET /admin/users?cursor=...&limit=100List users
GET /admin/users/{id}/statsUser stats
GET /admin/users/{id}/keysUser's API keys
DELETE /admin/users/{id}/keysRevoke all user keys
DELETE /admin/users/{id}Deactivate user
POST /admin/governance/{id}/trigger?op=governanceTrigger governance (governance/consolidate/reflect)

Plugin Admin (Master key required)

EndpointDescription
GET/POST /admin/plugins/signersList/add trusted signers
POST /admin/pluginsPublish plugin (base64 files)
POST /admin/plugins/:key/:ver/reviewReview: { "status": "active" }
POST /admin/plugins/:key/:ver/scoreScore: { "score": 4.5 }
GET/POST /admin/plugins/domains/:d/bindingsList/create binding rules
POST /admin/plugins/domains/:d/activateActivate binding
GET /admin/pluginsList packages
GET /admin/plugins/matrixCompatibility matrix
GET /admin/plugins/eventsAudit events

Health (no auth)

EndpointResponseUse
GET /health"ok"Liveness probe
GET /health/instance{ "status": "ok", "instance_id": "..." }Readiness probe

Rate Limits

Per API key, sliding window. Key limits: store 300/min, retrieve 300/min, batch 60/min, purge 30/min, consolidate/reflect 10/min. Returns 429 when exceeded.

Error Format

json
{ "detail": "Error message" }

Status codes: 400 (validation), 401 (auth), 403 (forbidden), 404 (not found), 409 (conflict), 429 (rate limit), 500 (internal).

© matrixorigin, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/api-reference of matrixorigin/memoria.

Open the folder on GitHubat commit 81c5cc6

Compare with similar skills

API Reference next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Reference compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Reference this skillmatrixorigin/memoria607—~2.3kAutomated safety check: PassApache-2.0
API Gatewayitsmostafa/aws-agent-skills1.2k1 repos~2.2kAutomated safety check: PassMIT
Frappe Core APIImpertio-Studio/Frappe_Claude_Skill_Package1871 repos~3.2kAutomated safety check: PassMIT
API Auditbriiirussell/cybersecurity-skills412—~2.8kAutomated safety check: NotesMIT
Frappe Errors APIImpertio-Studio/Frappe_Claude_Skill_Package1871 repos~4kAutomated safety check: PassMIT
API Conventionshuangjia2019/claude-code-engineering1.1k1 repos~398Automated safety check: PassNone

Similar skills

  • API Gateway

    itsmostafa/aws-agent-skills

    AWS API Gateway for REST and HTTP API management. An agent skill from itsmostafa/aws-agent-skills.

    1.2k GitHub starsUsed in 1 repo~2.2k tokens
    Backend & APIsAuto-check passed
  • Frappe Core API

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when building ERPNext/Frappe API integrations (v14/v15/v16) including REST API, RPC API, authentication, webhooks, and rate limiting.

    187 GitHub starsUsed in 1 repo~3.2k tokens
    Backend & APIsAuto-check passed
  • API Audit

    briiirussell/cybersecurity-skills

    Audit REST, GraphQL, and RPC APIs against the OWASP API Security Top 10 (2023).

    412 GitHub stars~2.8k tokensUpdated 4 mo ago
    Backend & APIsAuto-check: notes
  • Frappe Errors API

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when debugging or handling API errors in Frappe/ERPNext v14/v15/v16.

    187 GitHub starsUsed in 1 repo~4k tokens
    Backend & APIsAuto-check passed
  • API Conventions

    huangjia2019/claude-code-engineering

    API design patterns and conventions for this project. An agent skill from huangjia2019/claude-code-engineering.

    1.1k GitHub starsUsed in 1 repo~398 tokens
    Backend & APIsAuto-check passed
  • API Reference

    mobazha/mobazha-unified

    Look up Mobazha backend API endpoints, request/response formats, and field mappings.

    165 GitHub stars~1.7k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed

More from matrixorigin/memoria

All 9 skills in this repo
  • Thememoria

    matrixorigin/memoria

    Use Memoria as OpenClaw's durable memory slot. An agent skill from matrixorigin/memoria.

    607 GitHub stars~728 tokensUpdated today
    Auto-check passed
  • Architecture

    matrixorigin/memoria

    Memoria codebase structure, workspace layout, key traits, database tables, config patterns, and testing conventions.

    607 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Deployment

    matrixorigin/memoria

    Deploy Memoria with Docker Compose or Kubernetes. An agent skill from matrixorigin/memoria.

    607 GitHub stars~1.6k tokensUpdated today
    Auto-check: notes
  • Local Embedding

    matrixorigin/memoria

    Run embedding on-device with ONNX Runtime. An agent skill from matrixorigin/memoria.

    607 GitHub stars~444 tokensUpdated today
    Auto-check: notes
  • Plugin Development

    matrixorigin/memoria

    Create, test, sign, and publish Memoria governance plugins. An agent skill from matrixorigin/memoria.

    607 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Release

    matrixorigin/memoria

    Cut a Memoria release. An agent skill from matrixorigin/memoria.

    607 GitHub stars~494 tokensUpdated today
    Auto-check passed

Categories

Questions about API Reference

What does API Reference do?

Memoria REST API endpoints, request/response formats, auth, rate limits. API Reference is an agent skill from matrixorigin/memoria. Memoria REST API endpoints, request/response formats, auth, rate limits.

When should I use API Reference?

API Reference fits situations like: implementing API endpoints; tasks that involve REST APIs; tasks that involve Rate limiting.

How do I install API Reference in Claude Code?

Run `npx skills add matrixorigin/memoria --skill api-reference -a claude-code`. Or copy the skill folder (skills/api-reference in matrixorigin/memoria) into .claude/skills/api-reference in your project. Claude Code loads it when a task matches its description.

How do I install API Reference in Codex?

Run `npx skills add matrixorigin/memoria --skill api-reference -a codex`. Or copy the skill folder (skills/api-reference in matrixorigin/memoria) into .agents/skills/api-reference in your project. Codex loads it when a task matches its description.

Can I use API Reference in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add matrixorigin/memoria --skill api-reference -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-reference, .gemini/skills/api-reference, .github/skills/api-reference and .opencode/skills/api-reference in your project.

What does API Reference need to run?

Going by SKILL.md and its folder, API Reference needs credentials named LLM_API_KEY. Our summary lists: A credential in LLM_API_KEY.

Does API Reference access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Reference safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Reference use?

API Reference is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Reference use?

About 2.3k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Reference?

Skills that share tags, products or a category with API Reference: API Gateway (itsmostafa/aws-agent-skills, 1.2k stars), Frappe Core API (Impertio-Studio/Frappe_Claude_Skill_Package, 187 stars), API Audit (briiirussell/cybersecurity-skills, 412 stars) and Frappe Errors API (Impertio-Studio/Frappe_Claude_Skill_Package, 187 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Reference?

matrixorigin (a GitHub organization) maintains it in matrixorigin/memoria, which has 607 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 7, 2026.

Source: matrixorigin/memoria on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.