GoodMem memory and tools for the AutoGen agent framework.
Project description
autogen-goodmem
GoodMem memory and tools for the AutoGen agent framework.
autogen-goodmem gives an AutoGen agent two things:
GoodMemContextProvider— anautogen_core.memory.Memoryimplementation backed by a GoodMem space, so context retrieval is automatic on every turn.create_goodmem_tools(client)— 11FunctionTools the agent can call directly to manage spaces and memories.
Install
pip install autogen-goodmem
Quickstart
As an AutoGen Memory
import asyncio
from autogen_core.memory import MemoryContent, MemoryMimeType
from autogen_goodmem import GoodMemContextProvider, GoodMemMemoryConfig
async def main() -> None:
provider = GoodMemContextProvider(
config=GoodMemMemoryConfig(
base_url="https://localhost:8080",
api_key="gm_...",
space_name="my-kb",
embedder_id="<embedder-uuid>",
verify_ssl=False,
)
)
await provider.add(MemoryContent(content="The capital of France is Paris.", mime_type=MemoryMimeType.TEXT))
results = await provider.query("What is the capital of France?")
for r in results.results:
print(r.content)
await provider.close()
asyncio.run(main())
As tools on an agent
from autogen_goodmem import GoodMemClient, create_goodmem_tools
client = GoodMemClient(base_url="https://localhost:8080", api_key="gm_...", verify_ssl=False)
tools = create_goodmem_tools(client) # 11 FunctionTools
# pass `tools=tools` to your AssistantAgent
Tool surface
create_goodmem_tools(client) returns these 11 tools in order:
| Tool | Purpose |
|---|---|
goodmem_list_embedders |
List embedder models available on the server. |
goodmem_list_spaces |
List all spaces visible to the API key. |
goodmem_get_space |
Fetch one space by ID. |
goodmem_create_space |
Create a space (idempotent by name). |
goodmem_update_space |
Update name / publicRead / labels / chunking. |
goodmem_delete_space |
Delete a space and everything in it. |
goodmem_create_memory |
Add a memory from text or a local file. |
goodmem_list_memories |
Paginated listing of a space's memories. |
goodmem_retrieve_memories |
Semantic retrieval, optional reranker + LLM. |
goodmem_get_memory |
Fetch a memory's metadata and original content. |
goodmem_delete_memory |
Delete a memory and its embeddings. |
goodmem_retrieve_memories (and GoodMemClient.retrieve_memories) accept the optional post-processor params: reranker_id, llm_id, relevance_threshold (0-1), llm_temperature (0-2), max_results, chronological_resort.
Integration tests
The tests in tests/test_goodmem_integration.py exercise every public method against a live GoodMem server. They are opt-in via the integration marker.
pip install -e ".[dev]"
export GOODMEM_API_KEY=gm_...
export GOODMEM_BASE_URL=https://localhost:8080
export GOODMEM_EMBEDDER_ID=<uuid>
export GOODMEM_RERANKER_ID=<uuid>
export GOODMEM_LLM_ID=<uuid>
export GOODMEM_PDF_PATH=/path/to/sample.pdf # optional
python -m pytest tests/test_goodmem_integration.py -v -s -m integration
License
MIT
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 autogen_goodmem-0.1.0.tar.gz.
File metadata
- Download URL: autogen_goodmem-0.1.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
109675b277cc3cfd625adf2710cb731fb543ca6b462623679497256f1b749290
|
|
| MD5 |
b35abfe88f0be00a3851771c6d0cf391
|
|
| BLAKE2b-256 |
19d41590a53f481df98bef99be80bb2af6e2452e98717f7c5d4e10969b934874
|
Provenance
The following attestation bundles were made for autogen_goodmem-0.1.0.tar.gz:
Publisher:
release.yml on PAIR-Systems-Inc/goodmem-autogen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autogen_goodmem-0.1.0.tar.gz -
Subject digest:
109675b277cc3cfd625adf2710cb731fb543ca6b462623679497256f1b749290 - Sigstore transparency entry: 1520581129
- Sigstore integration time:
-
Permalink:
PAIR-Systems-Inc/goodmem-autogen@0202c0a9e21019e3e548b12416a3a5db3283574d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/PAIR-Systems-Inc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0202c0a9e21019e3e548b12416a3a5db3283574d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file autogen_goodmem-0.1.0-py3-none-any.whl.
File metadata
- Download URL: autogen_goodmem-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef681b0dfc9073eb9234c1a06bb5acdc791e549f3173dc02e0020fe5fd973ce7
|
|
| MD5 |
b46ca0a6730e8ee29fca70b6447fc3ac
|
|
| BLAKE2b-256 |
7094d9a63a89f285daf384efdbcb1b696e12cc3241bdf7cfac5407ae4de6b0d5
|
Provenance
The following attestation bundles were made for autogen_goodmem-0.1.0-py3-none-any.whl:
Publisher:
release.yml on PAIR-Systems-Inc/goodmem-autogen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autogen_goodmem-0.1.0-py3-none-any.whl -
Subject digest:
ef681b0dfc9073eb9234c1a06bb5acdc791e549f3173dc02e0020fe5fd973ce7 - Sigstore transparency entry: 1520581161
- Sigstore integration time:
-
Permalink:
PAIR-Systems-Inc/goodmem-autogen@0202c0a9e21019e3e548b12416a3a5db3283574d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/PAIR-Systems-Inc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0202c0a9e21019e3e548b12416a3a5db3283574d -
Trigger Event:
workflow_dispatch
-
Statement type: