Skip to content

Commit 60567e2

Browse files
committed
Docs cleanup: working memory, extraction
1 parent f33ca16 commit 60567e2

9 files changed

+312
-231
lines changed

docs/advanced-topics-index.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Advanced Topics
2+
3+
Optimize memory search, tune ranking algorithms, and configure advanced vector store features.
4+
5+
<div class="grid cards" markdown>
6+
7+
- 🔍 **Query Optimization**
8+
9+
---
10+
11+
Improve search accuracy with query expansion and rewriting
12+
13+
[Query Optimization →](query-optimization.md)
14+
15+
- ⏱️ **Recency Boost**
16+
17+
---
18+
19+
Time-aware memory ranking for more relevant results
20+
21+
[Recency Boost →](recency-boost.md)
22+
23+
- 🗄️ **Advanced Vector Store Config**
24+
25+
---
26+
27+
Fine-tune vector indexing, distance metrics, and performance
28+
29+
[Vector Store Config →](vector-store-advanced.md)
30+
31+
- 🎯 **Contextual Grounding**
32+
33+
---
34+
35+
Resolve pronouns and references in extracted memories
36+
37+
[Contextual Grounding →](contextual-grounding.md)
38+
39+
</div>
40+
41+
## When to Use These Features
42+
43+
| Feature | Use When |
44+
|---------|----------|
45+
| Query Optimization | Search results aren't matching user intent well |
46+
| Recency Boost | Recent memories should rank higher than older ones |
47+
| Advanced Vector Config | You need to tune performance or use custom distance metrics |
48+
| Contextual Grounding | Extracted memories contain unresolved pronouns like "he" or "it" |

docs/api-reference-index.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# API Reference
2+
3+
Complete reference documentation for all Redis Agent Memory Server interfaces.
4+
5+
<div class="grid cards" markdown>
6+
7+
- 🌐 **REST API**
8+
9+
---
10+
11+
HTTP endpoints for memory operations with complete examples
12+
13+
[REST API Reference →](api.md)
14+
15+
- 🤖 **MCP Server**
16+
17+
---
18+
19+
Model Context Protocol tools for AI agents (Claude Desktop, etc.)
20+
21+
[MCP Reference →](mcp.md)
22+
23+
- 💻 **CLI Reference**
24+
25+
---
26+
27+
Command-line interface for server management
28+
29+
[CLI Reference →](cli.md)
30+
31+
</div>
32+
33+
## Interface Comparison
34+
35+
| Interface | Best For | Authentication |
36+
|-----------|----------|----------------|
37+
| REST API | Applications, backends, custom integrations | OAuth2/JWT or token |
38+
| MCP Server | Claude Desktop, MCP-compatible AI agents | Environment config |
39+
| CLI | Server administration, development | Local access |
40+
41+
## Interactive API Docs
42+
43+
When running the server locally, visit `http://localhost:8000/docs` for interactive Swagger documentation where you can try endpoints directly.

docs/developer-guide-index.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Developer Guide
2+
3+
Learn how to integrate memory into your AI applications. This guide covers integration patterns, memory types, extraction strategies, and production considerations.
4+
5+
## Core Concepts
6+
7+
<div class="grid cards" markdown>
8+
9+
- 🔄 **Memory Integration Patterns**
10+
11+
---
12+
13+
Three patterns for using memory: LLM-driven, code-driven, and background extraction
14+
15+
[Integration Patterns →](memory-integration-patterns.md)
16+
17+
- 📝 **Working Memory**
18+
19+
---
20+
21+
Session-scoped storage for active conversation state
22+
23+
[Working Memory →](working-memory.md)
24+
25+
- 🧠 **Long-term Memory**
26+
27+
---
28+
29+
Persistent, cross-session storage for knowledge that should be retained
30+
31+
[Long-term Memory →](long-term-memory.md)
32+
33+
- 🎯 **Memory Extraction Strategies**
34+
35+
---
36+
37+
Configure how memories are extracted: discrete, summary, preferences, or custom
38+
39+
[Extraction Strategies →](memory-extraction-strategies.md)
40+
41+
</div>
42+
43+
## Additional Topics
44+
45+
| Topic | Description |
46+
|-------|-------------|
47+
| [Memory Lifecycle](memory-lifecycle.md) | How memories are created, updated, and managed over time |
48+
| [Vector Store Backends](vector-store-backends.md) | Configure Redis, Pinecone, Chroma, or other backends |
49+
| [AWS Bedrock](aws-bedrock.md) | Using AWS Bedrock for embeddings and generation |
50+
| [Authentication](authentication.md) | OAuth2/JWT and token-based authentication |
51+
| [Security](security-custom-prompts.md) | Security considerations for custom prompts |
52+
53+
## Where to Start
54+
55+
**Building a chatbot?** Start with [Memory Integration Patterns](memory-integration-patterns.md) to understand your options.
56+
57+
**Need to understand the data model?** Read [Working Memory](working-memory.md) and [Long-term Memory](long-term-memory.md).
58+
59+
**Configuring extraction behavior?** See [Memory Extraction Strategies](memory-extraction-strategies.md).

