Skip to main content Switch to mobile version recallic-pydantic-ai 0.1.2 Recallic as long-term memory for Pydantic AI agents: self-hosted, no LLM calls for memory, says when it has no record.
pip install recallic-pydantic-ai==0.1.2 Copy PIP instructions
Website: recallic.com
Long-term memory for Pydantic AI agents, backed by a self-hosted Recallic server. It is a Pydantic AI capability.
No LLM calls for memory. Storing and searching use Recallic's local models.
Across runs and conversations. Each run, what this user said before that bears on their prompt is recalled, whatever conversation it was said in.
Honest. When nothing answers it, the model is told there is no record instead of being handed near-misses to guess from.
Your data stays on your server, separated per user and per agent.
This package is Apache-2.0. The Recallic server is source-available.
pip install recallic-pydantic-ai Run Recallic (quickstart) and create a key with role service, which acts for each of your users (or use a user's own key and leave the user out):
python -m backend.tools.keys create --user my-pydantic-app --role service Automatic memory: RecallicMemory
import os from pydantic_ai import Agent from recallic_pydantic_ai import RecallicMemory memory = RecallicMemory(os.environ["RECALLIC_SERVICE_KEY"], base_url="http://localhost:8000", mode="balanced") # or "cautious" / "helpful" agent = Agent("openai:gpt-5-mini", instructions="You are a helpful assistant.", deps_type=str, capabilities=[memory]) agent.run_sync("I moved to Pune in March.", deps="alice") # days later, a new conversation print(agent.run_sync("Which city did I move to?", deps="alice").output) # "Pune." At the start of each run the capability recalls on the user's prompt. It puts the memories in front of the model, just before the prompt, as a
Whose memory. The user comes from the run's deps: a string is the user id, otherwise deps["user_id"] or deps.user_id. When the deps name no user, the user_id field is used. With neither, a service key falls back to the key's own user, which every run would then share. So with a service key, always name the user.
RecallicMemory has the default id recallic_memory. It also loads from an agent spec: Agent.from_spec(spec, custom_capability_types=[RecallicMemory]), with - RecallicMemory: {mode: cautious} in YAML and the key in RECALLIC_API_KEY.
Tools only: recallic_toolset()
When the agent should decide itself when to look things up or save them:
from recallic_pydantic_ai import recallic_toolset tools = recallic_toolset(os.environ["RECALLIC_SERVICE_KEY"]) # recall_memory(query), save_memory(fact) agent = Agent("openai:gpt-5-mini", deps_type=str, toolsets=[tools]) agent.run_sync("What's my sister's name?", deps="alice") The tools read the user from the run's deps in the same way.
The memories and the no-record note are capability parts (RecalledMemoriesPart, NoRecordPart), so they are kept in the run's message history and you can find them by type.
format_memories(recall_result) turns any Recallic recall result into plain text, as the recall_memory tool returns it.
Only the user's prompts are stored, not the model's replies.
Needs Recallic server 0.2.5 or newer. Tested with pydantic-ai-slim 2.77.0.
Against a running Recallic: RECALLIC_URL=http://127.0.0.1:8000 RECALLIC_SERVICE_KEY=rx_... pytest tests. They run a real Agent with a scripted FunctionModel, including its tool loop, and one with TestModel.
Licence: Apache-2.0.
Released: Dec 3, 2026
Apache-2.0 View SPDX License List
Release files for recallic-pydantic-ai 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 24.4 kB
Release files / recallic_pydantic_ai-0.1.2.tar.gz
Security for recallic-pydantic-ai 0.1.2
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 3, 2026 2 release files No provenance
Nov 30, 2026 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from 4d99e05











