CrewAI
Expose GoodMem's RAG REST surface as CrewAI tools so any agent can store documents, run semantic search, and manage spaces.
Overview
GoodMem is a self-hostable RAG service that handles embedding, chunking, storage, and retrieval
server-side. The CrewAI integration exposes GoodMem's v1 REST surface as eleven
crewai.tools.BaseTool classes, so any CrewAI agent can store documents, run semantic search, and
manage memory spaces directly as part of a crew.
Installation
pip install crewai-goodmem
# or
uv add crewai-goodmemThe pip package is crewai-goodmem; the import name is crewai_goodmem. Python 3.11–3.13 is
supported, and the only runtime dependencies are crewai and requests.
Configuration
| Variable | Description |
|---|---|
GOODMEM_BASE_URL | Base URL of your GoodMem server (no /v1 suffix), e.g. https://your-goodmem-server.example.com. |
GOODMEM_API_KEY | API key issued by your GoodMem instance (starts with gm_). |
GOODMEM_VERIFY_SSL | Set to false to skip TLS verification for self-signed dev certs (default: true). |
Each tool also accepts base_url, api_key, and verify_ssl constructor arguments, which take
precedence over the environment variables if you prefer to configure them in code.
Quick start
from crewai import Agent, Crew, Task
from crewai_goodmem import GoodMemRetrieveMemoriesTool
retrieve = GoodMemRetrieveMemoriesTool() # reads GOODMEM_BASE_URL / GOODMEM_API_KEY
researcher = Agent(
role="Knowledge Researcher",
goal="Answer questions from the team knowledge base.",
backstory="You always cite the retrieved memory chunks.",
tools=[retrieve],
)
task = Task(
description="Search space '<your-space-id>' for 'agent skills' and answer.",
expected_output="A grounded answer.",
agent=researcher,
)
print(Crew(agents=[researcher], tasks=[task]).kickoff())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.