GoodMemGoodMem
IntegrationsAgent Frameworks

LlamaIndex

Expose GoodMem as a LlamaIndex tool spec so any agent can store, search, and manage long-term memories.

Stable· Python

Overview

GoodMem is a server-side memory layer for AI agents that handles embedding, semantic search, reranking, and LLM-powered summarization. The LlamaIndex integration wraps those operations in a BaseToolSpec (GoodMemToolSpec) so any LlamaIndex agent can store, search, and manage long-term memories. The tool spec exposes 11 sync/async tool pairs covering embedders, spaces, and memories.

Installation

pip install llamaindex-goodmem

The PyPI package is llamaindex-goodmem, but the import path is llama_index.tools.goodmem — the llama_index.* namespace is shared across the LlamaIndex ecosystem, so the install name and the import name intentionally differ. Import with from llama_index.tools.goodmem import GoodMemToolSpec.

Configuration

GoodMemToolSpec is configured through constructor arguments:

ParameterDescription
api_keyGoodMem API key (sent as X-API-Key). Required.
base_urlBase URL of your GoodMem server. Required.
verify_sslVerify TLS certificates. Set false for self-signed dev certs (default: true).
timeoutPer-request timeout in seconds (default: 120; LLM-summary retrievals can take tens of seconds).

The live e2e smoke test reads GOODMEM_API_KEY, GOODMEM_BASE_URL, and GOODMEM_VERIFY_SSL from the environment, plus GOODMEM_EMBEDDER_ID, GOODMEM_RERANKER_ID, and GOODMEM_LLM_ID.

Quick start

from llama_index.tools.goodmem import GoodMemToolSpec

tool_spec = GoodMemToolSpec(
    api_key="gm_xxx",
    base_url="https://your-goodmem-server.example.com",
    verify_ssl=True,    # set False for a self-signed dev cert
)

# Use with a LlamaIndex agent
tools = tool_spec.to_tool_list()

Local development. The example above uses a TLS-verified production URL. If you are running GoodMem locally with a self-signed certificate, use https://localhost:8080 and disable TLS verification with the client's verify-SSL option (see the Configuration table above). Keep TLS verification enabled for any deployed server.

Retrieval post-processing

GoodMem's retrieval call accepts these optional post-processing parameters (each framework exposes them under its own naming convention):

ParameterRangeDescription
reranker_idUUIDReranker model that reorders matched chunks by relevance.
llm_idUUIDLLM that generates a contextual answer (abstractReply) alongside the chunks.
relevance_threshold0–1Minimum relevance score for a result to be included.
llm_temperature0–2Sampling temperature for the LLM post-processor.
max_resultsintegerMaximum number of results to return.
chronological_resortbooleanRe-sort the final results by creation time instead of relevance.

Learn more

The full README, examples, and API reference are available on the PyPI package page.