GoodMem Python SDK
An OpenAI-style API for Goodmem with auto-inference of model parameters, streaming retrieval, async support, and auto-pagination. The SDK stays in sync with the server's OpenAPI spec — except for hand-written convenience methods (model registry auto-inference, flat post-processor kwargs, etc.) that wrap the generated layer. Please see ../notes/clients_gen.md for the SDK generation details and ../notes/docs_gen.md for the doc generation details.
Installation
pip install goodmem
Usage
The programmatic way
from goodmem import Goodmem
client = Goodmem(
base_url="http://localhost:8080",
api_key="gm_..."
)
embedder = client.embedders.create(
display_name="OpenAI Embedder",
model_identifier="text-embedding-3-large",
api_key="sk-your-openai-key",
)
print(f"Created: {embedder.embedder_id}")
The Skill way
# One-time setup — copy the skill into your Claude Code skills directory
cp -r $(python -c "import goodmem; print(goodmem.__path__[0])")/skills ~/.claude/skills/goodmem
Once installed, Claude Code automatically loads the GoodMem SDK reference when you ask it to create embedders, store memories, run retrieval, etc.
Project structure
clients/
├── python/ # Python SDK (this directory, published to PyPI as "goodmem")
├── _clients_gen/ # Code generation (spec → SDK + MCP)
├── _docs_gen/ # Doc generation (ref pages, skills, sdk2rest)
├── mcp/ # MCP server (published to npm as @pairsystems/goodmem-mcp)
├── claude/ # Claude Code plugin (git subtree → public repo)
├── vibe/ # Cross-SDK vibe auditing (audit_docs.sh, audit_ref_doc.sh, ...)
├── registries/ # Shared model registries (copied into each SDK)
├── ci/ # CI infrastructure
├── notes/ # Internal dev notes (clients_gen.md, docs_gen.md)
├── clients_gen.sh # Full SDK generation pipeline
└── docs_gen.sh # Full doc generation pipeline
Development commands
# Generation (run from clients/, not python/)
cd ..
./clients_gen.sh # compile server → IR → Python SDK → MCP → test
./clients_gen.sh -y # same, but skip server-reset confirmation (unattended/CI)
./docs_gen.sh # ref pages + skills + snippets
./docs_gen.sh --sdk2rest # translate SDK test snippets → REST equivalents
# Publishing (run from python/)
cd python
./publish.sh # Publish to PyPI
./publish.sh --test # Publish to TestPyPI
# Vibe auditing (Claude Code non-interactive)
../vibe/audit_docs.sh # run all doc audits (ref docs + skill docs)
../vibe/audit_ref_doc.sh # audit generated MDX ref docs against SDK source
../vibe/audit_skill_doc.sh # audit generated skill reference (SDK, REST, patterns)
In clients_gen.sh, integration test is only activated when environment variables GOODMEM_BASE_URL and GOODMEM_API_KEY are set.
Warning: Before the integration tests,
clients_gen.shrunsgoodmem-reset.shto delete ALL resources on the target server. Never pointGOODMEM_BASE_URLat a production server — use a throwaway local instance. (CI no longer resets anything: it composes a fresh server per suite and tears it down. See ci/README.md.)
See notes/clients_gen.md for the full regeneration workflow and notes/docs_gen.md for the doc and auditing pipelines.
Documentation
- Code generation guide — architecture, regeneration, testing, tier details
- Doc generation guide — how ref docs are generated, docstring authoring
- CI pipeline — GitHub Actions workflow, secrets, Fly.io test server setup
- API reference — published SDK docs
TODO
- Add
gemini-embedding-001to embedder registry once backend addsOPENAI_COMPATIBLEtoProviderType. - Add Anthropic, Google, Cohere, and Mistral LLMs to registry once backend adds matching
LLMProviderTypevalues. - Automate model registry updates to add new models as they are released.
- Generate SDK to an intermediate representation, then map that to cURL, HTTPie, HTTPX, Go, JavaScript, etc.
Metadata
Release files for goodmem 0.1.41
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| goodmem-0.1.41.tar.gz | 274.2 kB | Without provenance | Details for goodmem-0.1.41.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| goodmem-0.1.41-py3-none-any.whl | Python 3 | none | any | Details for goodmem-0.1.41-py3-none-any.whl |
Total release size: 548.9 kB
Release files / goodmem-0.1.41.tar.gz
| Download URL | goodmem-0.1.41.tar.gz |
|---|---|
| Size | 274.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c863ab9f3706ab7bb5856387909f75af98f1368cc84236055c170bb4b60989f6
|
|
BLAKE2b-256 checksum How to use checksums |
aa7eeba5b39034e76fc2dbff99c1c3913fbadd83db3c70fc7ec7a174e7b38996
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / goodmem-0.1.41-py3-none-any.whl
| Download URL | goodmem-0.1.41-py3-none-any.whl |
|---|---|
| Size | 274.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1bea5eccf81912a169fe5ebb1bd5412f82715794f7089bff1643fc74dfbad21d
|
|
BLAKE2b-256 checksum How to use checksums |
69bceb7bc1a4ce6a25ceb434a41b369775279c3e7777c5feb052a7f811f1edb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Security for goodmem 0.1.41
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.