Skip to content
Agentmart
Submit a tool

backend-dev

Subagent "backend-dev" from MemTensor/MemOS: MemOS backend / library implementation sub-agent.

Template by MemTensor

IndexedApache-2.0★ 12,070
Write a review

Install

Works with Claude Code. Read the repository before you give any tool access to your data.

curl -fsSL https://raw.githubusercontent.com/MemTensor/MemOS/main/.claude/agents/backend-dev.md -o backend-dev.md

Read it and adapt it to your project before use.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

A Claude Code subagent definition in MemTensor/MemOS. Its description says: 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 it asks for: Read, Edit, Write, Bash, Grep, Glob.

Use cases: backend-development, testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

What's in it

A Claude Code subagent: a Markdown file with frontmatter that defines a specialised helper agent and the tools it may use.

For
Claude Code
Length
41 lines
File
.claude/agents/backend-dev.md
name
backend-dev
tools
Read, Edit, Write, Bash, Grep, Glob
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.

Sections

  1. Responsibilities
  2. Backend self-checklist (run through before submission)
  3. Output requirements
  4. Do not

First lines (shown under the repo's Apache-2.0 license)

---
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`.

Signals

Stars
12,070
Forks
1,090
Open issues
69
Last commit (this folder)
May 29, 2026 (5 months ago)
Last release
Sep 23, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from MemTensor

Cite this page

backend-dev. Agent Mart. https://agentmart.dev/templates/memtensor-memos-backend-dev (last updated 2026-10-24)