docs(index): update agent memory definition and architecture figure

This commit is contained in:
jinli.yl 2025-11-27 20:31:00 +08:00
parent a968b6fd44
commit 46249bbea7
2 changed files with 40 additions and 5 deletions

View file

@ -27,16 +27,19 @@ kernelspec:
ReMe provides AI agents with a unified memory system—enabling the ability to extract, reuse, and share memories across
users, tasks, and agents.
```
Personal Memory + Task Memory + Tool Memory = Agent Memory
Agent memory can be viewed as:
```text
Agent Memory = Long-Term Memory + Short-Term Memory
= (Personal + Task + Tool) Memory + (Working Memory)
```
Personal memory helps "**understand user preferences**", task memory helps agents "**perform better**", and tool memory enables "**smarter tool usage**".
Personal memory helps "**understand user preferences**", task memory helps agents "**perform better**", and tool memory enables "**smarter tool usage**". Working memory provides **short-term contextual memory** by keeping recent reasoning and tool results compact and accessible without overflowing the model's context window.
## Architecture Design
<p align="center">
<img src="_static/figure/reme_structure.jpg" alt="ReMe Logo" width="100%">
<img src="_static/figure/reme_usage.jpg" alt="ReMe Logo" width="100%">
</p>
ReMe integrates three complementary memory capabilities:
@ -83,6 +86,25 @@ Data-driven tool selection and usage optimization
Learn more about how to use tool memory from [tool memory](tool_memory/tool_memory.md)
:::{admonition} Working Memory
:class: note
Shortterm contextual memory for longrunning agents via **message offload & reload**:
- **Message Offload**: Compact large tool outputs to external files or LLM summaries
- **Message Reload**: Search (`grep_working_memory`) and read (`read_working_memory`) offloaded content on demand
**📖 Concept & API**:
- Message offload overview: [Message Offload](work_memory/message_offload.md)
- Offload / reload operators: [Message Offload Ops](work_memory/message_offload_ops.md), [Message Reload Ops](work_memory/message_reload_ops.md)
**💻 EndtoEnd Demo**:
- Working memory quick start: [Working Memory Quick Start](cookbook/working/quick_start.md)
- ReAct agent with working memory: [react_agent_with_working_memory.py](../cookbook/working_memory/react_agent_with_working_memory.py)
- Runnable demo: [work_memory_demo.py](../cookbook/working_memory/work_memory_demo.py)
:::
---
## 📦 Ready-to-Use Memories

View file

@ -18,7 +18,20 @@ kernelspec:
### Purpose
Manages context window limits by intelligently offloading message content through compaction and compression strategies to reduce token usage while preserving important information.
As AI agents evolved from simple chatbots to sophisticated autonomous systems, the focus shifted from "prompt engineering" to "context engineering". Agentic systems work by binding LLMs with tools and running them in a loop where the agent decides which tools to call and feeds results back into the message history. This creates a **context explosion** problem:
- **Rapid Growth**: A seemingly simple task can trigger 50+ tool calls, with production agents often running hundreds of conversation turns
- **Large Outputs**: Each tool call can return substantial text, consuming massive amounts of tokens
- **Memory Pressure**: The context window quickly fills up as messages and tool results accumulate chronologically
When context grows too large, model performance degrades significantly—a phenomenon known as **"context rot"**:
- **Repetitive Responses**: The model starts generating redundant or circular answers
- **Slower Reasoning**: Inference becomes noticeably slower as context length increases
- **Quality Degradation**: Overall response quality and coherence decline
- **Lost Focus**: The model struggles to identify relevant information in the bloated context
**MessageOffloadOp** addresses this fundamental challenge by managing context window limits through intelligent offloading strategies. It implements compaction and compression techniques to reduce token usage while preserving important information, enabling agents to handle arbitrarily long conversations and complex tasks while maintaining optimal performance throughout.
### Functionality