Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/mem0ai/mem0/agents-mdgit clone --depth 1 https://github.com/mem0ai/mem0What 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 | $0.03110 | $0.03110 |
| Opus 5 | $0.01555 | $0.01555 |
| Sonnet 5 | $0.00622 | $0.00622 |
| Haiku 4.5 | $0.00311 | $0.00311 |
Grade A, and why
mem0 AGENTS.md 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 3d 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 — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Context for AI coding assistants (Claude Code, Cursor, Copilot, Codex) working in the Mem0 repository.
Mem0 ("mem-zero") is a memory layer for AI agents: persistent, personalized memory through a hosted platform API and self-hosted open-source SDKs. Apache-2.0. Repository · Documentation
This is a polyglot monorepo and every package sets its own rules. Read the AGENTS.md nearest the files you are editing before running any command. The linters, formatters, test runners, and line lengths genuinely differ per package, and using the wrong one fails CI or produces a diff full of noise.
Do NOT
- Open a pull request without a signed CLA. It will not be reviewed. See The CLA is not optional.
- Open a pull request that does not link an issue carrying the
acceptedlabel. A bot closes it within a minute. See Two gates decide whether your pull request stays open. - Modify anything in
.github/workflows/without explicit maintainer approval. Publishing credentials are pinned to workflow filenames. - Commit
.envfiles, API keys, or credentials. - Skip pre-commit hooks.
- Use npm or yarn in TypeScript packages. This repo is pnpm-only (Bun in
.opencode-plugin/). - Use
require()in TypeScript. ES moduleimportsyntax only. - Mix up linter configs. Root Python is ruff at line length 120,
cli/python/is ruff at 100,cli/node/is Biome,mem0-ts/is Prettier,integrations/vercel-ai-sdk/is ESLint. - Add Python dependencies to the core
dependencieslist inpyproject.toml. Use an optional group. - Change a public API without updating
docs/in the same pull request. - Introduce a new framework or abstraction without discussion. Follow the patterns already in the file you are editing.
Where to look
| Editing | Read | Toolchain |
|---|---|---|
mem0/ |
mem0/AGENTS.md |
hatch, ruff 120, pytest |
tests/ |
tests/AGENTS.md |
pytest |
mem0-ts/ |
mem0-ts/AGENTS.md |
pnpm, tsup, Prettier, jest |
cli/python/ |
cli/python/AGENTS.md |
ruff 100, pytest |
cli/node/ |
cli/node/AGENTS.md |
pnpm, tsup, Biome, vitest |
integrations/ |
integrations/AGENTS.md |
varies per integration |
server/ |
server/AGENTS.md |
Docker Compose, FastAPI |
docs/ |
docs/AGENTS.md |
Mintlify |
skills/ |
skills/AGENTS.md |
markdown, size-budgeted |
.github/ |
.github/AGENTS.md |
GitHub Actions |
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.
- 3d ago First seen · 176 lines · 3,110 tokens per session scan A 2c10bf04736a
mem0 AGENTS.md is an instructions file published in the GitHub repository mem0ai/mem0 (64,535 stars, last pushed today), licensed Apache-2.0. It adds 3,110 tokens to every session, about $0.0155 per session on Opus 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 instructions, from other repositories
memheaven AGENTS.md
Instructions for nazar256/memheaven, covering agents, purpose, working agreements, key docs and expected commands.
langgraph AGENTS.md
AGENTS.md instructions for langchain-ai/langgraph, covering agents instructions, corridor security analysis, libraries and dependency map.
AstrBot copilot-instructions.md
Copilot instructions for AstrBotDevs/AstrBot, covering astrbot development instructions, working effectively, bootstrap and install dependencies, running the application and dashboard build (vue.js/node.js).
ai-business-skills CLAUDE.md
Instructions for minhnv0807/ai-business-skills, covering claude.md — fullstack marketing skills, identity, nguyen tac cot loi, cach su dung skill and tu dong nhan dien.
openai-scala-client CLAUDE.md
Instructions for cequence-io/openai-scala-client, covering claude.md, project overview, build & test commands, core commands and cross-build.
autogen copilot-instructions.md
Copilot instructions for microsoft/autogen, covering autogen multi-agent ai framework, working effectively, prerequisites and environment setup, python development workflow and quick validation (under 1 second each).