Python bindings for the Cortext memory engine
Project description
augmem.cortext Python Binding
This package loads the native Cortext shared library with ctypes. Release
wheels are built with bundled Zig-produced native libraries for:
linux-x86_64linux-aarch64macos-x86_64macos-aarch64windows-x86_64windows-aarch64
Build
For a local source build without bundled native libraries, build the shared library from the repository root:
cmake --preset ffi-release
cmake --build --preset ffi-release --target cortext
Set CORTEXT_LIBRARY_PATH=/path/to/libcortext.so when loading a non-default
library.
To build the release wheel with bundled native libraries:
python scripts/build_python_package.py
Set ZIG=/path/to/zig or pass --zig /path/to/zig when Zig is not on PATH.
Use
PYTHONPATH=bindings/python python3 - <<'PY'
import augmem.cortext as cortext
with cortext.Cortext(db_path=":memory:", models_dir="models") as engine:
print(cortext.version())
print(engine.process_text("Bailey likes tennis balls.", "chat/main"))
print(len(engine.embed_text("embed without storing")))
engine.consolidate()
engine.flush()
PY
API
Config:focus,sensitivity,stability,affect_interrupt,affect_retrieval,reinforcement_enabled,procedural_enabled,sequential_edges_enabled,signal_filter_audio_enabled,signal_filter_image_enabled,signal_filter_text_enabled.Cortext.process_text,process_audio,process_image: return decoded JSON context dictionaries.Cortext.process_*_json: return raw JSON strings.Cortext.embed_text,embed_audio,embed_image: return embedding lists and do not mutate memory state.Cortext.consolidate,flush,reset,close.DBProviderandObjectStoreProvider: callback interfaces for caller-owned storage.
Audio input is 16 kHz mono float32 PCM. Image input is row-major RGB/RGBA bytes with explicit dimensions.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file augmem_cortext-1.1.6-py3-none-any.whl.
File metadata
- Download URL: augmem_cortext-1.1.6-py3-none-any.whl
- Upload date:
- Size: 10.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdd0362e19c2098f76ea2b8c0f1c9fb312eb964aea2fb12cbc7db65aa1e708dc
|
|
| MD5 |
1f05e7feb1e6064d1d08edaf963ffd6a
|
|
| BLAKE2b-256 |
3ddc7ba2b16293637d8182d5c2912fda7e5b97b3952a9f4cc3327fae30f8b489
|