LlamaIndex integration for Hindsight - persistent memory for AI agents
Project description
hindsight-llamaindex
LlamaIndex integration for Hindsight — persistent long-term memory for AI agents.
Provides two complementary patterns:
- Tools (
HindsightToolSpec) — Agent-driven memory via LlamaIndex'sBaseToolSpec. The agent decides when to retain/recall/reflect. - Memory (
HindsightMemory) — Automatic memory via LlamaIndex'sBaseMemoryinterface. Messages are stored on every turn and recalled as context.
Installation
pip install hindsight-llamaindex
Quick Start: Agent Tools
import asyncio
from hindsight_client import Hindsight
from hindsight_llamaindex import HindsightToolSpec
from llama_index.llms.openai import OpenAI
from llama_index.core.agent import ReActAgent
async def main():
client = Hindsight(base_url="http://localhost:8888")
spec = HindsightToolSpec(
client=client,
bank_id="user-123",
mission="Track user preferences",
)
tools = spec.to_tool_list()
agent = ReActAgent(tools=tools, llm=OpenAI(model="gpt-4o"))
response = await agent.run("Remember that I prefer dark mode")
print(response)
asyncio.run(main())
Quick Start: Automatic Memory
from hindsight_client import Hindsight
from hindsight_llamaindex import HindsightMemory
client = Hindsight(base_url="http://localhost:8888")
memory = HindsightMemory.from_client(
client=client,
bank_id="user-123",
mission="Track user preferences",
)
agent = ReActAgent(tools=tools, llm=llm, memory=memory)
Configuration
from hindsight_llamaindex import configure
configure(
hindsight_api_url="http://localhost:8888",
api_key="your-api-key",
budget="mid",
tags=["source:llamaindex"],
context="my-app",
mission="Track user preferences",
)
Requirements
- Python 3.10+
llama-index-core >= 0.11.0hindsight-client >= 0.4.0
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hindsight_llamaindex-0.1.3.tar.gz.
File metadata
- Download URL: hindsight_llamaindex-0.1.3.tar.gz
- Upload date:
- Size: 172.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6aedbf0cedf7d5c69d6546ff4b521c2476d6446c7e52d77fa9471eaf26b7c4d9
|
|
| MD5 |
a09e28e67a84dba6f88403def82f1fc3
|
|
| BLAKE2b-256 |
7295d6ac7577db7ae52dfe3feb0efb8fd01c88d9b75e1539a310e472753c50b1
|
Provenance
The following attestation bundles were made for hindsight_llamaindex-0.1.3.tar.gz:
Publisher:
release-integration.yml on vectorize-io/hindsight
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hindsight_llamaindex-0.1.3.tar.gz -
Subject digest:
6aedbf0cedf7d5c69d6546ff4b521c2476d6446c7e52d77fa9471eaf26b7c4d9 - Sigstore transparency entry: 1200134036
- Sigstore integration time:
-
Permalink:
vectorize-io/hindsight@75e2679cf1dc8a94ee367320bea138c371e044fe -
Branch / Tag:
refs/tags/integrations/llamaindex/v0.1.3 - Owner: https://github.com/vectorize-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-integration.yml@75e2679cf1dc8a94ee367320bea138c371e044fe -
Trigger Event:
push
-
Statement type:
File details
Details for the file hindsight_llamaindex-0.1.3-py3-none-any.whl.
File metadata
- Download URL: hindsight_llamaindex-0.1.3-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ebaed204fbad718ed5cdc5fb5065736c461d1ad038bee0f8ac5ffefa4cac29e
|
|
| MD5 |
3fa6cf8bca7eb15440a1178ff04b1931
|
|
| BLAKE2b-256 |
800d4646e99362171c2767af2e717f21f9aa9a1fe598a513ab9a8e0d396ff55b
|
Provenance
The following attestation bundles were made for hindsight_llamaindex-0.1.3-py3-none-any.whl:
Publisher:
release-integration.yml on vectorize-io/hindsight
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hindsight_llamaindex-0.1.3-py3-none-any.whl -
Subject digest:
7ebaed204fbad718ed5cdc5fb5065736c461d1ad038bee0f8ac5ffefa4cac29e - Sigstore transparency entry: 1200134037
- Sigstore integration time:
-
Permalink:
vectorize-io/hindsight@75e2679cf1dc8a94ee367320bea138c371e044fe -
Branch / Tag:
refs/tags/integrations/llamaindex/v0.1.3 - Owner: https://github.com/vectorize-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-integration.yml@75e2679cf1dc8a94ee367320bea138c371e044fe -
Trigger Event:
push
-
Statement type: