Skip to content

Commit b838fca

Browse files
committed
More client enhancements to tool-based access
1 parent 7dcb08a commit b838fca

26 files changed

+4543
-1825
lines changed

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ uv run ruff check # Run linting
1616
uv run ruff format # Format code
1717
uv run pytest # Run tests
1818
uv run pytest tests/ # Run specific test directory
19+
uv add <dependency> # Add a dependency to pyproject.toml and update lock file
20+
uv remove <dependency> # Remove a dependency from pyproject.toml and update lock file
1921

2022
# Server commands
2123
uv run agent-memory api # Start REST API server (default port 8000)

agent-memory-client/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ working_memory = WorkingMemory(
105105
)
106106

107107
# Store working memory
108-
response = await client.put_session_memory("user-session-123", working_memory)
108+
response = await client.put_working_memory("user-session-123", working_memory)
109109

110110
# Retrieve working memory
111-
memory = await client.get_session_memory("user-session-123")
111+
memory = await client.get_working_memory("user-session-123")
112112

113113
# Convenience method for data storage
114114
await client.set_working_memory_data(
@@ -204,7 +204,7 @@ await client.update_working_memory_data(
204204
merge_strategy="deep_merge" # "replace", "merge", or "deep_merge"
205205
)
206206

207-
# Append messages efficiently
207+
# Append messages
208208
new_messages = [
209209
MemoryMessage(role="user", content="What's the weather?"),
210210
MemoryMessage(role="assistant", content="It's sunny today!")
@@ -225,7 +225,7 @@ from agent_memory_client.filters import (
225225
)
226226
from datetime import datetime, timezone
227227

228-
# Complex search with multiple filters
228+
# Complex search with filters
229229
results = await client.search_long_term_memory(
230230
text="machine learning",
231231
session_id=SessionId(in_=["session-1", "session-2"]),
@@ -251,7 +251,7 @@ from agent_memory_client.exceptions import (
251251
)
252252

253253
try:
254-
memory = await client.get_session_memory("nonexistent-session")
254+
memory = await client.get_working_memory("nonexistent-session")
255255
except MemoryNotFoundError:
256256
print("Session not found")
257257
except MemoryServerError as e:
@@ -286,12 +286,12 @@ pytest --cov=agent_memory_client
286286
### Code Quality
287287

288288
```bash
289-
# Format code
290-
black agent_memory_client/
291-
292289
# Lint code
293290
ruff check agent_memory_client/
294291

292+
# Format code
293+
ruff format agent_memory_client/
294+
295295
# Type checking
296296
mypy agent_memory_client/
297297
```

0 commit comments

Comments
 (0)