memorytrace 0.1.0__py3-none-any.whl

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 (54) hide show
  1. engram/__init__.py +8 -0
  2. engram/__main__.py +6 -0
  3. engram/cli/__init__.py +1 -0
  4. engram/cli/app.py +291 -0
  5. engram/cli/formatters.py +90 -0
  6. engram/cli/simple.py +267 -0
  7. engram/config.py +72 -0
  8. engram/engine.py +612 -0
  9. engram/exceptions.py +41 -0
  10. engram/extraction/__init__.py +6 -0
  11. engram/extraction/base.py +20 -0
  12. engram/extraction/llm_extractor.py +197 -0
  13. engram/extraction/ner/__init__.py +7 -0
  14. engram/extraction/ner/cjk.py +63 -0
  15. engram/extraction/ner/english.py +109 -0
  16. engram/extraction/ner/korean.py +106 -0
  17. engram/extraction/regex_extractor.py +188 -0
  18. engram/integrations/__init__.py +1 -0
  19. engram/integrations/mcp_server.py +213 -0
  20. engram/integrations/sdk.py +194 -0
  21. engram/models/__init__.py +19 -0
  22. engram/models/entity.py +72 -0
  23. engram/models/fact.py +58 -0
  24. engram/models/quality.py +61 -0
  25. engram/models/relation.py +26 -0
  26. engram/models/search.py +96 -0
  27. engram/models/session.py +53 -0
  28. engram/models/source.py +73 -0
  29. engram/quality/__init__.py +8 -0
  30. engram/quality/confidence.py +38 -0
  31. engram/quality/conflict.py +79 -0
  32. engram/quality/decay.py +28 -0
  33. engram/quality/gate.py +120 -0
  34. engram/quality/pii.py +80 -0
  35. engram/search/__init__.py +13 -0
  36. engram/search/base.py +20 -0
  37. engram/search/fts5_search.py +210 -0
  38. engram/search/hybrid.py +99 -0
  39. engram/search/semantic.py +186 -0
  40. engram/search/tokenizer.py +85 -0
  41. engram/session/__init__.py +6 -0
  42. engram/session/context.py +87 -0
  43. engram/session/manager.py +152 -0
  44. engram/session/working_memory.py +57 -0
  45. engram/storage/__init__.py +6 -0
  46. engram/storage/base.py +63 -0
  47. engram/storage/markdown_export.py +144 -0
  48. engram/storage/migrations.py +30 -0
  49. engram/storage/sqlite_store.py +615 -0
  50. memorytrace-0.1.0.dist-info/METADATA +138 -0
  51. memorytrace-0.1.0.dist-info/RECORD +54 -0
  52. memorytrace-0.1.0.dist-info/WHEEL +4 -0
  53. memorytrace-0.1.0.dist-info/entry_points.txt +3 -0
  54. memorytrace-0.1.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,138 @@
