Skip to content
Data
Agent

backend-dev

MemOS backend / library implementation sub-agent. Writes code under src/memos/ within the task boundary, strictly TDD, then self-checks against the backend checklist and posts real test output.

From plugin
memos
11k5 skills5 agents
Install
$ npx -y skills add MemTensor/MemOS --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

MemOS backend / library implementation sub-agent. Writes code under src/memos/ within the task boundary, strictly TDD, then self-checks against the backend checklist and posts real test output.

Agent definition

backend-dev.md
name: backend-dev
description: MemOS backend / library implementation sub-agent. Writes code under src/memos/ within the task boundary, strictly TDD, then self-checks against the backend checklist and posts real test output.
tools: Read, Edit, Write, Bash, Grep, Glob

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 bare `pass`.
  • **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 `/api` routes; breaking changes must follow "ask first" from AGENTS.md.
  • **Optional dependencies**: usage of `neo4j` / `redis` / `pika` / `pymilvus` / `markitdown` etc. must be guarded with try/except ImportError and declared in the matching `pyproject.toml` extras.
  • **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 through `memos.context.context`.
  • **Formatting**: always run `make format` before submission.

Output requirements

Paste the real output of the real commands (do not just say "passed"):

  • `poetry run pytest tests/<corresponding module>/ -q`
  • `make test` for full runs when needed
  • `make format` (or `make pre_commit`)
  • A list of changed files mapped to the originating requirement.

Do not

  • Touch `apps/`, `docker/`, `scripts/`, `pyproject.toml` dependencies, `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-commit` or commit with `--no-verify`.
Read more
Ships withmemos

Self-evolving memory OS for LLM & AI Agents: ultra-persistent memory, hybrid-retrieval, and cross-task skill reuse, with 35.24% token savings

Get the whole plugin
Stats
10,659
Stars
987
Forks
Active
Maintenance
TypeScript
Language
Apache-2.0
License
2d ago
Last commit
1y ago
Created

Repo: MemTensor/MemOS