Skip to main content

llama-index-memory-itsuki

Itsuki long-term memory for LlamaIndex, as a memory block inside the host's own Memory class.

pip install llama-index-memory-itsuki
from llama_index.memory.itsuki import itsuki_memory

memory = itsuki_memory(user_id="user_42", session_id="thread_9")
response = await agent.run("What am I working on?", memory=memory)

Set ITSUKI_API_KEY in your environment. Create one at itsuki.app under API Keys.

A block, not a replacement

LlamaIndex has deprecated the BaseMemory generation that older third-party integrations target — ChatMemoryBuffer, SimpleComposableMemory and friends are on the way out. The current architecture is the Memory class composing BaseMemoryBlock subclasses, so that is what this ships.

Short-term chat history keeps working exactly as the host intends. Itsuki becomes the long-term half: _aget supplies durable memory for the turn, and _aput stages messages as they flush out of short-term memory.

Compose it yourself if you want a different arrangement:

from llama_index.core.memory import Memory
from llama_index.memory.itsuki import itsuki_memory_block

memory = Memory.from_defaults(
    session_id="thread_9",
    memory_blocks=[itsuki_memory_block("user_42", session_id="thread_9")],
)

Async, on purpose

BaseMemoryBlock is async-first, so this uses the Itsuki SDK's AsyncMemoryClient. A synchronous client here would block the event loop the agent runs on, once per step, for the length of an HTTP round trip.

Scoping

Argument Meaning
user_id the memory space — required, no default
session_id the conversation, and the de-duplication anchor
agent_id, run_id attribution only
project_id attribution, and enables project-scoped recall

search_msg_limit (default 5) controls how many recent turns inform the recall query.

Behaviour under failure

_aget returns an empty string and _aput returns quietly. A memory outage costs the agent context, never the answer. The API key is a private attribute, so it never appears in model_dump(), an export, or serialized agent state.

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_memory_itsuki-0.1.0.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_memory_itsuki-0.1.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_memory_itsuki-0.1.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_memory_itsuki-0.1.0.tar.gz
Algorithm Hash digest
SHA256 78c2f3cdc153e1dbd5d38edcb0f091edcd2e807f6931d465c1a5a5bd8ac99cc4
MD5 63cec1a975007a67995f26035895e095
BLAKE2b-256 d1fb950e0c1c5a2e1714beb35042969d9c09bb44fe6e83cbcc82a29e16c90cb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_memory_itsuki-0.1.0.tar.gz:

Publisher: publish-pypi.yml on 12ziyad/universal-memory-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llama_index_memory_itsuki-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_memory_itsuki-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5996d1973ee056c620bf9d57d8e814facc85d1621db31b383eba52b5b9379512
MD5 1fe12ea56970c6991939a9a814a237b2
BLAKE2b-256 885a91e8d568c3777ec5138b351ddf0e4bf203d85d0a908543033aa67f0e7303

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_memory_itsuki-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on 12ziyad/universal-memory-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

2 files

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