evaos 0.9.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 (114) hide show
  1. evaos-0.9.0/LICENSE +21 -0
  2. evaos-0.9.0/MANIFEST.in +4 -0
  3. evaos-0.9.0/PKG-INFO +246 -0
  4. evaos-0.9.0/README.md +196 -0
  5. evaos-0.9.0/cortex/__init__.py +0 -0
  6. evaos-0.9.0/cortex/api/__init__.py +0 -0
  7. evaos-0.9.0/cortex/api/http_server.py +1532 -0
  8. evaos-0.9.0/cortex/api/mcp_server.py +866 -0
  9. evaos-0.9.0/cortex/api/plugin.py +1085 -0
  10. evaos-0.9.0/cortex/brain_graph/__init__.py +15 -0
  11. evaos-0.9.0/cortex/brain_graph/builder.py +635 -0
  12. evaos-0.9.0/cortex/brain_graph/crud.py +203 -0
  13. evaos-0.9.0/cortex/brain_graph/query.py +652 -0
  14. evaos-0.9.0/cortex/brain_graph/watcher.py +489 -0
  15. evaos-0.9.0/cortex/circadian/__init__.py +52 -0
  16. evaos-0.9.0/cortex/circadian/dream.py +609 -0
  17. evaos-0.9.0/cortex/circadian/engine.py +843 -0
  18. evaos-0.9.0/cortex/circadian/sleep.py +1044 -0
  19. evaos-0.9.0/cortex/cli.py +788 -0
  20. evaos-0.9.0/cortex/config/defaults.toml +131 -0
  21. evaos-0.9.0/cortex/config.py +458 -0
  22. evaos-0.9.0/cortex/core/__init__.py +0 -0
  23. evaos-0.9.0/cortex/core/agentic_retrieval.py +810 -0
  24. evaos-0.9.0/cortex/core/entity_resolution.py +640 -0
  25. evaos-0.9.0/cortex/core/feedback.py +297 -0
  26. evaos-0.9.0/cortex/core/reconciliation.py +913 -0
  27. evaos-0.9.0/cortex/core/retrieval.py +886 -0
  28. evaos-0.9.0/cortex/core/token_budget.py +410 -0
  29. evaos-0.9.0/cortex/deprecation/__init__.py +58 -0
  30. evaos-0.9.0/cortex/deprecation/decay.py +212 -0
  31. evaos-0.9.0/cortex/deprecation/pipeline.py +790 -0
  32. evaos-0.9.0/cortex/eval/__init__.py +10 -0
  33. evaos-0.9.0/cortex/eval/datasets/__init__.py +4 -0
  34. evaos-0.9.0/cortex/eval/harness.py +487 -0
  35. evaos-0.9.0/cortex/eval/locomo.py +223 -0
  36. evaos-0.9.0/cortex/eval/longmemeval.py +274 -0
  37. evaos-0.9.0/cortex/eval/metrics.py +282 -0
  38. evaos-0.9.0/cortex/eval/run_eval.py +260 -0
  39. evaos-0.9.0/cortex/extraction/__init__.py +0 -0
  40. evaos-0.9.0/cortex/extraction/coding_noise.py +169 -0
  41. evaos-0.9.0/cortex/extraction/extractor.py +394 -0
  42. evaos-0.9.0/cortex/extraction/prompts.py +105 -0
  43. evaos-0.9.0/cortex/identity/__init__.py +11 -0
  44. evaos-0.9.0/cortex/identity/cornerstone.py +788 -0
  45. evaos-0.9.0/cortex/identity/drift_calculator.py +457 -0
  46. evaos-0.9.0/cortex/integrations/__init__.py +8 -0
  47. evaos-0.9.0/cortex/integrations/openclaw_config.py +96 -0
  48. evaos-0.9.0/cortex/integrations/openclaw_loader.py +156 -0
  49. evaos-0.9.0/cortex/integrations/openclaw_plugin.py +389 -0
  50. evaos-0.9.0/cortex/llm/__init__.py +29 -0
  51. evaos-0.9.0/cortex/llm/anthropic_provider.py +310 -0
  52. evaos-0.9.0/cortex/llm/fallback.py +290 -0
  53. evaos-0.9.0/cortex/llm/ollama_provider.py +317 -0
  54. evaos-0.9.0/cortex/llm/openai_provider.py +384 -0
  55. evaos-0.9.0/cortex/llm/provider.py +278 -0
  56. evaos-0.9.0/cortex/storage/__init__.py +11 -0
  57. evaos-0.9.0/cortex/storage/adapter.py +568 -0
  58. evaos-0.9.0/cortex/storage/migrations/__init__.py +21 -0
  59. evaos-0.9.0/cortex/storage/migrations/runner.py +221 -0
  60. evaos-0.9.0/cortex/storage/migrations/v3_initial.py +398 -0
  61. evaos-0.9.0/cortex/storage/migrations/v4_cornerstone_evolution.py +41 -0
  62. evaos-0.9.0/cortex/storage/sqlite_adapter.py +1793 -0
  63. evaos-0.9.0/cortex/tools/__init__.py +1 -0
  64. evaos-0.9.0/cortex/tools/migrate_eva.py +833 -0
  65. evaos-0.9.0/cortex/tools/migrate_mem0.py +641 -0
  66. evaos-0.9.0/cortex/types.py +917 -0
  67. evaos-0.9.0/cortex/validation.py +245 -0
  68. evaos-0.9.0/evaos.egg-info/PKG-INFO +246 -0
  69. evaos-0.9.0/evaos.egg-info/SOURCES.txt +112 -0
  70. evaos-0.9.0/evaos.egg-info/dependency_links.txt +1 -0
  71. evaos-0.9.0/evaos.egg-info/entry_points.txt +4 -0
  72. evaos-0.9.0/evaos.egg-info/requires.txt +34 -0
  73. evaos-0.9.0/evaos.egg-info/top_level.txt +1 -0
  74. evaos-0.9.0/pyproject.toml +57 -0
  75. evaos-0.9.0/setup.cfg +4 -0
  76. evaos-0.9.0/tests/test_agentic_retrieval.py +799 -0
  77. evaos-0.9.0/tests/test_brain_graph.py +612 -0
  78. evaos-0.9.0/tests/test_brain_graph_query.py +648 -0
  79. evaos-0.9.0/tests/test_brain_graph_watcher.py +576 -0
  80. evaos-0.9.0/tests/test_circadian.py +1059 -0
  81. evaos-0.9.0/tests/test_cli.py +752 -0
  82. evaos-0.9.0/tests/test_config_completeness.py +180 -0
  83. evaos-0.9.0/tests/test_cornerstone.py +603 -0
  84. evaos-0.9.0/tests/test_cornerstone_evolution.py +543 -0
  85. evaos-0.9.0/tests/test_curiosity_engine.py +656 -0
  86. evaos-0.9.0/tests/test_db_permissions.py +159 -0
  87. evaos-0.9.0/tests/test_deprecation.py +659 -0
  88. evaos-0.9.0/tests/test_drift_calculator.py +553 -0
  89. evaos-0.9.0/tests/test_entity_resolution.py +534 -0
  90. evaos-0.9.0/tests/test_entity_suggest_merges_v2.py +434 -0
  91. evaos-0.9.0/tests/test_eval_harness.py +324 -0
  92. evaos-0.9.0/tests/test_eval_loaders.py +227 -0
  93. evaos-0.9.0/tests/test_eval_metrics.py +295 -0
  94. evaos-0.9.0/tests/test_feedback.py +391 -0
  95. evaos-0.9.0/tests/test_http_admin_explain.py +605 -0
  96. evaos-0.9.0/tests/test_http_endpoints.py +581 -0
  97. evaos-0.9.0/tests/test_http_server.py +697 -0
  98. evaos-0.9.0/tests/test_integration.py +562 -0
  99. evaos-0.9.0/tests/test_llm.py +681 -0
  100. evaos-0.9.0/tests/test_llm_budgets.py +416 -0
  101. evaos-0.9.0/tests/test_llm_cascade.py +550 -0
  102. evaos-0.9.0/tests/test_mcp_server.py +1021 -0
  103. evaos-0.9.0/tests/test_migrate_eva.py +594 -0
  104. evaos-0.9.0/tests/test_migrate_mem0.py +666 -0
  105. evaos-0.9.0/tests/test_migration_runner.py +376 -0
  106. evaos-0.9.0/tests/test_openclaw_integration.py +488 -0
  107. evaos-0.9.0/tests/test_openclaw_loader.py +428 -0
  108. evaos-0.9.0/tests/test_plugin.py +802 -0
  109. evaos-0.9.0/tests/test_reconciliation.py +855 -0
  110. evaos-0.9.0/tests/test_retrieval.py +699 -0
  111. evaos-0.9.0/tests/test_sleep_consolidator.py +1055 -0
  112. evaos-0.9.0/tests/test_storage.py +660 -0
  113. evaos-0.9.0/tests/test_token_budget.py +535 -0
  114. evaos-0.9.0/tests/test_validation.py +350 -0
