File size: 3,690 Bytes
5705100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
[build-system]
requires = ["hatchling>=1.21.0"]
build-backend = "hatchling.build"

[project]
name = "engram-kv"
version = "1.0.0"
description = "KV cache fingerprinting for persistent cross-session LLM memory. Fourier decomposition achieves 98% Recall@1 at 51Β΅s."
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.11"
authors = [{name = "ENIGMA"}]
keywords = ["engram", "kv-cache", "llm", "inference", "fourier", "fingerprint", "retrieval", "hnsw", "cross-model", "session-memory"]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: Apache Software License",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
]

dependencies = [
    # ── Serialization ─────────────────────────────────────────
    "safetensors>=0.4.5,<0.5",

    # ── Tensor operations ─────────────────────────────────────
    "torch>=2.3.0,<3.0",
    "numpy>=1.26.0,<2.0",
    "einops>=0.7.0,<1.0",

    # ── API server ────────────────────────────────────────────
    "fastapi>=0.115.0,<1.0",
    "uvicorn[standard]>=0.30.0,<1.0",
    "pydantic>=2.7.0,<3.0",
    "pydantic-settings>=2.3.0,<3.0",
    "httpx>=0.27.0,<1.0",

    # ── FAISS β€” MKL build only (pip, NOT conda-forge) ─────────
    # conda-forge faiss-cpu lacks MKL β†’ 18x slower (GitHub #2499)
    # Install: pip install faiss-cpu
    # Verify:  python -c "import faiss; assert faiss.get_compile_options().find('AVX') != -1"
    "faiss-cpu>=1.8.0,<2.0",

    # ── SVD / linear algebra for EGR state extraction ─────────
    "scikit-learn>=1.4.0,<2.0",

    # ── LLM runtime (D1: llama-cpp-python direct) ─────────────
    "llama-cpp-python>=0.3.0,<1.0",

    # ── Config ────────────────────────────────────────────────
    "python-dotenv>=1.0.0,<2.0",
]

[project.optional-dependencies]
# Phase 2: semantic search via external embeddings
semantic = [
    "qdrant-client>=1.9.0,<2.0",
    "cohere>=5.5.0,<6.0",
]
# Phase 2: remote storage backends
remote = [
    "redis>=5.0.0,<6.0",
    "boto3>=1.34.0,<2.0",
]
# Phase 2: TurboQuant PolarQuant Triton kernels (CUDA only)
turboquant = [
    "triton>=3.0.0,<4.0",
]
# Hyperbolic geometry (Phase 3)
hyperbolic = [
    "geoopt>=0.5.0,<1.0",
]
# Sentence-transformers embedder (default fallback when no GGUF model)
sbert = [
    "sentence-transformers>=2.7.0,<4.0",
]
# MCP server for Claude Code integration
mcp = [
    "mcp>=1.0.0,<2.0",
]
# Development
dev = [
    "pytest>=8.0.0,<9.0",
    "pytest-asyncio>=0.23.0,<1.0",
    "pytest-cov>=5.0.0,<6.0",
    "ruff>=0.5.0,<1.0",
    "mypy>=1.10.0,<2.0",
]

[project.scripts]
engram-server = "kvcos.api.server:main"
engram-demo = "scripts.demo_agent_session:main"

[project.urls]
Repository = "https://github.com/infraax/engram"
Documentation = "https://github.com/infraax/engram#readme"

[tool.hatch.build.targets.wheel]
packages = ["kvcos"]

[tool.ruff]
target-version = "py311"
line-length = 100

[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP"]

[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"

[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_configs = true