Skip to main content

langflow-recallic: Recallic memory components for Langflow

Website: recallic.com

Long-term memory for Langflow flows and agents, backed by a self-hosted Recallic server. Two components:

  • Recallic Recall looks up what a user told your flow before. When no stored memory answers the question, it returns a note saying there is no record (and that the model should not guess about the user's past) instead of near-misses.
  • Recallic Save stores what the user said, so later runs can recall it.

No LLM calls are made for memory: storing and searching use Recallic's local models. Your data stays on your server, separated per user and per agent.

This integration is Apache-2.0. The Recallic server is source-available.

Install

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 User ID empty):

python -m backend.tools.keys create --user my-langflow-app --role service

Then add the components to Langflow in one of three ways.

1. As a Langflow extension (Langflow 1.13 or newer). Install the package into the same Python environment as Langflow and restart it. The components appear in the sidebar under Recallic.

pip install langflow-recallic

2. From a components folder. Copy the recallic folder from src/langflow_recallic/components/ into a folder of your own and start Langflow with that folder on its components path:

LANGFLOW_COMPONENTS_PATH=/path/to/my-components langflow run

3. Pasted as a custom component. In a flow, add a Custom Component, open its code editor, and replace the code with the whole of recallic_recall.py (or recallic_save.py). Each file is self-contained: it uses the recallic Python package when Langflow's environment has it, and plain HTTP when it does not.

Usage

A chat flow with memory:

Chat Input ──► Recallic Recall (Query) ──► Prompt {memories} ──► Language Model ──► Chat Output
     └───────► Recallic Save (Message)
  1. Connect Chat Input to the Query of Recallic Recall and to the Message of Recallic Save.
  2. Set Recallic URL, Recallic API Key (store it as a Langflow global variable) and User ID on both. In a multi-user app, connect the User ID to whatever carries your user's id (for example the session id).
  3. Put {memories} in your Prompt and connect the Memories output to it. The prompt gets either the memories, newest facts first with the date each was said, or the no-record note.

Langflow does not promise which of the two branches runs first. That is fine: a stored question is not taken as an answer to itself.

For an Agent, turn on Tool Mode on either component and connect it to the Agent's Tools. The agent then fills in the Query (or Message) itself.

To check the components from Python, outside Langflow:

import asyncio
from langflow_recallic import RecallicRecallComponent, RecallicSaveComponent

conn = dict(recallic_url="http://localhost:8000", api_key="rx_...", recallic_user_id="alice")
print(asyncio.run(RecallicSaveComponent(**conn, message="I moved to Pune in March.").save_message()).text)
print(asyncio.run(RecallicRecallComponent(**conn, query="Which city did I move to?").recall_message()).text)

Recallic Recall

Input Default What it does
Query required What to look up, usually the user's latest message.
User ID empty Whose memory to read. Needed with a service key; leave empty with a user's own key.
Recallic URL http://localhost:8000 Your Recallic server.
Recallic API Key required A Recallic key (a secret field).
Agent ID (advanced) langflow Recallic agent id; each agent reads back what it wrote (and what any agent shared).
Mode (advanced) Server default cautious declines more (more "I don't know"); helpful answers more counting, ordering and "how long between" questions.
Max Memories (advanced) 5 Memories returned per lookup.
Timeout (advanced) 30 Seconds per request to Recallic.
Output What it returns
Memories (Message) The memories as text for a prompt, or the no-record note when nothing answers the query.
Memory Data (Data list) One Data per memory (text, id, timestamp, score, agent_id); an empty list when nothing answers.

Recallic Save

Same User ID, Recallic URL, Recallic API Key, Agent ID and Timeout inputs, plus:

Input Default What it does
Message required What to remember, in the user's words.
Memory Type (advanced) private shared makes it readable by all of the user's agents.

Output Status (Message): Saved., Already remembered. (an exact repeat is skipped) or Not stored (...).

Notes

  • The user field is named recallic_user_id in code, because Langflow components already have a user_id (the Langflow user running the flow).
  • Recallic Recall makes one request per run, shared by both of its outputs.
  • Needs Recallic server 0.2.5 or newer. Tested with lfx 1.13.4 (the package that holds Langflow's component classes).

Tests

Against a running Recallic: RECALLIC_URL=http://127.0.0.1:8000 RECALLIC_SERVICE_KEY=rx_... pytest tests. They run the components' outputs against the server and load them the three ways above (installed extension, components folder, pasted code).

Licence: Apache-2.0.

Metadata

Release files for langflow-recallic 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langflow-recallic 0.1.0
File Size Uploaded Provenance Actions
langflow_recallic-0.1.0.tar.gz 12.3 kB Without provenance Details for langflow_recallic-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langflow-recallic 0.1.0
File Interpreter ABI Platform Actions
langflow_recallic-0.1.0-py3-none-any.whl Python 3 none any Details for langflow_recallic-0.1.0-py3-none-any.whl

Total release size: 26.6 kB

Release files / langflow_recallic-0.1.0.tar.gz

Download URL langflow_recallic-0.1.0.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2a91e9e74ee22e5223abad06c0363a5b9a59332d75aee64ef263a002f02159d2
BLAKE2b-256 checksum
How to use checksums
2ffccfeb0343850a62087af4537d224eebe4c8a40d6fd78a264f9880fa9772c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / langflow_recallic-0.1.0-py3-none-any.whl

Download URL langflow_recallic-0.1.0-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8a314e643adab5f5fbdcdc95142953045a05a8bc00448101b8bf69ea2fbf550
BLAKE2b-256 checksum
How to use checksums
9b85800a24638dc389a96989a9a5e83b3e4a58e7e2fecbb0e5ee5e217d6b0184
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for langflow-recallic 0.1.0

Provenance

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.

No provenance found

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

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page