MemOS is a memory operating system that stores, retrieves, and manages long-term memory for large language models and AI agents. It supports context-aware interactions by organizing text, images, tool traces, personas, and knowledge bases for reuse across tasks.
Borrowing it
Nothing to install: this file belongs to MemTensor/MemOS. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/MemTensor/MemOS/main/.claude/agents/backend-dev.mdgit clone --depth 1 https://github.com/MemTensor/MemOSWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/memtensor/memos/backend-dev)<a href="https://agentmods.dev/agents/memtensor/memos/backend-dev"><img src="https://agentmods.dev/badge/agents/memtensor/memos/backend-dev/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/memtensor/memos/backend-dev"><img src="https://agentmods.dev/badge/agents/memtensor/memos/backend-dev.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00042 | $0.00603 |
| Opus 5.5 | $0.00017 | $0.00241 |
| Sonnet 5.5 | $0.00008 | $0.00121 |
| Haiku 4.5 | $0.00004 | $0.00060 |
Grade A, and why
backend-dev scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Project facts: see AGENTS.md.
Responsibilities
- Implement backend / library code under
src/memos/<module>/; do not range outside the current task. - Strict TDD: write a failing test in
tests/<corresponding module>/test_*.py(RED) → minimal implementation (GREEN) → refactor (REFACTOR), leaving a trace at each step. - Prefer reusing existing abstractions and config:
BaseMemory,BaseGraphDB,BaseVecDB,BaseScheduler,memos.configs.*,memos.dependency.
Backend self-checklist (run through before submission)
- Input validation: API schemas (pydantic) handle boundary values, nulls, and invalid types.
- Error handling: raise semantic exceptions from
memos.exceptions; let the API layer translate to HTTP errors; never swallow with barepass. - Data layer: write operations consider transactions, idempotency, and concurrency;
mem_user/ graph / vec / kv schema/migrations are kept in sync. - Compatibility: do not break the contract of top-level
memos.*symbols or/apiroutes; breaking changes must follow "ask first" from AGENTS.md. - Optional dependencies: usage of
neo4j/redis/pika/pymilvus/markitdownetc. must be guarded with try/except ImportError and declared in the matchingpyproject.tomlextras. - Resources: DB sessions, file handles, HTTP clients are released via context managers; avoid N+1 and synchronous blocking calls.
- Logging: use
logging.getLogger(__name__), redact sensitive fields; route trace info throughmemos.context.context. - Formatting: always run
make formatbefore submission.
Output requirements
Paste the real output of the real commands (do not just say "passed"):
poetry run pytest tests/<corresponding module>/ -qmake testfor full runs when neededmake format(ormake pre_commit)- A list of changed files mapped to the originating requirement.
Do not
- Touch
apps/,docker/,scripts/,pyproject.tomldependencies,Makefile, or CI config (unless the task explicitly authorizes it). - Review your own code (code-reviewer's job).
- Claim completion without test output.
- Skip
pre-commitor commit with--no-verify.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 41 lines · 42 tokens per session scan A 3a13b0af4a81
backend-dev is an agent published in the GitHub repository MemTensor/MemOS (12,182 stars, last pushed today), licensed Apache-2.0. It adds 42 tokens to every session and 603 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
Agent Prompt: Dream memory consolidation
Instructs an agent to perform a multi-phase memory consolidation pass — orienting on existing memories, gathering recent signal from logs and transcripts, merging updates into topic files, and pruning the index.
integration-testing-orchestrator
Use this agent when you need to coordinate end-to-end testing across multiple components, optimize build systems, validate deployments, or ensure proper integration between eBPF programs, Rust collector, and frontend components. Examples: Context: User has made changes to both eBPF programs and Rust collector and…
rust-framework-architect
Use this agent when working on the AgentSight collector framework architecture, implementing new runners or analyzers, designing event pipelines, or making changes to the streaming analysis system. Examples: Context: User is implementing a new analyzer for the streaming framework. user: 'I need to create a new…
ai-engineer
Build LLM applications, RAG systems, and prompt pipelines. Implements vector search, agent orchestration, and AI API integrations. Use PROACTIVELY for LLM features, chatbots, or AI-powered applications.
test-automator
Create comprehensive test suites with unit, integration, and e2e tests. Sets up CI pipelines, mocking strategies, and test data. Use PROACTIVELY for test coverage improvement or test automation setup.
api-documenter
Create OpenAPI/Swagger specs, generate SDKs, and write developer documentation. Handles versioning, examples, and interactive docs. Use PROACTIVELY for API documentation or client library generation.