Skip to main content

hindsight-llamaindex

LlamaIndex integration for Hindsight — persistent long-term memory for AI agents.

Provides two complementary patterns:

  • Tools (HindsightToolSpec) — Agent-driven memory via LlamaIndex's BaseToolSpec. The agent decides when to retain/recall/reflect.
  • Memory (HindsightMemory) — Automatic memory via LlamaIndex's BaseMemory interface. 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.0
  • hindsight-client >= 0.4.0

Documentation

Metadata

Release files for hindsight-llamaindex 0.1.5

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

Source distribution (sdist)

Source distribution for hindsight-llamaindex 0.1.5
File Size Uploaded
hindsight_llamaindex-0.1.5.tar.gz 188.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hindsight-llamaindex 0.1.5
File Interpreter ABI Platform
hindsight_llamaindex-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 202.3 kB

Release files / hindsight_llamaindex-0.1.5.tar.gz

Download URL hindsight_llamaindex-0.1.5.tar.gz
Size 188.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ed088297141ecd1836dabd701f82c308643587d74c7cbf6f2e6eaf032eeefa32
BLAKE2b-256 checksum
How to use checksums
96b2a877d34ea2c38709edc9ae1694cba3840a1279241ff9daf4b12022924d64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / hindsight_llamaindex-0.1.5-py3-none-any.whl

Download URL hindsight_llamaindex-0.1.5-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4de8487b43c79cdd83455d3fa350c490f2fc2c67bf7a97c347ec828f2951a863
BLAKE2b-256 checksum
How to use checksums
dec7eec63e0ea03dea9dc64741667922b47c9b0fdd096d9303854e359ce3b38f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release 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