Skip to content

aiconnai/engram-python-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

engram-client

PyPI Python License: MIT

Python client for Engram Cloud - AI memory infrastructure for agents.

Installation

pip install engram-client

Quick Start

from engram_client import EngramClient

client = EngramClient(
    base_url="https://engram-cloud-gateway.fly.dev",
    api_key="ek_...",
    tenant="my-tenant",
)

# Create a memory
memory = client.create(
    "User prefers dark mode",
    tags=["preferences", "ui"],
    workspace="my-project",
)

# Search (hybrid: BM25 + vector + fuzzy)
results = client.search("user preferences")

# List with filters
memories = client.list(limit=20, workspace="my-project")

# Get by ID
memory = client.get(42)

# Update
client.update(42, content="User prefers light mode", tags=["preferences"])

# Delete
client.delete(42)

# Stats
stats = client.stats()

Context Manager

with EngramClient(base_url="...", api_key="...", tenant="...") as client:
    client.create("Hello from Python SDK")

API Reference

EngramClient(base_url, api_key, tenant)

Method Description
create(content, **kwargs) Create a memory
get(id) Get memory by ID
update(id, **kwargs) Update a memory
delete(id) Delete a memory
list(**kwargs) List memories with filters
search(query, **kwargs) Hybrid search
stats() Storage statistics

Parameters

create / update kwargs: tags, workspace, memory_type, importance, metadata, tier

list kwargs: limit, offset, workspace, memory_type, tags, sort_by, sort_order

search kwargs: limit, workspace, tags, memory_type, include_archived

Requirements

  • Python >= 3.9
  • httpx >= 0.25.0

Related

License

MIT

About

Python client for Engram Cloud - AI memory infrastructure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages