Skip to main content
Use Python integration when the host application needs in-process access and should own ReMe’s startup, jobs, and shutdown. For process isolation or a language-neutral boundary, use a shared ReMe service instead.

Install ReMe

ReMe requires Python 3.11 or newer:

Run ReMe In Process

Load the default configuration, create one ReMe application, and bracket every job call with start() and close():
resolve_app_config() loads ReMe’s default jobs and components, then deep-merges the supplied overrides. Constructing ReMe from only workspace_dir would create an application without the default job definitions.

Call Jobs

run_job(name, **kwargs) is asynchronous and returns a response with success, answer, and metadata. Job names and parameters come from the resolved configuration. Within the started application above, record a conversation with:
Model-backed jobs such as auto_memory require the LLM environment described in the Quick Start model setup.

Lifecycle Rules

  • Reuse one application for related calls instead of constructing it per request.
  • Call start() before run_job() so indexes, watchers, and scheduled jobs are initialized.
  • Always call close() during host shutdown; a try / finally block is the safest boundary.
  • Use a stable session_id for repeated updates to the same conversation.
  • Do not start a separate reme start process for the same in-process application.
ReMe provides the memory result. The host application still decides when to recall, what is durable enough to record, and how returned memory affects an answer.

AgentScope

When you build an AgentScope agent, use its first-party ReMeMiddleware instead of constructing ReMe directly. The middleware embeds ReMe in the AgentScope process and can reuse AgentScope chat and embedding models. It writes conversations through auto_memory and supports automatic retrieval and the memory_search tool. Install the integration with pip install "agentscope[reme]". AgentScope does not close middleware automatically, so call await memory.close() during application shutdown. Read the AgentScope long-term memory guide for the complete example, control modes, and session behavior.