docs/getting-started-index.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Getting Started
2+
3+
Get up and running with Redis Agent Memory Server. Whether you want a quick 5-minute setup or a comprehensive installation guide, start here.
4+
5+
<div class="grid cards" markdown>
6+
7+
- 🚀 **Quick Start**
8+
9+
---
10+
11+
Get a working memory server in 5 minutes with the Python SDK
12+
13+
[Quick Start Guide →](quick-start.md)
14+
15+
- 📦 **Installation**
16+
17+
---
18+
19+
Complete installation options: CLI, Docker Compose, and production setup
20+
21+
[Installation Guide →](getting-started.md)
22+
23+
- 💡 **Use Cases**
24+
25+
---
26+
27+
Real-world examples across industries and applications
28+
29+
[Explore Use Cases →](use-cases.md)
30+
31+
</div>
32+
33+
## Recommended Path
34+
35+
**New to memory systems?** Start with the [Quick Start Guide](quick-start.md) to understand the basics and see immediate results.
36+
37+
**Ready for production?** Jump to the [Installation Guide](getting-started.md) for Docker Compose setup and worker configuration.

docs/memory-extraction-strategies.md

Lines changed: 13 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
# Memory Extraction Strategies
22

3-
The Redis Agent Memory Server supports configurable memory extraction strategies that determine how memories are extracted from conversations when they are promoted from working memory to long-term storage.
3+
This reference documents the configurable extraction strategies that determine how memories are extracted from conversations during [background extraction](memory-integration-patterns.md#pattern-3-background-extraction-automatic).
44

5-
## Overview
6-
7-
Memory strategies allow you to customize the extraction behavior for different use cases:
5+
## Available Strategies
86

9-
- **Discrete Strategy**: Extract individual facts and preferences (default)
10-
- **Summary Strategy**: Create conversation summaries
11-
- **Preferences Strategy**: Focus on user preferences and characteristics
12-
- **Custom Strategy**: Use domain-specific extraction prompts
7+
| Strategy | Description | Best For |
8+
|----------|-------------|----------|
9+
| **Discrete** (default) | Extract individual facts and preferences | General chat, factual information |
10+
| **Summary** | Create conversation summaries | Meeting notes, long conversations |
11+
| **Preferences** | Focus on user preferences and characteristics | Personalization, user profiles |
12+
| **Custom** | Use domain-specific extraction prompts | Technical, legal, medical domains |
1313

14-
Each strategy produces different types of memories optimized for specific applications.
15-
16-
## Available Strategies
14+
## Strategy Reference
1715

1816
### 1. Discrete Memory Strategy (Default)
1917

@@ -214,121 +212,11 @@ else:
214212
!!! info "Full Security Documentation"
215213
For comprehensive security guidance, attack examples, and production recommendations, see the [Security Guide](security-custom-prompts.md).
216214

217-
## Strategy-Aware MCP Tools
218-
219-
Each working memory session can generate MCP tools that understand its configured strategy:
220-
221-
```python
222-
# Get strategy-specific tool description
223-
tool_description = working_memory.get_create_long_term_memory_tool_description()
224-
225-
# Create strategy-aware MCP tool
226-
create_memories_tool = working_memory.create_long_term_memory_tool()
227-
```
228-
229-
The generated tools include strategy-specific guidance in their descriptions, helping LLMs understand the expected extraction behavior.
230-
231-
**Example Tool Descriptions:**
232-
233-
=== "Discrete Strategy"
234-
```
235-
Create long-term memories by extracting discrete semantic and episodic facts.
236-
Focus on individual facts, user preferences, and specific events.
237-
```
238-
239-
=== "Summary Strategy"
240-
```
241-
Create long-term memories by summarizing conversation content.
242-
Generate concise summaries capturing key discussion points.
243-
```
244-
245-
=== "Custom Strategy"
246-
```
247-
Create long-term memories using custom extraction focused on:
248-
- Technology choices made
249-
- Architecture decisions
250-
- Implementation details
251-
```
252-
253-
## Usage Examples
254-
255-
### Basic Strategy Configuration
256-
257-
```python
258-
from agent_memory_client import MemoryAPIClient
259-
from agent_memory_server.models import MemoryStrategyConfig
260-
261-
client = MemoryAPIClient()
262-
263-
# Configure strategy for technical discussions
264-
tech_strategy = MemoryStrategyConfig(
265-
strategy="custom",
266-
config={
267-
"custom_prompt": """
268-
Extract technical decisions from: {message}
269-
Focus on technology choices, architecture, and implementation details.
270-
Return JSON with memories array.
271-
"""
272-
}
273-
)
274-
275-
# Apply to working memory
276-
working_memory = await client.set_working_memory(
277-
session_id="tech-session",
278-
messages=[
279-
{"role": "user", "content": "Let's use PostgreSQL for the database and Redis for caching"},
280-
{"role": "assistant", "content": "Good choices! That architecture will scale well."}
281-
],
282-
long_term_memory_strategy=tech_strategy
283-
)
284-
```
285-
286-
### Strategy Selection by Use Case
287-
288-
```python
289-
def get_strategy_for_domain(domain: str) -> MemoryStrategyConfig:
290-
"""Select appropriate strategy based on application domain."""
291-
292-
if domain == "customer_support":
293-
return MemoryStrategyConfig(
294-
strategy="preferences",
295-
config={}
296-
)
297-
298-
elif domain == "meeting_notes":
299-
return MemoryStrategyConfig(
300-
strategy="summary",
301-
config={"max_summary_length": 800}
302-
)
303-
304-
elif domain == "technical_consulting":
305-
return MemoryStrategyConfig(
306-
strategy="custom",
307-
config={
308-
"custom_prompt": """
309-
Extract technical recommendations from: {message}
310-
Focus on: technology stack, architecture patterns, best practices.
311-
Format as JSON memories.
312-
"""
313-
}
314-
)
315-
316-
else:
317-
# Default to discrete strategy
318-
return MemoryStrategyConfig(
319-
strategy="discrete",
320-
config={}
321-
)
322-
323-
# Use domain-specific strategy
324-
strategy = get_strategy_for_domain("technical_consulting")
325-
```
326-
327-
### REST API Integration
215+
## REST API Usage
328216

329217
```bash
330218
# Configure memory strategy via REST API
331-
curl -X POST "http://localhost:8000/v1/working-memory/" \
219+
curl -X PUT "http://localhost:8000/v1/working-memory/my-session" \
332220
-H "Content-Type: application/json" \
333221
-d '{
334222
"session_id": "api-session",
@@ -342,6 +230,8 @@ curl -X POST "http://localhost:8000/v1/working-memory/" \
342230
}'
343231
```
344232

233+
For more comprehensive integration examples, see [Memory Integration Patterns](memory-integration-patterns.md).
234+
345235
## Best Practices
346236

347237
### 1. Strategy Selection Guidelines

0 commit comments

Comments
 (0)