engram-memory-system 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. engram_memory_system-0.1.0/.dockerignore +12 -0
  2. engram_memory_system-0.1.0/.github/workflows/publish.yml +26 -0
  3. engram_memory_system-0.1.0/.github/workflows/test.yml +44 -0
  4. engram_memory_system-0.1.0/.gitignore +22 -0
  5. engram_memory_system-0.1.0/Dockerfile +24 -0
  6. engram_memory_system-0.1.0/LICENSE +21 -0
  7. engram_memory_system-0.1.0/PKG-INFO +885 -0
  8. engram_memory_system-0.1.0/README.md +839 -0
  9. engram_memory_system-0.1.0/benchmarks/longmemeval/.gitignore +162 -0
  10. engram_memory_system-0.1.0/benchmarks/longmemeval/LICENSE +21 -0
  11. engram_memory_system-0.1.0/benchmarks/longmemeval/README.md +260 -0
  12. engram_memory_system-0.1.0/benchmarks/longmemeval/assets/longmemeval_examples.png +0 -0
  13. engram_memory_system-0.1.0/benchmarks/longmemeval/requirements-full.txt +27 -0
  14. engram_memory_system-0.1.0/benchmarks/longmemeval/requirements-lite.txt +6 -0
  15. engram_memory_system-0.1.0/benchmarks/longmemeval/run_engram.py +309 -0
  16. engram_memory_system-0.1.0/config.yaml +61 -0
  17. engram_memory_system-0.1.0/docker-compose.yml +18 -0
  18. engram_memory_system-0.1.0/engram/__init__.py +3 -0
  19. engram_memory_system-0.1.0/engram/__main__.py +3 -0
  20. engram_memory_system-0.1.0/engram/ann_index.py +210 -0
  21. engram_memory_system-0.1.0/engram/benchmark.py +602 -0
  22. engram_memory_system-0.1.0/engram/cli.py +912 -0
  23. engram_memory_system-0.1.0/engram/codebase.py +287 -0
  24. engram_memory_system-0.1.0/engram/communities.py +194 -0
  25. engram_memory_system-0.1.0/engram/compress.py +91 -0
  26. engram_memory_system-0.1.0/engram/config.py +135 -0
  27. engram_memory_system-0.1.0/engram/consolidator.py +441 -0
  28. engram_memory_system-0.1.0/engram/conversations.py +204 -0
  29. engram_memory_system-0.1.0/engram/dedup.py +102 -0
  30. engram_memory_system-0.1.0/engram/deep_retrieval.py +256 -0
  31. engram_memory_system-0.1.0/engram/demo.py +411 -0
  32. engram_memory_system-0.1.0/engram/drift.py +649 -0
  33. engram_memory_system-0.1.0/engram/embeddings.py +395 -0
  34. engram_memory_system-0.1.0/engram/entities.py +180 -0
  35. engram_memory_system-0.1.0/engram/evolution.py +314 -0
  36. engram_memory_system-0.1.0/engram/extractor.py +159 -0
  37. engram_memory_system-0.1.0/engram/formats.py +189 -0
  38. engram_memory_system-0.1.0/engram/hopfield.py +83 -0
  39. engram_memory_system-0.1.0/engram/layers.py +128 -0
  40. engram_memory_system-0.1.0/engram/lifecycle.py +245 -0
  41. engram_memory_system-0.1.0/engram/llm.py +84 -0
  42. engram_memory_system-0.1.0/engram/mcp_server.py +1478 -0
  43. engram_memory_system-0.1.0/engram/patterns.py +338 -0
  44. engram_memory_system-0.1.0/engram/quantize.py +188 -0
  45. engram_memory_system-0.1.0/engram/retrieval.py +369 -0
  46. engram_memory_system-0.1.0/engram/skill_select.py +309 -0
  47. engram_memory_system-0.1.0/engram/store.py +733 -0
  48. engram_memory_system-0.1.0/engram/surprise.py +101 -0
  49. engram_memory_system-0.1.0/engram/web/__init__.py +0 -0
  50. engram_memory_system-0.1.0/engram/web/app.py +94 -0
  51. engram_memory_system-0.1.0/engram/web/events.py +37 -0
  52. engram_memory_system-0.1.0/engram/web/routes.py +1197 -0
  53. engram_memory_system-0.1.0/engram/web/templates/index.html +2971 -0
  54. engram_memory_system-0.1.0/examples/README.md +88 -0
  55. engram_memory_system-0.1.0/examples/agent-patterns.md +219 -0
  56. engram_memory_system-0.1.0/examples/api-embeddings.py +87 -0
  57. engram_memory_system-0.1.0/examples/claude-code-setup.md +152 -0
  58. engram_memory_system-0.1.0/examples/codebase-scan.py +49 -0
  59. engram_memory_system-0.1.0/examples/custom-agent.py +133 -0
  60. engram_memory_system-0.1.0/examples/drift-detection.py +55 -0
  61. engram_memory_system-0.1.0/examples/entity-graph.py +76 -0
  62. engram_memory_system-0.1.0/examples/export-import.py +110 -0
  63. engram_memory_system-0.1.0/examples/hooks-setup.md +99 -0
  64. engram_memory_system-0.1.0/examples/multi-agent.py +367 -0
  65. engram_memory_system-0.1.0/examples/negative-knowledge.py +73 -0
  66. engram_memory_system-0.1.0/examples/openai-compatible.py +136 -0
  67. engram_memory_system-0.1.0/examples/python-client.py +97 -0
  68. engram_memory_system-0.1.0/hooks/drift_hook.sh +68 -0
  69. engram_memory_system-0.1.0/hooks/save_hook.sh +30 -0
  70. engram_memory_system-0.1.0/pyproject.toml +62 -0
  71. engram_memory_system-0.1.0/site/index.html +218 -0
  72. engram_memory_system-0.1.0/tests/__init__.py +0 -0
  73. engram_memory_system-0.1.0/tests/conftest.py +64 -0
  74. engram_memory_system-0.1.0/tests/test_ann_index.py +133 -0
  75. engram_memory_system-0.1.0/tests/test_config.py +93 -0
  76. engram_memory_system-0.1.0/tests/test_embeddings.py +125 -0
  77. engram_memory_system-0.1.0/tests/test_retrieval.py +57 -0
  78. engram_memory_system-0.1.0/tests/test_store.py +154 -0
  79. engram_memory_system-0.1.0/tests/test_surprise.py +53 -0
