mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
Memory tools now work out-of-the-box without any backend installed. Instead of raising ImportError when hanzo-memory is not available, all tools fall back to MarkdownMemoryBackend which: - Reads context from local .md files (MEMORY.md, LLM.md, CLAUDE.md, AGENTS.md, GEMINI.md, etc.) in CWD and parent dirs up to 4 levels - Writes new memories to MEMORY.md at project root or ~/.claude/MEMORY.md - Uses keyword scoring for search (zero external dependencies) - Stores session facts in-memory Changes: - pkg/hanzo-tools-memory: add markdown_memory.py (new MarkdownMemoryBackend) - pkg/hanzo-tools-memory: update memory_tools.py, knowledge_tools.py, unified_memory_tool.py to use markdown fallback via _get_backend() - pkg/hanzo-tools-memory: update __init__.py to export ALL_TOOL_CLASSES (individual tools) so each gets its own MCP tool name - pkg/hanzo-tools-memory: bump to 0.2.1 (published to PyPI) - pkg/hanzo-mcp: bump to 0.11.8 to force uvx venv rebuild (published) Install hanzo-tools-memory[full] for full vector search via hanzo-memory.
hanzo-tools-memory
Memory and knowledge management tools for Hanzo MCP.
Installation
pip install hanzo-tools-memory
Tools
memory - Unified Memory Management
Single tool with multiple actions for memory operations.
Recall memories:
memory(action="recall", query="project architecture")
memory(action="recall", queries=["user preferences", "coding standards"])
Create memories:
memory(action="create", data={"content": "User prefers dark mode"})
memory(action="create", statements=["Fact 1", "Fact 2"])
Update memories:
memory(action="update", id="mem_123", statement="Updated fact")
Delete memories:
memory(action="delete", ids=["mem_123", "mem_456"])
Knowledge bases:
memory(action="facts", query="API endpoints", kb_name="api_docs")
memory(action="store", facts=["Rate limit: 100/hour"], kb_name="api_docs")
memory(action="kb", action_type="list") # List knowledge bases
Summarize:
memory(
action="summarize",
content="Long discussion about API design...",
topic="API Design Decisions"
)
Scopes
session- Current session onlyproject- Project-specific (default)global- Across all projects
License
MIT