Skip to content

Commit fb746a3

Browse files
committed
Fix README example of langchain integration
1 parent 3c3042a commit fb746a3

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ uv run agent-memory api --no-worker
3030

3131
### 2. Python SDK
3232

33+
Allowing the server to extract memories from working memory is easiest. However, you can also manually create memories:
34+
3335
```bash
3436
# Install the client
3537
pip install agent-memory-client
@@ -60,7 +62,12 @@ results = await client.search_long_term_memory(
6062
)
6163
```
6264

63-
#### LangChain Integration (No Manual Wrapping!)
65+
> **Note**: While you can call client functions directly as shown above, using **MCP or SDK-provided tool calls** is recommended for AI agents as it provides better integration, automatic context management, and follows AI-native patterns. For the best performance, you can add messages to working memory and allow the server to extract memories in the background. See **[Memory Integration Patterns](https://redis.github.io/agent-memory-server/memory-integration-patterns/)** for guidance on when to use each approach.
66+
67+
68+
#### LangChain Integration
69+
70+
For LangChain users, the SDK provides automatic conversion of memory client tools to LangChain-compatible tools, eliminating the need for manual wrapping with `@tool` decorators.
6471

6572
```python
6673
from agent_memory_client import create_memory_client
@@ -92,8 +99,6 @@ executor = AgentExecutor(agent=agent, tools=tools)
9299
result = await executor.ainvoke({"input": "Remember that I love pizza"})
93100
```
94101

95-
> **Note**: While you can call client functions directly as shown above, using **MCP or SDK-provided tool calls** is recommended for AI agents as it provides better integration, automatic context management, and follows AI-native patterns. See **[Memory Integration Patterns](https://redis.github.io/agent-memory-server/memory-integration-patterns/)** for guidance on when to use each approach.
96-
97102
### 3. MCP Integration
98103

99104
```bash
@@ -124,9 +129,9 @@ uv run agent-memory mcp --mode sse --port 9000 --no-worker
124129
```
125130
Working Memory (Session-scoped) → Long-term Memory (Persistent)
126131
↓ ↓
127-
- Messages - Semantic search
128-
- Context - Topic modeling
129-
- Structured memories - Entity recognition
132+
- Messages - Semantic search
133+
- Structured memories - Topic modeling
134+
- Summary of past messages - Entity recognition
130135
- Metadata - Deduplication
131136
```
132137

@@ -172,7 +177,7 @@ uv run agent-memory task-worker --concurrency 10
172177

173178
**Production features:**
174179
- **Authentication**: OAuth2/JWT with multiple providers (Auth0, AWS Cognito, etc.)
175-
- **Redis**: Requires Redis with RediSearch module (RedisStack recommended)
180+
- **Redis**: Requires Redis 8 or Redis with RediSearch module (RedisStack recommended)
176181
- **Background Processing**: Docket workers handle memory indexing, summarization, and compaction
177182
- **Scaling**: Supports Redis clustering and horizontal worker scaling
178183
- **Monitoring**: Structured logging and health checks included

0 commit comments

Comments
 (0)