LlamaIndex
Expose GoodMem as a LlamaIndex tool spec so any agent can store, search, and manage long-term memories.
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-goodmemThe 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:
| Parameter | Description |
|---|---|
api_key | GoodMem API key (sent as X-API-Key). Required. |
base_url | Base URL of your GoodMem server. Required. |
verify_ssl | Verify TLS certificates. Set false for self-signed dev certs (default: true). |
timeout | Per-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):
| Parameter | Range | Description |
|---|---|---|
reranker_id | UUID | Reranker model that reorders matched chunks by relevance. |
llm_id | UUID | LLM that generates a contextual answer (abstractReply) alongside the chunks. |
relevance_threshold | 0–1 | Minimum relevance score for a result to be included. |
llm_temperature | 0–2 | Sampling temperature for the LLM post-processor. |
max_results | integer | Maximum number of results to return. |
chronological_resort | boolean | Re-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.