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.0.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.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ctxvault_sdk-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 b9b76e5ac1c3428489a1508e03befd8852f34cc31a37f9a96a5329660eb6c947
MD5 f1babc20bcca51939d46e96c1ee31727
BLAKE2b-256 eda4c0f0a9cdb557cf88d599d742ece2c85c0c92c1332228eaa43c599923b1a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ctxvault_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eec68567047a71eeab217c4d1e6811af3153e672075204201ef9bef0b5736338
MD5 ac5f638be38f1786224347d97dd0066e
BLAKE2b-256 0a201443b73e8ae690e64e9de65c7d91e5ec8959925d42c091585ddb33089ec5

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