BaseGrid Python SDK
The official Python client for BaseGrid, the memory infrastructure for AI agents.
Installation
pip install basegrid-io
Usage
from basegrid import BaseGrid
# Initialize client
client = BaseGrid(api_key="bg_...")
# Add a memory
client.memories.add(
agent_id="agent-123",
content="User prefers dark mode and heavily indented code.",
metadata={"category": "preference"}
)
# Search memories
results = client.memories.search(
agent_id="agent-123",
query="What are the user's coding preferences?"
)
for memory in results:
print(memory.content)
Integrations
LangChain
pip install "basegrid-io[langchain]"
LlamaIndex
pip install "basegrid-io[llamaindex]"
Configuration
client = BaseGrid(
api_key="bg_...", # Required
api_url="https://basegrid-production.up.railway.app" # Optional (default)
)
Troubleshooting
Connection Refused Error
If you see ConnectionError: Connection refused, ensure you're using SDK version 0.1.3 or later:
pip install --upgrade basegrid-io
Versions before 0.1.3 incorrectly defaulted to localhost:3000 instead of the production API.
Metadata
Release files for basegrid-io 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| basegrid_io-0.1.4.tar.gz | 13.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| basegrid_io-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.2 kB
Release files / basegrid_io-0.1.4.tar.gz
| Download URL | basegrid_io-0.1.4.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51a750e949b0f0a1d6ea30a4a7c993366c6cc113d3b055d7237b1a4612d378c7
|
|
BLAKE2b-256 checksum How to use checksums |
4b79111e86af9677403d74072953091a440274ccb62123e80d09c92d56919dcb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / basegrid_io-0.1.4-py3-none-any.whl
| Download URL | basegrid_io-0.1.4-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6205ab5840686329e3f4323ce262157349b3653f541c918ff7fa4c1b9084cd0c
|
|
BLAKE2b-256 checksum How to use checksums |
acd80c96f54d2b2debc85772db7c2f70f92a3431e9c6d8a1c580a727d671fe5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|