ReMe
AGENTS.md3.6k starsChanged 3 months agoApache-2.0View on GitHub
This file guides coding agents working in the ReMe repository. Keep changes small, testable, and consistent with the contracts expressed by the current code. ReMe is a local-first, file-native memory system for agents. When convenience conflicts with these principles, favor data ownership, recoverability, and explicit behavior. Use this order when documentation and implementation disagree: Do not duplicate large implementation descriptions in documentation. Express the stable contract and link to the relevant module where useful. When behavior changes intentionally, update the…
- Reads credentials
- Installs packages
Trending
Quiet since September.about the whole repository
Who's talking about agentscope-ai/ReMe
- @pythonhub.dev“agentscope-ai / ReMe ReMe: Memory Management Kit for Agents - Remember Me, Refine Me. …”Bluesky · Apr 6, 2026 · 1 likes
- agentscope-ai/QwenPaw“chore(deps): update reme-ai dependency to version 0.3.1.8”GitHub · Mar 31, 2026 · 1 reactions
- agentscope-ai/QwenPaw“refactor(truncation): improve file truncation logic”GitHub · Mar 28, 2026 · 1 reactions
- agentscope-ai/QwenPaw“feat(memory): improve skills tool result truncation”GitHub · Mar 27, 2026 · 1 reactions
- @github-trending.bsky.social“📦 agentscope-ai / ReMe ⭐ 1,136 (+27) 🗒 Python ReMe: Memory Management Kit for Agents - Remember Me, …”Bluesky · Mar 3, 2026 · 1 likes
The biggest 5 of 23 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 23
Talked about on GitHub and Bluesky (23 times).
On GitHub · 21
- Mar 31, 2026chore(deps): update reme-ai dependency to version 0.3.1.8 — agentscope-ai/QwenPaw1 reaction · 2 comments
- Mar 28, 2026refactor(truncation): improve file truncation logic — agentscope-ai/QwenPaw1 reaction · 1 comment
- Mar 27, 2026feat(memory): improve skills tool result truncation — agentscope-ai/QwenPaw1 reaction · 1 comment
- Sep 15, 2026Add ReMe to harness and memory evolution tools — lobehub/awesome-rsi0 reactions · 1 comment
- Sep 13, 2026Curate ReMe with versioned memory-evolution evidence — YuxingLu613/awesome-agentic-evolution0 reactions
16 more on GitHub
- Sep 11, 2026Technology Radar — 2026-09-11 — carlosasantoss73-tech/AUREA0 reactions
- Sep 7, 2026Weekly discovery: new DeepSeek Harness ecosystem candidates — fendouai/awesome-deepseek-harness0 reactions · 1 comment
- Aug 31, 2026Weekly discovery: new DeepSeek Harness ecosystem candidates — fendouai/awesome-deepseek-harness0 reactions · 2 comments
- Jul 15, 2026feat(memory): enhance ReMe configuration and indexing safeguards — agentscope-ai/QwenPaw0 reactions · 1 comment
- Jul 13, 2026chore(deps): update reme-ai dependency to version 0.4.1.0 — agentscope-ai/QwenPaw0 reactions · 1 comment
- Jun 7, 2026chore(deps): bump reme-ai from 0.3.0.5 to 0.3.1.10 — citedy/adclaw0 reactions
- May 17, 2026chore(deps): bump reme-ai from 0.3.0.5 to 0.3.1.9 — citedy/adclaw0 reactions · 1 comment
- Apr 12, 2026taOSmd optimisations: semantic compression, memify, recall scoring, intent-aware retrieval — jaylfc/taOS0 reactions · 9 comments
- Apr 5, 2026chore(deps): bump reme-ai from 0.3.0.5 to 0.3.1.8 — citedy/adclaw0 reactions · 2 comments
- Mar 29, 2026chore(deps): bump reme-ai from 0.3.0.5 to 0.3.1.6 — citedy/adclaw0 reactions · 1 comment
- Mar 23, 2026fix(memory): handle empty compaction results and improve error reporting — agentscope-ai/QwenPaw0 reactions
- Mar 22, 2026chore(deps): bump reme-ai from 0.3.0.5 to 0.3.1.1 — citedy/adclaw0 reactions · 1 comment
- Mar 15, 2026Invalid JSON Schema for array parameters — multiple tools affected — bnomei/kirby-mcp0 reactions · 1 comment
- Mar 5, 2026Bump reme-ai from 0.3.0.0 to 0.3.0.5 — sunqirui1987/linx-claw0 reactions · 2 comments
- Mar 5, 2026[Bug]: Memory file watcher fails to sync vector store due to missing `memory.md` — agentscope-ai/QwenPaw0 reactions · 5 comments
- Mar 2, 2026[bugfix] add vllm embeddding support — agentscope-ai/QwenPaw0 reactions · 1 comment
On Bluesky · 2
- Apr 6, 2026agentscope-ai / ReMe ReMe: Memory Management Kit for Agents - Remember Me, Refine Me. https://github.com/agentscope-ai/ReMe — @pythonhub.dev1 likes and repost
- Mar 3, 2026📦 agentscope-ai / ReMe ⭐ 1,136 (+27) 🗒 Python ReMe: Memory Management Kit for Agents - Remember Me, Refine Me. — @github-trending.bsky.social1 likes and repost · 2 replies
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- dingtalk-messageSkill
- qwenpaw_memorySkill
- reme_memorySkill
- serper-searchSkill
- tushare-dataSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
20 rules. About 0 are common, 15 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 12
Prefer transparent formats and predictable behavior over hidden state.
- Distinctive: line 14
Keep concepts focused on project intent.
- Distinctive: line 16
When convenience conflicts with these principles, favor data ownership, recoverability, and explicit behavior.
- Distinctive: line 20
Use this order when documentation and implementation disagree:
- Distinctive: line 27
Do not duplicate large implementation descriptions in documentation.
- Distinctive: line 75
Before changing behavior, inspect the adjacent implementation, schema, built-in config, and focused tests.
- Distinctive: line 114
If startup fails, already-started resources are closed.
- Distinctive: line 118
Keep async clients, tasks, executors, and services under this lifecycle.
- Distinctive: line 127
Treat Step instances as invocation-scoped:
- Very specific: line 139
Use narrow, namespaced keys in app_context.metadata and protect shared mutable values against concurrent access.
- Distinctive: line 164
Do not bypass the existing file steps or stores in a way that weakens workspace containment.
- Very specific: line 165
Never write test state into the repository's .reme/.
- Distinctive: line 166
Do not delete or rewrite user memory to repair an index or make a test pass.
- Distinctive: line 171
Use the narrowest useful check while iterating, then broaden it according to risk.
- Very specific: line 199
If documentation or the documentation theme changes, run npm test and npm run build from github-pages/.
- Very specific: line 206
Do not edit generated output when the source can be changed instead.
- Distinctive: line 209
Do not silently change CLI flags, configuration keys, workspace layouts, serialized schemas, endpoint shapes, streaming termination, or …
- Distinctive: line 212
Do not introduce dependencies without a concrete repository-level need.
- Very specific: line 213
Do not commit .env files, credentials, runtime memory, logs, indexes, caches, benchmark outputs, or generated Studio distributions.
- Distinctive: line 217
If a requirement is ambiguous, infer intent from nearby code, schemas, defaults, and tests.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
This file guides coding agents working in the ReMe repository. Keep changes small, testable, and consistent with the contracts expressed by the current code.
Project Principles
ReMe is a local-first, file-native memory system for agents.
- User-owned workspace files are the durable source of truth.
- Indexes, catalogs, graphs, caches, and generated metadata must remain rebuildable.
- Prefer transparent formats and predictable behavior over hidden state.
- Preserve user control over workspace paths, configuration, and service boundaries.
- Keep concepts focused on project intent; let code and schemas describe implementation.
When convenience conflicts with these principles, favor data ownership, recoverability, and explicit behavior.
Sources of Truth
Use this order when documentation and implementation disagree:
- Current code and public Pydantic schemas.
- Tests that describe supported behavior.
- CLI behavior and the built-in configuration.
- README files and other development documentation.
Do not duplicate large implementation descriptions in documentation. Express the stable contract and link to the relevant module where useful. When behavior changes intentionally, update the implementation, schemas, tests, defaults, and concise documentation together.
Repository Map
reme/reme.py: CLI entry point; dispatchesstart,find_reme, and client calls.reme/application.py: application assembly, dependency ordering, job execution, and lifecycle.reme/config/config_parser.py: YAML/JSON loading, environment expansion, dot-notation parsing, and deep config merging.reme/config/default.yaml: default service, jobs, steps, and components. Other files inreme/config/are named configuration variants.reme/schema/application_config.py: typed application, component, and job configuration.reme/schema/: request, response, streaming, memory, graph, and file contracts.reme/components/application_context.py: application-wide wiring and in-memory shared state.reme/components/runtime_context.py: request-scoped data, response, streaming queue, and stop event.reme/components/base_component.py: component lifecycle, dependency binding, and workspace helpers.reme/components/component_registry.py: the frozen built-in registry template and application-local registry factory.reme/components/job/: base, stream, background, and cron job implementations.reme/components/service/: local CLI, HTTP, and MCP service backends.reme/components/: agent wrappers, model adapters, stores, catalogs, graphs, indexes, clients, tokenizers, and outbound proxies.reme/steps/: registered job steps grouped by common, file I/O, index, evolve, cookbook, and transfer concerns.reme/utils/: shared utilities, including service discovery, logging, web-static resolution, session I/O, token accounting, and wikilink handling.tests/unit/: primary fast, isolated validation suite.tests/integration/: service/model tests that may need credentials or external processes.reme_studio/: ReMe Studio frontend source plus the independently publishedreme_studioPython package and@agentscope-ai/reme_studionpm static distribution.plugins/: installable ReMe extensions, including Auto Fin and LME/BEAM plugins.integrations/: adapters that connect ReMe to external agent hosts, including the independent, self-contained DSH and OpenClaw TypeScript plugins plus the Claude Code and Hermes Agent integrations.skills/: standalone skills;reme_memorycalls ReMe, while other skills may use separate tools or direct-file conventions.benchmark/andcookbook/: runnable evaluations and example workflows.docs/: README-linked supporting pages and figures.github-pages/: VitePress build shell, generated-content assembly, documentation checks, and GitHub Pages output. The canonical theme and guides remain underdocs/;.generated/anddist/are disposable.
Development Setup
ReMe requires Python 3.11 or newer. Install the editable development environment with:
pip install -e reme_studio -e ".[dev,core]"Before changing behavior, inspect the adjacent implementation, schema, built-in config, and focused tests. Follow existing async and typing patterns unless the task explicitly requires a new contract.
Configuration and CLI Contracts
- CLI syntax is
reme ACTION key=value ...; leading-or--on arguments is accepted. - Nested overrides use dot notation. Values support null, booleans, numbers, JSON collections, and quoted JSON strings; leading-zero numeric-looking values remain strings.
config=<name-or-path>loads a discovered config name or a.yaml,.yml, or.jsonfile. With no explicit config path,defaultis loaded when available.- Config files expand
${VAR}and${VAR:-default}recursively. An undefined variable without a default is an error. - CLI/config overrides are deep-merged over the loaded file. Do not silently change this merge behavior or stable configuration keys.
ApplicationConfignormalizesworkspace_dirto an expanded absolute path.session_dirmust remain workspace-relative; standard transcripts live under{session_dir}/dialog.reme startruns the configured service.reme start job=<name> ...switches to the one-shot CLI service and runs the job through the normal application lifecycle.- Other actions use a client selected from the running service configuration when discoverable, otherwise from local config. Client-selection arguments must not leak into the job payload.
Registration and Application Lifecycle
Component and Step discovery is import-driven:
- Implementations declare a non-
BASEcomponent_typeand register with@R.register("backend")orR.register(Class, "backend"). - Component packages must be imported through
reme/components/__init__.py. - Step packages/modules must be reachable through their package
__init__.pychain and ultimatelyreme/steps/__init__.py. - Adding an implementation without its registration import leaves it undiscoverable at runtime. Treat implementation, registration, import side effect, defaults, and tests as one change.
Application validates config through ApplicationContext, creates workspace directories, instantiates the service,
configured components, and jobs, and then manages lifecycle as follows:
- Components start in topological dependency order. Missing required dependencies and cycles fail explicitly; optional
dependencies may resolve to
None. - Jobs start after components in this order: base jobs, stream jobs, background jobs, then cron jobs.
- Shutdown closes everything in reverse start order and then shuts down the optional thread pool.
- If startup fails, already-started resources are closed.
BaseComponent.start()andclose()are lock-protected and idempotent. Dependencies created by a standalonedefault_factoryare owned and closed by the parent component.
Keep async clients, tasks, executors, and services under this lifecycle. Do not introduce an untracked long-lived resource.
Jobs, Steps, and State
BaseJob resolves configured Step classes during job startup and constructs fresh Step instances for every invocation.
Job-level kwargs are merged into each RuntimeContext, with call-time kwargs taking precedence. Sequential Steps in one
invocation share the same RuntimeContext and Response.
Treat Step instances as invocation-scoped:
- Constructor fields and
self.kwargshold Step configuration and resolved dependencies. They may be cached or adjusted during that one invocation, but must not be relied on across Job calls. self.context.dataholds request inputs and intermediate values shared by sequential Steps.self.context.response.answer,success, andmetadataare request-scoped output. Because the same response travels through the Step chain, later Steps may consume metadata produced earlier, but it is not application-lifetime or durable storage.self.app_context.metadataholds in-memory state shared across Job/Step invocations for the life of oneApplication, such as counters, tool-context state, session maps, or locks.- Workspace files or a dedicated Component/store hold durable state that must survive restart.
Use narrow, namespaced keys in app_context.metadata and protect shared mutable values against concurrent access. The
search/draft helpers intentionally mirror tool-context state into
self.kwargs only when no ApplicationContext exists for standalone use and unit tests; do not generalize that
compatibility fallback into persistent runtime state. If shared state becomes a stable service contract or needs
dedicated lifecycle, locking, or persistence, promote it to a typed context field or Component.
Additional Step contracts:
Refdependencies resolve in this order: Step kwargs, currentRuntimeContext, then the named application component. The value is cached only on the current Step instance and cleared before each call.input_mappingandoutput_mappingcopy keys withinRuntimeContext.data; missing sources are ignored.- Dispatched Steps receive the current
RuntimeContext, so their data and response are shared. - Base jobs convert uncaught Step errors into
Response(success=False); stream jobs emit an error chunk and always a terminalDONE; background jobs let errors reach their supervisor. - Background jobs are never service-exposed. MCP also skips stream jobs. Respect
enable_serveand any configured service job allowlist.
Workspace and File Safety
- Application startup creates the workspace plus configured metadata, session, memory-session, resource, daily, and digest directories.
- File-operation paths are resolved against the workspace and must stay inside it. Home-relative paths are unsupported,
traversal escapes are rejected, and
_allowed_pathsrestrictions fail closed when invalid. - Preserve per-path locking, encoding detection, byte limits, truncation behavior, and optimistic
expected_mtimechecks when modifying file operations. - Do not bypass the existing file steps or stores in a way that weakens workspace containment.
- Never write test state into the repository's
.reme/; usetmp_pathor another isolated workspace. - Do not delete or rewrite user memory to repair an index or make a test pass. Rebuild derived state from source files instead.
Validation
Use the narrowest useful check while iterating, then broaden it according to risk.
Focused test:
pytest tests/unit/path/to/test_file.py -vMain unit suite:
pytest tests/unit -v --tb=long -s --log-cli-level=WARNINGRepository formatting and lint checks:
pre-commit run --all-filesBlack and Flake8 use a 120-character line limit and Python 3.11 formatting; Pylint is also run by pre-commit. If
reme_studio/ changes, use its Node 22.13+ scripts and run the proportionate checks from that directory, such as
npm run format:check, npm run lint, or npm test.
Integration tests may contact real model providers, services, or agent subprocesses and can require credentials. Do not run credentialed or externally mutating tests automatically; run them only when the task requires them and the necessary environment has been supplied or authorized. Mock network, model, and subprocess boundaries in unit tests.
If documentation or the documentation theme changes, run npm test and npm run build from github-pages/. The Job
reference is generated from reme/config/default.yaml; do not edit generated pages directly.
Change Guardrails
- Preserve unrelated user changes in a dirty working tree.
- Make the smallest coherent change and avoid unrelated cleanup or broad refactors.
- Do not edit generated output when the source can be changed instead. The publish workflow builds
reme_studio/dist-staticand stages it underreme_studio/src/reme_studio/static; changereme_studio/source for frontend work. - Do not silently change CLI flags, configuration keys, workspace layouts, serialized schemas, endpoint shapes, streaming termination, or service interfaces. Preserve compatibility where practical and document intentional migrations.
- Do not introduce dependencies without a concrete repository-level need.
- Do not commit
.envfiles, credentials, runtime memory, logs, indexes, caches, benchmark outputs, or generated Studio distributions. - State which validations passed and which relevant checks were not run in the final handoff.
If a requirement is ambiguous, infer intent from nearby code, schemas, defaults, and tests. Ask the user only when the remaining choice would materially alter a public contract, user data, or an external system.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

