Skip to main content

LlamaIndex Memory Integration: InfoLang

InfoLang is a hosted semantic memory API: remember stores text into a namespace, recall/recall_hybrid retrieves the most relevant chunks for a query. This package adapts it to LlamaIndex's BaseMemory interface.

Installation

Once published to PyPI, installation will be:

pip install llama-index-memory-infolang

Note: PyPI publication of this package and of its infolang>=0.2.0 dependency is pending. Until then, install both from source:

pip install git+https://github.com/InfoLang-Inc/llama-index-memory-infolang.git

Usage

from llama_index.memory.infolang import InfoLangMemory

memory = InfoLangMemory.from_api_key(
    api_key="il_live_...",
    namespace="user-123",  # optional; falls back to the key's default namespace
    top_k=5,  # optional, default is 5
)

You can also pass an already-constructed infolang.InfoLang client, e.g. to point at a self-hosted runtime or reuse an existing client:

from infolang import InfoLang
from llama_index.memory.infolang import InfoLangMemory

client = InfoLang(dev_key="il_dev_...", base_url="http://127.0.0.1:8766")
memory = InfoLangMemory.from_client(client, namespace="user-123")

Each put/set call writes new user/assistant messages to InfoLang via remember. Each get call folds the current turn (or an explicit input string) into an InfoLang recall, and prepends the recalled chunks to the local chat history as a system message — local chat history itself is kept in-process and is not read back from InfoLang, so reset() only clears the local buffer; it does not delete anything server-side.

With a chat engine

import os
from llama_index.llms.openai import OpenAI
from llama_index.core import SimpleChatEngine

os.environ["OPENAI_API_KEY"] = "<your-openai-api-key>"
llm = OpenAI(model="gpt-4o")

chat_engine = SimpleChatEngine.from_defaults(llm=llm, memory=memory)
response = chat_engine.chat("Hi, my name is Mayank")
print(response)

With an agent

from llama_index.core.agent.workflow import FunctionAgent

agent = FunctionAgent(tools=[...], llm=llm)
response = await agent.run("Hi, my name is Mayank", memory=memory)
print(response)

Note: For a full walkthrough see the example notebook.

References

Metadata

Release files for llama-index-memory-infolang 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 llama-index-memory-infolang 0.1.0
File Size Uploaded Provenance Actions
llama_index_memory_infolang-0.1.0.tar.gz 6.6 kB Without provenance Details for llama_index_memory_infolang-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-memory-infolang 0.1.0
File Interpreter ABI Platform Actions
llama_index_memory_infolang-0.1.0-py3-none-any.whl Python 3 none any Details for llama_index_memory_infolang-0.1.0-py3-none-any.whl

Total release size: 13.6 kB

Release files / llama_index_memory_infolang-0.1.0.tar.gz

Download URL llama_index_memory_infolang-0.1.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
031ebde60ab5c288099217e405f92a5cbb42250d7d9529a4b2f2ce23c47394d9
BLAKE2b-256 checksum
How to use checksums
81b0b7aa192193440b2df99c119507e1f0617caa73c1e6dadc1d502589da2181
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

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

Download URL llama_index_memory_infolang-0.1.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95df8d5c1e87a51c1c37f430bfba293a7e1da8f0af38e2299886b31ef75ff3f4
BLAKE2b-256 checksum
How to use checksums
a511919b0d7ec49ea9c5e4ebb7cd45d92c104e4727e8f9c396340d26ebb8ff91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for llama-index-memory-infolang 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