integrations/pydantic-ai/v0.1.0
charmbracelet/gumintegrations/pydantic-ai/v0.1.0Oct 2, 2026by het0814
Upgrading?
AI Summary
Initial release of the memanto-pydantic-ai integration, providing Pydantic AI agents with persistent, cross-session memory backed by Memanto.
Key Highlights
- Automatic recall of relevant memories injected into agent instructions before each run.
- Explicit memory tools for saving, searching, and querying memory.
- Agent lifecycle helper for setup and session activation.
- Comprehensive test suite covering setup, behavior, and retry logic.
New Features
- Automatic recall via `memory_instructions`
- Memory tools via `create_memanto_tools`
- Agent lifecycle helper `MemantoSetup`
- Packaging requirements (`pydantic-ai-slim>=2.0.0`)
Full Release Notes
# Release Notes for memanto-pydantic-ai v0.1.0 Initial release of `memanto-pydantic-ai`, giving [Pydantic AI](https://ai.pydantic.dev) agents persistent, cross-session memory backed by Memanto. Relevant memories are injected into each run automatically, and three tools let the model save, search, and query memory explicitly. ## New Features - **Automatic recall** (`integrations/pydantic-ai/memanto_pydantic_ai/tools.py`) - `memory_instructions(client, agent_id)` plugs into `Agent(instructions=...)`. Before each run it recalls the memories most relevant to the user's prompt and adds them to the agent's instructions. - Runs once per agent run (cached across tool-call steps). Only active memories are injected, never expired ones. - If the recall fails, it logs a warning and the run continues without memories, so a memory outage never takes the agent down. - **Memory tools** (`integrations/pydantic-ai/memanto_pydantic_ai/tools.py`) - `create_memanto_tools(client, agent_id)` returns `memanto_remember`, `memanto_recall`, and `memanto_answer` for `Agent(tools=...)`. - `include_remember` / `include_recall` / `include_answer` select a subset, e.g. for a read-only agent. - Invalid tool arguments (unknown memory type, out-of-range confidence or limit, over-long title) are sent back to the model as retries instead of failing the run. - **Agent lifecycle helper** (`integrations/pydantic-ai/memanto_pydantic_ai/tools.py`) - `MemantoSetup()` creates the Memanto agent if it doesn't exist and activates a session. It reads `MOORCHEH_API_KEY` when no key is passed. - Raises a clear `ValueError` at startup when a client isn't bound to the right agent, instead of failing on the first tool call. - **Packaging** (`integrations/pydantic-ai/pyproject.toml`) - Requires Python 3.10+, `pydantic-ai-slim>=2.0.0` (no bundled model-provider SDKs) and `memanto>=0.2.21`. ## Tests - `integrations/pydantic-ai/tests/test_tools.py`: 40 tests that run a real Pydantic AI agent against a mocked client. They cover setup, tool behaviour, retry-on-invalid-input, failing early on a misconfigured client, and automatic recall (caching, outage handling, multimodal prompts, query truncation). ## Full Changelog Full Changelog: https://github.com/moorcheh-ai/memanto/tree/integrations/pydantic-ai/v0.1.0/integrations/pydantic-ai
Related Repositories
ollama/ollama★ 184,219
Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
fatedier/frp★ 110,057
A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
infiniflow/ragflow★ 92,619
RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs
gohugoio/hugo★ 90,199
The world’s fastest framework for building websites.
junegunn/fzf★ 83,715
:cherry_blossom: A command-line fuzzy finder