v0.2.28
mahimailabs/voicegatewayv0.2.28Oct 13, 2026by het0814
Upgrading?
AI Summary
Adds conversation extraction to the in-process Python client and introduces a specific error type to distinguish between empty extraction results and failures.
Key Highlights
- New `Memanto.extract` method for extracting typed memories from chat turns
- New `NothingToExtractError` exception for empty extraction results
- Bug fix preventing misleading batch write errors when all candidates are unusable
New Features
- `Memanto.extract` function
- `NothingToExtractError` exception
Full Release Notes
# Release Notes for v0.2.28
This release adds conversation extraction to the in-process Python client and gives "nothing to extract" its own error. Callers such as per-turn memory hooks can now tell an empty conversation apart from a real extraction failure.
## New Features
- **`Memanto.extract` on the Python client** (`memanto/client.py`)
- New `Memanto(agent_id).extract(messages, *, dry_run=False, max_memories=20, ai_model=None)` takes `{"role": ..., "content": ...}` chat turns, extracts typed memories and stores them under the client's agent.
- With `dry_run=True` it returns the candidates without storing them. Otherwise it returns the candidates together with the batch result (`successful`, `failed`, `results`, ...).
- It works with both the local (`DirectClient`) and server-backed (`SdkClient`) modes.
## Improvements
- **New `NothingToExtractError` for conversations with nothing to remember** (`memanto/app/services/conversation_memory_extraction_service.py`, `memanto/__init__.py`)
- It is raised when the LLM returns an empty JSON array (`[]`, `Nothing to store: []`, or a fenced ```` ```json [] ```` block). Before this release, that case fell through to the generic `"Memory extraction did not return valid JSON"` error.
- Output that really is not JSON still raises a plain `ValueError`, so it can be told apart from an empty extraction.
- It subclasses `ValueError`, so existing `except ValueError` handlers (including the REST `/extract` route) keep working.
- It can be imported from the top level with `from memanto import NothingToExtractError`.
## Bug Fixes
- **Extraction with no usable candidates no longer fails as an empty batch write** (`memanto/cli/client/direct_client.py`, `memanto/cli/client/sdk_client.py`)
- Before: when every extracted candidate was dropped during normalization (for example, all had empty `content`), a non-dry-run extraction passed an empty list to `batch_remember`. That call then failed with the misleading `"Batch must contain at least one memory"`.
- Now both clients raise `NothingToExtractError` before any write is attempted. `dry_run=True` still returns a preview with zero candidates (`candidates: []`, `count: 0`).
## Tests
- `tests/test_conversation_memory_extraction.py`: an empty array raises `NothingToExtractError` across the three answer formats. Non-JSON output stays a plain `ValueError`. The error is a `ValueError` subclass, and all-unusable candidates still return `[]` from the service. Both `DirectClient` and `SdkClient` raise without calling `batch_remember`, and their dry run previews zero candidates.
- `tests/test_python_client.py`: `Memanto.extract` is scoped to the agent and passes its options through, and `memanto.NothingToExtractError` is exported.
## Full Changelog
Full Changelog: https://github.com/moorcheh-ai/memanto/compare/v0.2.27...v0.2.28Related Repositories
openclaw/openclaw★ 392,705
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
nilbuild/developer-roadmap★ 370,073
Interactive roadmaps, guides and other educational content to help developers grow in their careers.
morluto/rea★ 358,099
Reverse engineer anything with agents, from app behavior down to native binaries.
anomalyco/opencode★ 219,703
The open source coding agent.
n8n-io/n8n★ 208,257
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.