Skip to main content

The official Python client for BaseGrid, the memory infrastructure for AI agents.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

basegrid_io-0.1.3.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

basegrid_io-0.1.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file basegrid_io-0.1.3.tar.gz.

File metadata

  • Download URL: basegrid_io-0.1.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for basegrid_io-0.1.3.tar.gz
Algorithm Hash digest
SHA256 decdbc5ad00ebbf33343743483d7c9821be5d9994401c8448c0ddcf2670d66a5
MD5 5f1548a845939b4f6dede64a09d36760
BLAKE2b-256 51fef315c32c13e9950174ab22110e21d8f7897c9153ce83bf671fb64ab483d7

See more details on using hashes here.

File details

Details for the file basegrid_io-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: basegrid_io-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for basegrid_io-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f516624e9b348e286e788ff171110f87ace8c1eee6ad8b014c1ea470aff8708d
MD5 a63d093374900038f09af85fd76c853f
BLAKE2b-256 6b13068dd2b78b6847a4833007a2f08ba61b404a83d948269ee5f24b7dcfd5a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page