@@ -0,0 +1,12 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .git/
8
+ .claude/
9
+ benchmarks/
10
+ *.db
11
+ *.db-wal
12
+ *.db-shm
@@ -0,0 +1,26 @@
1
+ name: publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ id-token: write
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.12"
19
+
20
+ - name: Build
21
+ run: |
22
+ pip install build
23
+ python -m build
24
+
25
+ - name: Publish to PyPI
26
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,44 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ${{ matrix.os }}
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ os: [ubuntu-latest, macos-latest]
16
+ python-version: ["3.11", "3.12"]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+
26
+ - name: Cache HuggingFace models
27
+ uses: actions/cache@v4
28
+ with:
29
+ path: ~/.cache/huggingface
30
+ key: hf-models-bge-small-v1
31
+
32
+ - name: Install
33
+ run: pip install -e ".[dev]"
34
+
35
+ - name: Download models
36
+ run: |
37
+ python -c "
38
+ from sentence_transformers import SentenceTransformer
39
+ SentenceTransformer('BAAI/bge-small-en-v1.5')
40
+ print('bge-small downloaded')
41
+ "
42
+
43
+ - name: Run tests
44
+ run: pytest tests/ -v --tb=short
@@ -0,0 +1,22 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.egg-info/
4
+ .venv/
5
+ dist/
6
+ build/
7
+ *.db
8
+ *.db-wal
9
+ *.db-shm
10
+ .claude/
11
+ .env
12
+ .DS_Store
13
+ .vscode/
14
+ .idea/
15
+ *.swp
16
+ *.swo
17
+ *~
18
+ .pytest_cache/
19
+ benchmarks/longmemeval/data/
20
+ benchmarks/longmemeval/src/
21
+ benchmarks/longmemeval/*.jsonl
22
+ benchmarks/longmemeval/retrieval_logs/
@@ -0,0 +1,24 @@
1
+ FROM python:3.12-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # install build deps for hnswlib
6
+ RUN apt-get update && apt-get install -y --no-install-recommends \
7
+ build-essential \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # install engram
11
+ COPY pyproject.toml .
12
+ COPY engram/ engram/
13
+ RUN pip install --no-cache-dir -e ".[api]"
14
+
15
+ # data volume
16
+ VOLUME /data
17
+
18
+ # default config
19
+ ENV ENGRAM_DB_PATH=/data/memory.db
20
+
21
+ EXPOSE 8420
22
+
23
+ # default: run web UI
24
+ CMD ["python", "-m", "engram", "serve", "--web", "--port", "8420"]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 raya
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.