1
+ Metadata-Version: 2.4
2
+ Name: memorytrace
3
+ Version: 0.1.0
4
+ Summary: AI agent memory system with SQLite+FTS5, MCP integration, and quality gates
5
+ Project-URL: Homepage, https://github.com/engram-memory/engram
6
+ Project-URL: Issues, https://github.com/engram-memory/engram/issues
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Keywords: agent,ai,fts5,llm,mcp,memory,sqlite
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Requires-Python: >=3.9
21
+ Provides-Extra: dev
22
+ Requires-Dist: mypy>=1.10; extra == 'dev'
23
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
24
+ Requires-Dist: pytest>=8.0; extra == 'dev'
25
+ Requires-Dist: ruff>=0.5.0; extra == 'dev'
26
+ Provides-Extra: full
27
+ Requires-Dist: engram[llm]; extra == 'full'
28
+ Requires-Dist: engram[mcp]; extra == 'full'
29
+ Requires-Dist: engram[semantic]; extra == 'full'
30
+ Provides-Extra: llm
31
+ Requires-Dist: anthropic>=0.40.0; extra == 'llm'
32
+ Requires-Dist: openai>=1.50.0; extra == 'llm'
33
+ Provides-Extra: mcp
34
+ Requires-Dist: mcp>=1.0.0; extra == 'mcp'
35
+ Provides-Extra: semantic
36
+ Requires-Dist: numpy>=1.24.0; extra == 'semantic'
37
+ Description-Content-Type: text/markdown
38
+
39
+ # Engram
40
+
41
+ AI agent memory that learns across conversations.
42
+
43
+ ## Install
44
+
45
+ ```bash
46
+ pip install git+https://github.com/aop60003/default.git
47
+ ```
48
+
49
+ ## Use
50
+
51
+ ```bash
52
+ engram save "Minseong Jeong is the Space King of Galaxy Corp"
53
+ engram find "Space King"
54
+ engram who "Minseong Jeong"
55
+ ```
56
+
57
+ That's it. 3 commands. No config, no API keys, no database setup.
58
+
59
+ ## All Commands
60
+
61
+ ```
62
+ engram save "text" Save information (auto-extracts entities & facts)
63
+ engram find "query" Search memory
64
+ engram who "name" Look up a person/org
65
+ engram remember "name" "fact" Manually remember something
66
+ engram all List everything
67
+ engram status Health check
68
+ engram forget "name" Delete an entity
69
+ engram export Export to Markdown files
70
+ ```
71
+
72
+ ## Examples
73
+
74
+ ```bash
75
+ # Store meeting notes
76
+ engram save "Met Alice Johnson, VP of Engineering at Google. Discussed cloud AI partnership."
77
+
78
+ # Store Korean
79
+ engram remember "정민성" "AI와 우주 탐사에 관심이 많다"
80
+
81
+ # Search later
82
+ engram find "Google partnership"
83
+ engram who "Alice Johnson"
84
+
85
+ # Check status
86
+ engram status
87
+ ```
88
+
89
+ ## What It Does Automatically
90
+
91
+ - **Extracts** people & organizations from text (English, Korean, Chinese, Japanese)
92
+ - **Masks PII** — phone numbers, credit cards, emails become `[REDACTED]`
93
+ - **Deduplicates** — same fact won't be stored twice
94
+ - **Detects conflicts** — "CEO" then "CTO" for same person gets flagged
95
+ - **Generates summaries** — auto-summary when you don't provide one
96
+ - **Learns across sessions** — every conversation builds on previous ones
97
+
98
+ ## For Claude Code Users
99
+
100
+ Add slash commands to use memory inside Claude Code:
101
+
102
+ ```bash
103
+ # Copy command files
104
+ mkdir -p ~/.claude/commands
105
+ # See docs/04-usage-guide/02-claude-code-setup.md for details
106
+ ```
107
+
108
+ Then use: `/memory-save`, `/memory-find`, `/memory-who`, `/memory-remember`, `/memory-status`
109
+
110
+ ## For Developers (Python SDK)
111
+
112
+ ```python
113
+ from engram.integrations.sdk import EngramSDK
114
+
115
+ with EngramSDK() as sdk:
116
+ sdk.store("Minseong Jeong is the Space King of Galaxy Corp")
117
+ result = sdk.search("Space King")
118
+ print(result.to_agent_context())
119
+ ```
120
+
121
+ ## How It Works
122
+
123
+ ```
124
+ Text → NER Extraction → Quality Gate → SQLite+FTS5 → BM25 Search
125
+
126
+ Confidence Scoring
127
+ PII Masking
128
+ Duplicate Check
129
+ Conflict Detection
130
+ ```
131
+
132
+ - **Storage**: SQLite + FTS5 (zero dependencies, genuine BM25)
133
+ - **Export**: Markdown files for human reading
134
+ - **Session**: Context carries over between conversations
135
+
136
+ ## License
137
+
138
+ MIT
@@ -0,0 +1,54 @@
1
+ engram/__init__.py,sha256=_F7kaif7XsEyCIMr4fR4pk9_AmtDqgljvj6tPOkzGOs,278
2
+ engram/__main__.py,sha256=CbZN8Vi06_9QRGEogaDZZv-_1PzvwXjrx1dBR1rjP-k,115
3
+ engram/config.py,sha256=m2FUU-DguXbwkpbt2PqyTSGpEcWIDv6nrnG3gLlzu8Q,2315
4
+ engram/engine.py,sha256=hdMYpVeAa-lrGG88GDOX8LAuk6wGflWfTeW0AUgSyIU,24655
5
+ engram/exceptions.py,sha256=cUXgVOW2MKRV_azh4iE_hWCWo1FdoiU_EAWY-5iEzaQ,954
6
+ engram/cli/__init__.py,sha256=6ONMgTbEG23DpKEZw7bkixkff_sOvy6kYvTAFx2yLhY,32
7
+ engram/cli/app.py,sha256=poMhsCrJ25HDeuIxpb-rw_RJjbrgBTWbQcAIEdqBda4,10474
8
+ engram/cli/formatters.py,sha256=rwI2YLNn-PefDVVtJ_FkzWYZTiFL5H-zoG9Hn8Wu37c,3384
9
+ engram/cli/simple.py,sha256=MdNnj0gkr-5VFvPtCY686p70NN5Mqt-qlYFJHsuy1hY,9022
10
+ engram/extraction/__init__.py,sha256=eJ5cjat9Ltdt6mFZ3qH2CVlKwvGWffgKw03R26LzhQM,186
11
+ engram/extraction/base.py,sha256=d-tXvbYRK2GgbNrmDaSDwN_d0Pl0cvdPUPKbVIrp0mo,600
12
+ engram/extraction/llm_extractor.py,sha256=oiBl-vMyExZRMZZqxTAIoVE0y9hEHq4SZT82gfUNgl8,7209
13
+ engram/extraction/regex_extractor.py,sha256=nGZDwRRI-zdAu05u7WZfbMrENs0eLZExvItkLk11tuQ,6548
14
+ engram/extraction/ner/__init__.py,sha256=UcvuCpbI5hd6Sy5VMhf8rSUAxHGCgGweHmEclm4-Pp8,323
15
+ engram/extraction/ner/cjk.py,sha256=otl6LXHNKherW2DxCXm_UDQF4EMZkS5eKXhlESt-EgI,2412
16
+ engram/extraction/ner/english.py,sha256=r6hMiXyyy-1XmNR8FTYwuaZdpBzREpYYmsWyNlwwCbw,4215
17
+ engram/extraction/ner/korean.py,sha256=R2_BFaQNv-uU7jBs-pFpgPWAL_X0okbu7RIcANqtdiI,4593
18
+ engram/integrations/__init__.py,sha256=uML5GLd3YVMYxOjLUfZIXykqm7Jbd9GINVlsn-wttbE,42
19
+ engram/integrations/mcp_server.py,sha256=AQdnPR0bDuJGoD_7DMPAfW8AONl7XkgjdwY7o_NjrCo,6778
20
+ engram/integrations/sdk.py,sha256=fwpNWSCwglDIPzlZjZhRLTc3lq0gEsi9y0id5RxB8ag,6390
21
+ engram/models/__init__.py,sha256=WB3YN92lm9_AZQyU2QRbOUpJZ2ScaV7F8USQJQIHsRM,750
22
+ engram/models/entity.py,sha256=UJO6wNKz7_Gc5V5822ySQsKLYqTNLIs-Tyh7LTYJDfQ,2061
23
+ engram/models/fact.py,sha256=WchxRBhzcAuGHEW6jkqF-QYlZsq9Ys07HxZvZvGdm70,1763
24
+ engram/models/quality.py,sha256=LZRJT5QL4AcTeL5AxIvEBD_KZeq-eowStUJX3XHlYNE,1522
25
+ engram/models/relation.py,sha256=yslMD7WPm6yVv0mjrX0epFBMPACHrRE5Q3cV36NtIHw,793
26
+ engram/models/search.py,sha256=cYvVOTJYre-JNe53626igxnVhfeWJyGnl0pMm-MwlxY,2950
27
+ engram/models/session.py,sha256=9UxePkWJ4K41e5rJByGhefsjjgLuVvzQKxJDZHCleVI,1625
28
+ engram/models/source.py,sha256=KJ84ssOcU9nKs81K-_0Hxu2GYT5YYQUg8DdYu66TRuQ,2205
29
+ engram/quality/__init__.py,sha256=bvc3PM1gBIHvZfabqcDigM8GxnpV55EJ7LOQIzimJ0M,320
30
+ engram/quality/confidence.py,sha256=pA_7ketQuoQR3nkhbKgHOw4V5WJIecgWnTQ-AobUzXg,1096
31
+ engram/quality/conflict.py,sha256=euw4Q2Tx_lKel6E87o0F7ZBie8qcB9OwrbSdrwGmvwA,2895
32
+ engram/quality/decay.py,sha256=JXtlK-NMo0fZOoIXrc3qnFpEKAGUiR0VKZl1MvrF2tM,787
33
+ engram/quality/gate.py,sha256=G-Bo95qEneYrERSV9AMy-NLX5kkBCKpLvO-c6o9pgHA,4795
34
+ engram/quality/pii.py,sha256=-m8pLl3Pq3-yWV2jODO_zc7O2EyrPAgejPI1T2Xoa2k,2529
35
+ engram/search/__init__.py,sha256=dVb7wEd3KSOzi50QZMgEXazzFmaG-YbDamvsy9C3SoQ,330
36
+ engram/search/base.py,sha256=O1pHFgZi4lOiL1DBtWISMAuORAmUTnZSjNpf9xVnFBI,530
37
+ engram/search/fts5_search.py,sha256=xuPU8Gk6qOuDbVK8NAGApHf4vOqxqJf1cDuWEXmnY2Q,7555
38
+ engram/search/hybrid.py,sha256=XtKDIIJd16FJuwBC_2pkZHlrrUusGbnjpN3nyIHubHM,3259
39
+ engram/search/semantic.py,sha256=fIgG9aojv9cpw6KDHWA4w4Tb_Ny9kYKOMwe-3PpUOBw,6356
40
+ engram/search/tokenizer.py,sha256=DGmS8G-bx5rvGkfblH8itE9pXRTx1pVybZC5FDWrc0g,3271
41
+ engram/session/__init__.py,sha256=vG8B-cGoyGbWvXipblPvKDCalmLmpfdCyfMDzgv3Fw4,191
42
+ engram/session/context.py,sha256=kWNM2EeMGco_rqB_kJZhYjSph9kRIJ3OaFfxjPg5tuU,3193
43
+ engram/session/manager.py,sha256=FiUjywT23o1yIDigDhX3dvXNxt7Q2D3c4tnv3iwdeRk,5992
44
+ engram/session/working_memory.py,sha256=n62kt4SQido4ZrTHE-wBFdBdx88zUj7BpafBJdzVff0,2085
45
+ engram/storage/__init__.py,sha256=llZZpK4pvs3Yh92CLcbUz6wFi1L4x0wzjtn7L80Oyhk,184
46
+ engram/storage/base.py,sha256=nFgsTZa3eRn9iJ7ZFyT_gax40uO3K6FJyLCz7_9kv3o,2157
47
+ engram/storage/markdown_export.py,sha256=Pnhwe8f90H_B3E4q3U2hyq01vkFWkkyDySab6v7I-kk,4878
48
+ engram/storage/migrations.py,sha256=hJpe3kG07P64lXOmdvePSjXDarb1_uGlkJzPHOXpDHE,801
49
+ engram/storage/sqlite_store.py,sha256=3v3Le1vJMDq_6ESlPcqdNnjlxh6rIc7BFX2hx37ufCU,23669
50
+ memorytrace-0.1.0.dist-info/METADATA,sha256=N3Y3ZiDBD6t0D571GhIMX04b84EjlJOAn0TSUCj90NM,4223
51
+ memorytrace-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
52
+ memorytrace-0.1.0.dist-info/entry_points.txt,sha256=XkU8WOApeS-N2s1_wxzgD5HzWRNGNe6WjYtLsRY0ZQs,98
53
+ memorytrace-0.1.0.dist-info/licenses/LICENSE,sha256=TqMuMU0fCNmy3FtbpSj4TpdBFXXSYG7zezuJaj2gnyM,1076
54
+ memorytrace-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ engram = engram.cli.simple:cli_entry
3
+ engram-advanced = engram.cli.app:cli_entry
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Engram Contributors
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.