Skip to main content

Python SDK for CtxVault — Persistent Memory for AI

Project description

ctxvault

Python SDK for CtxVault — Persistent Memory for AI.

Install

pip install ctxvault

Usage

from ctxvault import CtxVault

vault = CtxVault(
    api_key="cv_your_key",
    project="your-project",
    base_url="https://ctxvault.dev",
)

# Store a memory
vault.remember(
    type="decision",
    title="Use PostgreSQL for persistence",
    content="Chose PostgreSQL with pgvector for vector search support.",
    tags=["database", "architecture"],
)

# Search memories
results = vault.recall("database decisions")

# Get context pack
pack = vault.context_pack("project architecture")
print(pack["pack"])

# List all memories
items = vault.list(status="verified")

API

CtxVault(api_key, project, base_url=None)

vault.remember(type, title, content, importance=5, tags=None) — Store a memory

vault.recall(query, k=5) — Search memories

vault.context_pack(query, max_tokens=2000) — Generate context pack

vault.list(status=None, type=None) — List memory items

vault.verify(id) — Verify a candidate

vault.pin(id) — Pin a verified item

vault.deprecate(id, reason) — Deprecate an item

License

MIT

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

ctxvault_sdk-0.1.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

ctxvault_sdk-0.1.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file ctxvault_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: ctxvault_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for ctxvault_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a9371ed1bb79b55129d5d0e10fedb2bb42888c2c1028fa6b24d3fedc40ad3baa
MD5 178f37e5e77b6048a6e96dd541b645e5
BLAKE2b-256 81d0523785d3e0ebb1f078899ad5e599fca2cab92b8c79f9279eaa6bb22601ec

See more details on using hashes here.

File details

Details for the file ctxvault_sdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ctxvault_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for ctxvault_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 94bd147e6a6193cc136a03d0c46a93f9c3cf5b10246f1c9b97b547fc01f61600
MD5 9b9edbe885d0e1ad80d40f4d6f708568
BLAKE2b-256 a6a4242ccc48109ba98224ffeacec3a378d7a1290438fdf2695b8e540390cbc4

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