evaos-0.9.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 100Yen Org
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.
@@ -0,0 +1,4 @@
1
+ include LICENSE
2
+ include README.md
3
+ include pyproject.toml
4
+ recursive-include cortex/config *.toml
evaos-0.9.0/PKG-INFO ADDED
@@ -0,0 +1,246 @@
1
+ Metadata-Version: 2.4
2
+ Name: evaos
3
+ Version: 0.9.0
4
+ Summary: AI memory engine with identity preservation β€” remember everything, forget nothing
5
+ Author-email: 100Yen Org <dev@100yen.org>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/100yenadmin/electric-sheep
8
+ Project-URL: Repository, https://github.com/100yenadmin/electric-sheep
9
+ Project-URL: Documentation, https://github.com/100yenadmin/electric-sheep#readme
10
+ Project-URL: Issues, https://github.com/100yenadmin/electric-sheep/issues
11
+ Keywords: ai,memory,llm,identity,companion,evaos
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Requires-Python: >=3.11
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: aiosqlite>=0.20.0
23
+ Requires-Dist: tiktoken>=0.7
24
+ Requires-Dist: rapidfuzz>=3.6
25
+ Requires-Dist: numpy>=1.26
26
+ Requires-Dist: click>=8.1
27
+ Provides-Extra: llm
28
+ Requires-Dist: openai>=1.50; extra == "llm"
29
+ Requires-Dist: anthropic>=0.40; extra == "llm"
30
+ Requires-Dist: ollama>=0.4; extra == "llm"
31
+ Provides-Extra: embedding
32
+ Requires-Dist: voyageai>=0.3; extra == "embedding"
33
+ Provides-Extra: server
34
+ Requires-Dist: fastapi>=0.115; extra == "server"
35
+ Requires-Dist: uvicorn>=0.30; extra == "server"
36
+ Requires-Dist: pydantic>=2.0; extra == "server"
37
+ Requires-Dist: httpx>=0.27; extra == "server"
38
+ Provides-Extra: mcp
39
+ Requires-Dist: mcp>=1.0; extra == "mcp"
40
+ Provides-Extra: vec
41
+ Requires-Dist: sqlite-vec>=0.1.0; extra == "vec"
42
+ Provides-Extra: dev
43
+ Requires-Dist: pytest>=8.0; extra == "dev"
44
+ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
45
+ Requires-Dist: aiohttp>=3.9; extra == "dev"
46
+ Requires-Dist: build>=1.0; extra == "dev"
47
+ Provides-Extra: all
48
+ Requires-Dist: evaos[dev,embedding,llm,mcp,server,vec]; extra == "all"
49
+ Dynamic: license-file
50
+
51
+ <div align="center">
52
+
53
+ # πŸ‘ evaOS (Electric Sheep)
54
+
55
+ **AI memory that remembers who you are.**
56
+
57
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://python.org)
58
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
59
+ [![PyPI](https://img.shields.io/badge/pypi-evaos-orange.svg)](https://pypi.org/project/evaos/)
60
+
61
+ *Identity-preserving memory engine for AI agents.
62
+ Your agent wakes up tomorrow and still knows who it is.*
63
+
64
+ </div>
65
+
66
+ ---
67
+
68
+ ## Why evaOS?
69
+
70
+ Most AI memory systems are glorified vector stores. They dump embeddings into a database and call it "memory." The result: **progressive identity drift** (your agent slowly forgets who it is), **junk accumulation** (10,000 useless coding-session memories), and **no lifecycle** (no consolidation, no forgetting, no sleep).
71
+
72
+ evaOS is a cognitive memory engine grounded in memory research. It extracts claims, resolves entities, protects core identity, and runs dream cycles to consolidate and prune β€” just like biological memory.
73
+
74
+ ---
75
+
76
+ ## Install
77
+
78
+ ```bash
79
+ pip install evaos
80
+ ```
81
+
82
+ With vector search (recommended):
83
+ ```bash
84
+ pip install "evaos[vec]"
85
+ ```
86
+
87
+ All extras (LLM providers, HTTP API, MCP server):
88
+ ```bash
89
+ pip install "evaos[all]"
90
+ ```
91
+
92
+ ---
93
+
94
+ ## 30-Second Quickstart
95
+
96
+ ```bash
97
+ # Initialize a new memory store
98
+ evaos init
99
+
100
+ # Teach it something
101
+ evaos remember "Andrew is the founder of 100Yen Org. He lives in Bangkok."
102
+
103
+ # Ask it later
104
+ evaos recall "Where does Andrew live?"
105
+ # β†’ Andrew lives in Bangkok. He is the founder of 100Yen Org.
106
+ ```
107
+
108
+ That's it. Memories persist in a local SQLite database, searchable via hybrid BM25 + vector retrieval.
109
+
110
+ ---
111
+
112
+ ## Features
113
+
114
+ ### 🧠 5-Layer Memory Model
115
+
116
+ | Layer | What It Does |
117
+ |-------|-------------|
118
+ | **Extraction** | LLM-powered claim extraction with noise filtering (skips "changed line 47 of auth.py") |
119
+ | **Entity Resolution** | Fuzzy deduplication β€” "Andrew", "andrew", "@andrew" β†’ same person |
120
+ | **Reconciliation** | Smart conflict resolution: ADD / UPDATE / SUPERSEDE / NOOP |
121
+ | **Cornerstones** | Immutable identity anchors that resist drift and accidental deletion |
122
+ | **Token Budget** | Assembles memory context within configurable token ceilings |
123
+
124
+ ### πŸŒ™ Dream Cycles
125
+
126
+ Circadian engine with sleep/wake/dream phases. During idle time, evaOS consolidates memories, runs Ebbinghaus decay on low-signal noise, and calculates identity drift against cornerstone baselines.
127
+
128
+ ### πŸ•ΈοΈ Brain Graph
129
+
130
+ File-watcher + auto-registration document memory graph. Index your docs, specs, and decisions β€” query them alongside conversational memory.
131
+
132
+ ### πŸ” Hybrid Retrieval
133
+
134
+ BM25 full-text search + vector similarity with Reciprocal Rank Fusion. Optional agentic re-ranking for high-stakes queries.
135
+
136
+ ### πŸ”Œ Three Interfaces
137
+
138
+ | Interface | Use Case |
139
+ |-----------|----------|
140
+ | **CLI** | `evaos remember`, `evaos recall`, `evaos dream` |
141
+ | **HTTP API** | FastAPI REST server β€” `evaos serve` |
142
+ | **MCP Server** | Model Context Protocol for agent frameworks β€” `evaos mcp` |
143
+
144
+ ---
145
+
146
+ ## Architecture
147
+
148
+ ```
149
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
150
+ β”‚ evaOS Engine β”‚
151
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
152
+ β”‚ CLI β”‚ HTTP API β”‚ MCP β”‚ Plugin API β”‚
153
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
154
+ β”‚ Retrieval Pipeline β”‚
155
+ β”‚ (BM25 + Vector + RRF + Rerank) β”‚
156
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
157
+ β”‚ Extraction β”‚ Entity Res. β”‚ Reconciliation β”‚
158
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
159
+ β”‚ Cornerstones β”‚ Drift Calc β”‚ Feedback Loop β”‚
160
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
161
+ β”‚ Circadian Engine (Dream Cycles) β”‚
162
+ β”‚ Deprecation Pipeline (Ebbinghaus) β”‚
163
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
164
+ β”‚ Token Budget β”‚ Brain Graph β”‚ Validation Layer β”‚
165
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
166
+ β”‚ SQLite + FTS5 + sqlite-vec β”‚
167
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
168
+ ```
169
+
170
+ ---
171
+
172
+ ## Configuration
173
+
174
+ evaOS uses a `cortex.toml` config file:
175
+
176
+ ```toml
177
+ [cortex]
178
+ storage_backend = "sqlite"
179
+
180
+ [cortex.storage]
181
+ db_path = "evaos.db"
182
+
183
+ [cortex.extraction]
184
+ model = "haiku" # or "gpt-4.1-nano"
185
+ noise_filter = true
186
+
187
+ [cortex.cornerstones]
188
+ max_count = 7
189
+ drift_threshold = 0.15
190
+
191
+ [cortex.circadian]
192
+ dream_interval_hours = 6
193
+ decay_curve = "ebbinghaus"
194
+ ```
195
+
196
+ See [`docs/`](docs/) for full configuration reference and architecture deep-dives.
197
+
198
+ ---
199
+
200
+ ## CLI Reference
201
+
202
+ ```bash
203
+ evaos init [--profile companion|coding|enterprise]
204
+ evaos remember "text"
205
+ evaos recall "query"
206
+ evaos cornerstones list
207
+ evaos cornerstones seal --label "name" --content "text"
208
+ evaos dream
209
+ evaos stats
210
+ evaos health
211
+ evaos export [--format json|sql]
212
+ evaos serve [--port 8000]
213
+ evaos mcp
214
+ evaos backup [--output path]
215
+ ```
216
+
217
+ ---
218
+
219
+ ## Project Structure
220
+
221
+ ```
222
+ cortex/
223
+ β”œβ”€β”€ core/ # Extraction, entity resolution, reconciliation, retrieval
224
+ β”œβ”€β”€ storage/ # SQLite adapter with FTS5 + vector support
225
+ β”œβ”€β”€ brain_graph/ # Document memory graph with file watching
226
+ β”œβ”€β”€ circadian/ # Sleep/wake/dream cycle engine
227
+ β”œβ”€β”€ deprecation/ # Ebbinghaus decay pipeline
228
+ β”œβ”€β”€ identity/ # Cornerstone guardian + drift calculator
229
+ β”œβ”€β”€ config/ # TOML config loading + profiles
230
+ β”œβ”€β”€ api/ # FastAPI HTTP server
231
+ β”œβ”€β”€ integrations/ # MCP server + plugin interface
232
+ β”œβ”€β”€ cli.py # Click-based CLI
233
+ └── types.py # Shared dataclasses and types
234
+ ```
235
+
236
+ ---
237
+
238
+ ## Contributing
239
+
240
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for dev setup, testing, and PR guidelines.
241
+
242
+ ---
243
+
244
+ ## License
245
+
246
+ [MIT](LICENSE) β€” 100Yen Org
evaos-0.9.0/README.md ADDED
@@ -0,0 +1,196 @@
1
+ <div align="center">
2
+
3
+ # πŸ‘ evaOS (Electric Sheep)
4
+
5
+ **AI memory that remembers who you are.**
6
+
7
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://python.org)
8
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
9
+ [![PyPI](https://img.shields.io/badge/pypi-evaos-orange.svg)](https://pypi.org/project/evaos/)
10
+
11
+ *Identity-preserving memory engine for AI agents.
12
+ Your agent wakes up tomorrow and still knows who it is.*
13
+
14
+ </div>
15
+
16
+ ---
17
+
18
+ ## Why evaOS?
19
+
20
+ Most AI memory systems are glorified vector stores. They dump embeddings into a database and call it "memory." The result: **progressive identity drift** (your agent slowly forgets who it is), **junk accumulation** (10,000 useless coding-session memories), and **no lifecycle** (no consolidation, no forgetting, no sleep).
21
+
22
+ evaOS is a cognitive memory engine grounded in memory research. It extracts claims, resolves entities, protects core identity, and runs dream cycles to consolidate and prune β€” just like biological memory.
23
+
24
+ ---
25
+
26
+ ## Install
27
+
28
+ ```bash
29
+ pip install evaos
30
+ ```
31
+
32
+ With vector search (recommended):
33
+ ```bash
34
+ pip install "evaos[vec]"
35
+ ```
36
+
37
+ All extras (LLM providers, HTTP API, MCP server):
38
+ ```bash
39
+ pip install "evaos[all]"
40
+ ```
41
+
42
+ ---
43
+
44
+ ## 30-Second Quickstart
45
+
46
+ ```bash
47
+ # Initialize a new memory store
48
+ evaos init
49
+
50
+ # Teach it something
51
+ evaos remember "Andrew is the founder of 100Yen Org. He lives in Bangkok."
52
+
53
+ # Ask it later
54
+ evaos recall "Where does Andrew live?"
55
+ # β†’ Andrew lives in Bangkok. He is the founder of 100Yen Org.
56
+ ```
57
+
58
+ That's it. Memories persist in a local SQLite database, searchable via hybrid BM25 + vector retrieval.
59
+
60
+ ---
61
+
62
+ ## Features
63
+
64
+ ### 🧠 5-Layer Memory Model
65
+
66
+ | Layer | What It Does |
67
+ |-------|-------------|
68
+ | **Extraction** | LLM-powered claim extraction with noise filtering (skips "changed line 47 of auth.py") |
69
+ | **Entity Resolution** | Fuzzy deduplication β€” "Andrew", "andrew", "@andrew" β†’ same person |
70
+ | **Reconciliation** | Smart conflict resolution: ADD / UPDATE / SUPERSEDE / NOOP |
71
+ | **Cornerstones** | Immutable identity anchors that resist drift and accidental deletion |
72
+ | **Token Budget** | Assembles memory context within configurable token ceilings |
73
+
74
+ ### πŸŒ™ Dream Cycles
75
+
76
+ Circadian engine with sleep/wake/dream phases. During idle time, evaOS consolidates memories, runs Ebbinghaus decay on low-signal noise, and calculates identity drift against cornerstone baselines.
77
+
78
+ ### πŸ•ΈοΈ Brain Graph
79
+
80
+ File-watcher + auto-registration document memory graph. Index your docs, specs, and decisions β€” query them alongside conversational memory.
81
+
82
+ ### πŸ” Hybrid Retrieval
83
+
84
+ BM25 full-text search + vector similarity with Reciprocal Rank Fusion. Optional agentic re-ranking for high-stakes queries.
85
+
86
+ ### πŸ”Œ Three Interfaces
87
+
88
+ | Interface | Use Case |
89
+ |-----------|----------|
90
+ | **CLI** | `evaos remember`, `evaos recall`, `evaos dream` |
91
+ | **HTTP API** | FastAPI REST server β€” `evaos serve` |
92
+ | **MCP Server** | Model Context Protocol for agent frameworks β€” `evaos mcp` |
93
+
94
+ ---
95
+
96
+ ## Architecture
97
+
98
+ ```
99
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
100
+ β”‚ evaOS Engine β”‚
101
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
102
+ β”‚ CLI β”‚ HTTP API β”‚ MCP β”‚ Plugin API β”‚
103
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
104
+ β”‚ Retrieval Pipeline β”‚
105
+ β”‚ (BM25 + Vector + RRF + Rerank) β”‚
106
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
107
+ β”‚ Extraction β”‚ Entity Res. β”‚ Reconciliation β”‚
108
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
109
+ β”‚ Cornerstones β”‚ Drift Calc β”‚ Feedback Loop β”‚
110
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
111
+ β”‚ Circadian Engine (Dream Cycles) β”‚
112
+ β”‚ Deprecation Pipeline (Ebbinghaus) β”‚
113
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
114
+ β”‚ Token Budget β”‚ Brain Graph β”‚ Validation Layer β”‚
115
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
116
+ β”‚ SQLite + FTS5 + sqlite-vec β”‚
117
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
118
+ ```
119
+
120
+ ---
121
+
122
+ ## Configuration
123
+
124
+ evaOS uses a `cortex.toml` config file:
125
+
126
+ ```toml
127
+ [cortex]
128
+ storage_backend = "sqlite"
129
+
130
+ [cortex.storage]
131
+ db_path = "evaos.db"
132
+
133
+ [cortex.extraction]
134
+ model = "haiku" # or "gpt-4.1-nano"
135
+ noise_filter = true
136
+
137
+ [cortex.cornerstones]
138
+ max_count = 7
139
+ drift_threshold = 0.15
140
+
141
+ [cortex.circadian]
142
+ dream_interval_hours = 6
143
+ decay_curve = "ebbinghaus"
144
+ ```
145
+
146
+ See [`docs/`](docs/) for full configuration reference and architecture deep-dives.
147
+
148
+ ---
149
+
150
+ ## CLI Reference
151
+
152
+ ```bash
153
+ evaos init [--profile companion|coding|enterprise]
154
+ evaos remember "text"
155
+ evaos recall "query"
156
+ evaos cornerstones list
157
+ evaos cornerstones seal --label "name" --content "text"
158
+ evaos dream
159
+ evaos stats
160
+ evaos health
161
+ evaos export [--format json|sql]
162
+ evaos serve [--port 8000]
163
+ evaos mcp
164
+ evaos backup [--output path]
165
+ ```
166
+
167
+ ---
168
+
169
+ ## Project Structure
170
+
171
+ ```
172
+ cortex/
173
+ β”œβ”€β”€ core/ # Extraction, entity resolution, reconciliation, retrieval
174
+ β”œβ”€β”€ storage/ # SQLite adapter with FTS5 + vector support
175
+ β”œβ”€β”€ brain_graph/ # Document memory graph with file watching
176
+ β”œβ”€β”€ circadian/ # Sleep/wake/dream cycle engine
177
+ β”œβ”€β”€ deprecation/ # Ebbinghaus decay pipeline
178
+ β”œβ”€β”€ identity/ # Cornerstone guardian + drift calculator
179
+ β”œβ”€β”€ config/ # TOML config loading + profiles
180
+ β”œβ”€β”€ api/ # FastAPI HTTP server
181
+ β”œβ”€β”€ integrations/ # MCP server + plugin interface
182
+ β”œβ”€β”€ cli.py # Click-based CLI
183
+ └── types.py # Shared dataclasses and types
184
+ ```
185
+
186
+ ---
187
+
188
+ ## Contributing
189
+
190
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for dev setup, testing, and PR guidelines.
191
+
192
+ ---
193
+
194
+ ## License
195
+
196
+ [MIT](LICENSE) β€” 100Yen Org
File without changes
File without changes