How memtensor/memrl works
MemRL is a runtime-learning agent system: benchmark runners execute tasks, the agent uses an LLM to act, and MemoryService retrieves episodic strategies and updates memory from outcomes without changing model weights. Its documented benchmark branches cover HLE, ALFWorld, Lifelong Agent Bench (LLB), and BigCodeBench (BCB); LLB also has optional JSONL tracing. The graph uses the README and SOURCE INDEX references for relationships; unsampled implementations are represented only at paths present in the tree.
Main entry points: memory_service.py Memory service · llb_rl_runner.py LLB runner · llm.py LLM provider · alfworld_rl_runner.py ALFWorld runner
Components 22
Agent execution
- CLI
memrl/cli/main.py - Memory agent
memrl/agent/memp_agent.py - Agent history
memrl/agent/history.py
Episodic memory
- Memory service
memrl/service/memory_service.py - Memory building
memrl/service/builders.py - Memory retrieval
memrl/service/retrievers.py - Memory update
memrl/service/updater.py - Strategy config
memrl/service/strategies.py - Value learning
memrl/service/value_driven.py
Model providers
- LLM provider
memrl/providers/llm.py - Embedding provider
memrl/providers/embedding.py
Benchmark integrations
- HLE runner
memrl/run/hle_runner.py - ALFWorld runner
memrl/run/alfworld_rl_runner.py - ALFWorld environment
memrl/envs/alfworld_env.py - LLB runner
memrl/run/llb_rl_runner.py - LLB task adapter
memrl/lifelongbench_eval/task_wrappers.py - BCB runner
memrl/run/bcb_runner.py - BCB adapter
memrl/bigcodebench_eval/bcb_adapter.py
Tracing
- Tracing LLM
memrl/trace/tracing_llm.py - LLB JSONL trace
memrl/trace/llb_jsonl.py
Other components
- Experiment operator
- Benchmark tasks
Connections 26
- Experiment operator → CLI: starts runs
- CLI → LLB runner: dispatches
- Memory agent → Agent history: uses
memrl/agent/memp_agent.py - Memory agent → LLM provider: generates with
memrl/agent/memp_agent.py - Memory service → Memory building: builds memories
memrl/service/memory_service.py - Memory service → Memory retrieval: retrieves via
memrl/service/memory_service.py - Memory service → Memory update: updates via
memrl/service/memory_service.py - Memory service → Strategy config: selects strategies
memrl/service/memory_service.py - Memory service → Value learning: selects values
memrl/service/memory_service.py - Memory retrieval → Embedding provider: embeds queries
memrl/service/retrievers.py - Memory building → LLM provider: builds content
- HLE runner → Memory service: uses memory
memrl/run/hle_runner.py - HLE runner → LLM provider: uses provider
memrl/run/hle_runner.py - ALFWorld runner → Benchmark tasks: evaluates
- ALFWorld runner → ALFWorld environment: runs environment
memrl/envs/alfworld_env.py - ALFWorld runner → Memory service: uses memory
- LLB runner → Memory service: uses memory
memrl/run/llb_rl_runner.py - LLB runner → LLM provider: uses provider
memrl/run/llb_rl_runner.py - LLB runner → Embedding provider: uses provider
memrl/run/llb_rl_runner.py - LLB runner → LLB task adapter: adapts tasks
memrl/run/llb_rl_runner.py - LLB runner → Benchmark tasks: evaluates
- LLB runner → Tracing LLM: wraps provider
memrl/run/llb_rl_runner.py - Tracing LLM → LLB JSONL trace: records calls
memrl/trace/tracing_llm.py - BCB runner → BCB adapter: adapts evaluation
- BCB runner → Benchmark tasks: evaluates
- BCB runner → Memory service: uses memory