aether-context 0.3.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 (92) hide show
  1. aether_context-0.3.0/LICENSE +201 -0
  2. aether_context-0.3.0/NOTICE.md +19 -0
  3. aether_context-0.3.0/PKG-INFO +429 -0
  4. aether_context-0.3.0/README.md +384 -0
  5. aether_context-0.3.0/aether_context/__init__.py +29 -0
  6. aether_context-0.3.0/aether_context/_log.py +33 -0
  7. aether_context-0.3.0/aether_context/cli.py +1191 -0
  8. aether_context-0.3.0/aether_context/config.py +206 -0
  9. aether_context-0.3.0/aether_context/context_pool.py +819 -0
  10. aether_context-0.3.0/aether_context/encoder.py +213 -0
  11. aether_context-0.3.0/aether_context/errors.py +93 -0
  12. aether_context-0.3.0/aether_context/local_llm.py +846 -0
  13. aether_context-0.3.0/aether_context/mpo.py +151 -0
  14. aether_context-0.3.0/aether_context/py.typed +0 -0
  15. aether_context-0.3.0/aether_context/quantize.py +86 -0
  16. aether_context-0.3.0/aether_context/session.py +829 -0
  17. aether_context-0.3.0/aether_context/slice_loader.py +501 -0
  18. aether_context-0.3.0/aether_context/tokenizer.py +64 -0
  19. aether_context-0.3.0/aether_context/ui.py +253 -0
  20. aether_context-0.3.0/aether_context/witness.py +356 -0
  21. aether_context-0.3.0/aether_context.egg-info/PKG-INFO +429 -0
  22. aether_context-0.3.0/aether_context.egg-info/SOURCES.txt +90 -0
  23. aether_context-0.3.0/aether_context.egg-info/dependency_links.txt +1 -0
  24. aether_context-0.3.0/aether_context.egg-info/entry_points.txt +2 -0
  25. aether_context-0.3.0/aether_context.egg-info/requires.txt +22 -0
  26. aether_context-0.3.0/aether_context.egg-info/top_level.txt +1 -0
  27. aether_context-0.3.0/pyproject.toml +78 -0
  28. aether_context-0.3.0/setup.cfg +4 -0
  29. aether_context-0.3.0/tests/test_aether_agent.py +49 -0
  30. aether_context-0.3.0/tests/test_agent_commands.py +36 -0
  31. aether_context-0.3.0/tests/test_agent_config.py +122 -0
  32. aether_context-0.3.0/tests/test_agent_library.py +31 -0
  33. aether_context-0.3.0/tests/test_agent_profile.py +51 -0
  34. aether_context-0.3.0/tests/test_agent_profile_commands.py +25 -0
  35. aether_context-0.3.0/tests/test_agent_runner.py +52 -0
  36. aether_context-0.3.0/tests/test_agent_runner_define_command.py +47 -0
  37. aether_context-0.3.0/tests/test_agent_runner_lock.py +37 -0
  38. aether_context-0.3.0/tests/test_agent_slash.py +66 -0
  39. aether_context-0.3.0/tests/test_agent_slash_agents_columns.py +28 -0
  40. aether_context-0.3.0/tests/test_agent_slash_cmd.py +48 -0
  41. aether_context-0.3.0/tests/test_agent_store.py +56 -0
  42. aether_context-0.3.0/tests/test_agents_view.py +27 -0
  43. aether_context-0.3.0/tests/test_api_eval.py +69 -0
  44. aether_context-0.3.0/tests/test_auth.py +182 -0
  45. aether_context-0.3.0/tests/test_brains.py +180 -0
  46. aether_context-0.3.0/tests/test_bridge.py +429 -0
  47. aether_context-0.3.0/tests/test_cli.py +178 -0
  48. aether_context-0.3.0/tests/test_cli_disk.py +36 -0
  49. aether_context-0.3.0/tests/test_cli_dispatch.py +262 -0
  50. aether_context-0.3.0/tests/test_cli_doctor.py +31 -0
  51. aether_context-0.3.0/tests/test_cli_setup.py +192 -0
  52. aether_context-0.3.0/tests/test_cli_surface.py +399 -0
  53. aether_context-0.3.0/tests/test_config.py +138 -0
  54. aether_context-0.3.0/tests/test_context_pool.py +412 -0
  55. aether_context-0.3.0/tests/test_encoder.py +237 -0
  56. aether_context-0.3.0/tests/test_end_to_end.py +171 -0
  57. aether_context-0.3.0/tests/test_errors.py +72 -0
  58. aether_context-0.3.0/tests/test_hardware.py +36 -0
  59. aether_context-0.3.0/tests/test_install_security.py +37 -0
  60. aether_context-0.3.0/tests/test_local_llm.py +316 -0
  61. aether_context-0.3.0/tests/test_local_llm_openai.py +75 -0
  62. aether_context-0.3.0/tests/test_moat_seal.py +21 -0
  63. aether_context-0.3.0/tests/test_mpo.py +74 -0
  64. aether_context-0.3.0/tests/test_multi_runner.py +64 -0
  65. aether_context-0.3.0/tests/test_ollama_ctl.py +95 -0
  66. aether_context-0.3.0/tests/test_ollama_integration.py +129 -0
  67. aether_context-0.3.0/tests/test_onboarding.py +62 -0
  68. aether_context-0.3.0/tests/test_pool_quantize.py +51 -0
  69. aether_context-0.3.0/tests/test_profiles.py +42 -0
  70. aether_context-0.3.0/tests/test_progress.py +30 -0
  71. aether_context-0.3.0/tests/test_protocol_lockstep.py +44 -0
  72. aether_context-0.3.0/tests/test_quantize.py +58 -0
  73. aether_context-0.3.0/tests/test_release_parity.py +138 -0
  74. aether_context-0.3.0/tests/test_repl_agents.py +36 -0
  75. aether_context-0.3.0/tests/test_repl_multi.py +46 -0
  76. aether_context-0.3.0/tests/test_repl_preflight.py +60 -0
  77. aether_context-0.3.0/tests/test_run_agent_events_system.py +29 -0
  78. aether_context-0.3.0/tests/test_safety.py +64 -0
  79. aether_context-0.3.0/tests/test_session.py +337 -0
  80. aether_context-0.3.0/tests/test_session_fallback.py +59 -0
  81. aether_context-0.3.0/tests/test_slash.py +191 -0
  82. aether_context-0.3.0/tests/test_slash_agents.py +23 -0
  83. aether_context-0.3.0/tests/test_slash_custom_invoke.py +39 -0
  84. aether_context-0.3.0/tests/test_slash_ollama.py +40 -0
  85. aether_context-0.3.0/tests/test_slice_loader.py +402 -0
  86. aether_context-0.3.0/tests/test_smoke.py +92 -0
  87. aether_context-0.3.0/tests/test_tokenizer.py +82 -0
  88. aether_context-0.3.0/tests/test_toolparse.py +54 -0
  89. aether_context-0.3.0/tests/test_transport.py +156 -0
  90. aether_context-0.3.0/tests/test_ui.py +183 -0
  91. aether_context-0.3.0/tests/test_web_tools.py +234 -0
  92. aether_context-0.3.0/tests/test_witness.py +370 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Aether
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,19 @@
1
+ # NOTICE
2
+
3
+ aether-context is licensed under the Apache License, Version 2.0,
4
+ © 2026 Aether AI. See the `LICENSE` file for the full text.
5
+ Created by Brandon Barrante (https://github.com/AetherAI3), founder of Aether AI.
6
+
7
+ ## Third-Party Dependencies
8
+
9
+ The following third-party packages may be used by aether-context. Their licenses
10
+ are all compatible with Apache-2.0:
11
+
12
+ - **numpy** — BSD-3-Clause (core dependency)
13
+
14
+ ### Optional extras
15
+
16
+ - **torch** — BSD-3-Clause
17
+ - **transformers** — Apache-2.0
18
+ - **hnswlib** — Apache-2.0
19
+ - **llama-cpp-python** — MIT
@@ -0,0 +1,429 @@
1
+ Metadata-Version: 2.4
2
+ Name: aether-context
3
+ Version: 0.3.0
4
+ Summary: Unlimited Context — virtual memory for an LLM's attention. Local-first, numpy-only core.
5
+ Author: Aether AI
6
+ Maintainer: Aether AI
7
+ License: Apache-2.0
8
+ Project-URL: Homepage, https://github.com/AetherAI3/Unlimited-Context-LLM
9
+ Project-URL: Repository, https://github.com/AetherAI3/Unlimited-Context-LLM.git
10
+ Project-URL: Documentation, https://github.com/AetherAI3/Unlimited-Context-LLM#readme
11
+ Project-URL: Issues, https://github.com/AetherAI3/Unlimited-Context-LLM/issues
12
+ Project-URL: Changelog, https://github.com/AetherAI3/Unlimited-Context-LLM/blob/main/CHANGELOG.md
13
+ Keywords: llm,context,retrieval,ollama,local,rag,agents
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
+ Requires-Python: <3.15,>=3.10
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ License-File: NOTICE.md
28
+ Requires-Dist: numpy<3.0,>=1.24
29
+ Provides-Extra: ollama
30
+ Provides-Extra: llamacpp
31
+ Requires-Dist: llama-cpp-python>=0.2; extra == "llamacpp"
32
+ Provides-Extra: hf
33
+ Requires-Dist: transformers>=4.40; extra == "hf"
34
+ Requires-Dist: torch>=2.2; extra == "hf"
35
+ Provides-Extra: fast
36
+ Requires-Dist: hnswlib>=0.8; extra == "fast"
37
+ Provides-Extra: all
38
+ Requires-Dist: aether-context[fast,hf,llamacpp]; extra == "all"
39
+ Provides-Extra: dev
40
+ Requires-Dist: pytest>=8; extra == "dev"
41
+ Requires-Dist: pytest-cov; extra == "dev"
42
+ Requires-Dist: ruff>=0.5; extra == "dev"
43
+ Requires-Dist: mypy>=1.10; extra == "dev"
44
+ Dynamic: license-file
45
+
46
+ <div align="center">
47
+
48
+ # ⚡ Unlimited Context LLM
49
+
50
+ **Give your AI superpowers with unlimited context for [Ollama](https://ollama.com)** — a **billion+ token memory** for any LLM. Local-first, on your own machine, free.
51
+
52
+ <img width="537" height="405" alt="Unlimited Context" src="https://github.com/user-attachments/assets/79758729-ead7-42ca-9784-831cae68ef06" />
53
+
54
+ [![License](https://img.shields.io/badge/License-Apache_2.0-06b6d4?style=flat-square)](LICENSE)
55
+ [![Python](https://img.shields.io/badge/Python-3.10%2B-14b8a6?style=flat-square&logo=python&logoColor=white)](https://www.python.org)
56
+ [![Built by Aether](https://img.shields.io/badge/Built_by-Aether-7c3aed?style=flat-square)](https://aethersystems.net)
57
+ [![Local-first](https://img.shields.io/badge/Local--first-100%25_offline-0ea5e9?style=flat-square)](#what-you-get)
58
+ [![PRs welcome](https://img.shields.io/badge/PRs-welcome-22c55e?style=flat-square)](CONTRIBUTING.md)
59
+ [![Stars](https://img.shields.io/github/stars/AetherAI3/Unlimited-Context-LLM?style=flat-square&logo=github&color=eab308)](https://github.com/AetherAI3/Unlimited-Context-LLM/stargazers)
60
+
61
+ **An open project from [Aether](https://aethersystems.net)** · Apache-2.0 · [Install](#quickstart)
62
+
63
+ <p align="center">
64
+ <a href="#the-shape-of-it">The shape of it</a> ·
65
+ <a href="#the-proof">Proof</a> ·
66
+ <a href="SAFETY.md">Safety</a> ·
67
+ <a href="USE_POLICY.md">Use policy</a> ·
68
+ <a href="#the-problem">Problem</a> ·
69
+ <a href="#how-it-works">How it works</a> ·
70
+ <a href="#mpo-the-context-chain">MPO chain</a> ·
71
+ <a href="#pick-your-memory-size">Memory size</a> ·
72
+ <a href="#the-math-per-tier">The math</a> ·
73
+ <a href="#ram-footprint">RAM</a> ·
74
+ <a href="#common-commands">Commands</a> ·
75
+ <a href="#the-aether-coding-terminal">Terminal</a> ·
76
+ <a href="#quickstart">Install</a> ·
77
+ <a href="#citation">Cite</a>
78
+ </p>
79
+
80
+ </div>
81
+
82
+ ---
83
+
84
+ > **Your context window didn't get bigger. Its *reach* did.**
85
+ > Unlimited Context is virtual memory for an LLM. The model keeps its small window; the engine keeps a vast store on your disk and pulls the *right slice* back in while the model reasons. A small local model stays coherent across runs that would blow past any context window.
86
+
87
+ > ⚠️ **Giving a model durable memory is powerful — read the safety measures first.** Real
88
+ > concerns (runaway agents, grounding drift, an agent's own notes becoming its rules) and what
89
+ > we do about them: **[Aether AI — Ethical & Safety Measures](SAFETY.md)**. The project is open
90
+ > under Apache-2.0 and governed by the **[Acceptable Use Policy](USE_POLICY.md)** — these are not
91
+ > recommendations. Anyone using the project must comply with its terms, and by using the project you
92
+ > already agree to and are bound by them.
93
+
94
+ ---
95
+
96
+ ## The shape of it
97
+
98
+ Four steps, start to reach:
99
+
100
+ 1. **Pick a model** — any local model (Ollama, llama.cpp, Hugging Face) or your own API-backed one.
101
+ 2. **Start a session** — one object wraps the model and its memory.
102
+ 3. **Allocate disk** — choose a pool size; that disk *is* the memory.
103
+ 4. **Reach 1,000×+ further** — overflow is encoded to the pool and the exact slice is recovered the moment the model needs it.
104
+
105
+ That's it. A 5 GB pool gives a small model ~1.16B tokens of reach — about **9,000×** a 128K window — on your own machine, offline.
106
+
107
+ ---
108
+
109
+ ## The problem
110
+
111
+ Long agentic runs all die the same way. The model fills its window, starts **compressing** its own history, silently drops the one detail that mattered three steps ago — and drifts. You've seen it: the runaway PR, the agent that rewrites a function it already wrote, the build that falls apart at hour two. Bigger windows just delay it, and a crammed 1M-token window **rots in the middle** anyway.
112
+
113
+ The fix isn't a bigger window — it's to stop throwing the overflow away. Instead of summarizing what spills over, Unlimited Context **encodes** it to a local pool on your disk and **recovers** the right slice exactly when it's needed. Nothing load-bearing is silently lost.
114
+
115
+ <p align="center"><strong>Compress &amp; forget ✗ &nbsp;→&nbsp; Encode &amp; recover ✓</strong></p>
116
+
117
+ ## How it works
118
+
119
+ It's **virtual memory, for attention.** Map it to an OS and it clicks:
120
+
121
+ | OS | Unlimited Context |
122
+ |---|---|
123
+ | RAM | the **resident window** the model sees now (small, fast) |
124
+ | Disk | the **context pool** — your encoded memory (~5 GB ≈ ~1B tokens) |
125
+ | Pager | the **slice loader** — prefetches the next slice from what the model is reasoning about *right now* |
126
+ | Page-replacement | the **retention policy** — useful slices *stay*, stale ones *fade*, anything relevant again comes back |
127
+
128
+ All of it runs while the model generates, so reaching the pool adds no wall-clock. → full explainer in [`docs/how-it-works.md`](docs/how-it-works.md).
129
+
130
+ ## What you get
131
+
132
+ - 🧠 **Unbounded reach** — ~1B tokens of encoded context in ~5 GB on disk; the model reaches it in slices.
133
+ - 🧩 **MPO context chain** — recall pulls the whole connected thread, not isolated nearest-neighbors (5× connected-context recall in-bench).
134
+ - ⚡ **Zero added latency** — the pager runs *concurrently* with generation, hidden behind the model's own thinking.
135
+ - 🪟 **Curated beats crammed** — a small, relevant resident window outperforms a stuffed one (no lost-in-the-middle) — and costs less.
136
+ - 🔒 **Local-first** — your context never leaves your machine. Free storage, full privacy, works offline.
137
+ - 🤖 **Any model** — Llama, Qwen, Mistral, Phi — via Ollama, llama.cpp, or HF, or your own API-backed model.
138
+ - 📉 **Coherence you can *measure*** — ship the head-to-head: same model, engine on vs off, watch the drift rate fall off a cliff.
139
+
140
+ ## Pick your memory size
141
+
142
+ First run drops you into a slider — pick how much your model gets to remember:
143
+
144
+ ```text
145
+ $ aether-context init
146
+ ──────────────────────────────────────────────────────────────────
147
+ ⚡ choose your context pool encoded reach · not a window
148
+ ──────────────────────────────────────────────────────────────────
149
+ ▸ 5 GB ████░░░░░░░░░░░░ ~1.16B tokens a big project (floor)
150
+ 10 GB ████████░░░░░░░░ ~2.33B tokens a large monorepo + docs
151
+ 15 GB ████████████░░░░ ~3.49B tokens multiple repos / long runs
152
+ 20 GB ████████████████ ~4.65B tokens massive corpus / power user
153
+ ──────────────────────────────────────────────────────────────────
154
+ reach ≈ pool_GB × 233M tokens custom: --pool 12 (any size ≥ 5 GB)
155
+ ↑/↓ slide ↵ confirm
156
+
157
+ pool [5]: 10
158
+ ✓ 10 GB → your model can now reach ~2.33 billion tokens
159
+ ```
160
+
161
+ ## What that buys you in coding time
162
+
163
+ The real win isn't the token count — it's that the wall disappears. A typical ~128K context window fills after well under an hour of active agent work, then starts compacting and forgetting. A 5 GB pool is **~9,000× bigger**.
164
+
165
+ Rough ballpark — assuming a busy coding agent encodes ~300K–1M keep-worthy tokens/hour (chatty swarms burn more, careful single agents less):
166
+
167
+ | Pool | Reach | Active autonomous coding before it even fills\* |
168
+ |:----:|:-----:|:------------------------------------------------|
169
+ | **5 GB** | ~1.16B | **~1,200–3,900 hrs** — weeks of nonstop building |
170
+ | 10 GB | ~2.33B | ~2,300–7,800 hrs |
171
+ | 15 GB | ~3.49B | ~3,500–11,600 hrs |
172
+ | 20 GB | ~4.65B | ~4,700–15,500 hrs |
173
+
174
+ For color: 5 GB of reach ≈ ~100M lines of code, or a shelf of ~8,000 books — you won't fill it in one sitting.
175
+
176
+ <sub>\* Rough order of magnitude. Because the retention policy fades stale slices, the pool never hard-stops anyway — it just keeps what's relevant. Run a build as long as you want; it won't lose the plot. The per-session RAM math is in [RAM footprint](#ram-footprint) below.</sub>
177
+
178
+ ## Running many sessions
179
+
180
+ Running more than one agent? How the pool is shared is the single biggest RAM lever:
181
+
182
+ - **`--pool-mode shared`** — one pool, one index, all sessions reach the same memory. The index is paid **once**; each extra session adds only ~30 MB, so RAM barely moves as you add sessions. Best for related work (same project) or max concurrency on a small machine. Trade-off: sessions can see each other's context (no isolation).
183
+ - **`--pool-mode separate`** *(default)* — each session gets its own pool + index, fully **isolated and private**. Clean, but you pay one index **per session**, so RAM scales with `N × pool`. Best for unrelated tasks or when isolation matters.
184
+
185
+ **How many actually fit:**
186
+
187
+ | Pool | 8 GB · shared | 8 GB · separate | 16 GB · shared | 16 GB · separate |
188
+ |------|---------------|-----------------|----------------|------------------|
189
+ | 5 GB | dozens¹ | **~13** | dozens¹ | **~33** |
190
+ | 10 GB | dozens¹ | **~7** | dozens¹ | **~18** |
191
+ | 15 GB | dozens¹ | **~4** | dozens¹ | **~12** |
192
+ | 20 GB | dozens¹ | **~3** | dozens¹ | **~9** |
193
+
194
+ <sub>Reserves: ~2.5 GB held back on an 8 GB machine, ~6 GB on 16 GB — the rest stays for your OS and editor. ¹ With a shared pool, RAM stops being the limit (50–70+ sessions fit); you're bounded by CPU and good sense, not memory.</sub>
195
+
196
+ ## The math, per tier
197
+
198
+ Derived, not vibes:
199
+
200
+ | Pool | Slices | Encoded reach | Slider |
201
+ |------|--------|---------------|--------|
202
+ | **5 GB** *(floor)* | 2.27M | **~1.16B tokens** | `████░░░░░░░░░░░░` |
203
+ | 10 GB | 4.55M | **~2.33B tokens** | `████████░░░░░░░░` |
204
+ | 15 GB | 6.82M | **~3.49B tokens** | `████████████░░░░` |
205
+ | 20 GB | 9.09M | **~4.65B tokens** | `████████████████` |
206
+
207
+ How those numbers come out: ~2.2 KB per slice (a 256-dim vector + compressed text + metadata) ÷ 512 tokens per slice → **~455K slices/GB → ~233M tokens of reach per GB**. So `reach ≈ pool_GB × 233M`. 5 GB is the floor; bump anytime with `aether-context --pool 20`.
208
+
209
+ > **Honest:** that's encoded **reach**, retrieved in slices — not a bigger attention window, and it rides on retrieval hit rate. A bigger pool buys more reachable codebase/corpus *per session* — not more concurrent sessions (those are RAM-bound, ~30 on 8 GB either way).
210
+
211
+ ---
212
+
213
+ ## The proof
214
+
215
+ Not a synthetic micro-benchmark — a **real, paid, end-to-end run.** A reasoning model
216
+ (`deepseek-v4-pro`, via OpenRouter) driven through a **40-turn agent session that overflows its
217
+ window** (2,000-token window, 60 real `microsoft/vscode` issues), measured **engine off vs on** —
218
+ one live run, **$0.19**, 2026-06-14.
219
+
220
+ - **The model stops forgetting.** Recall of early facts after they fall out of the window:
221
+ **0.15 → 1.00.** The baseline drifts and forgets; the engine holds every early fact — zero drift.
222
+ - **Failure turns into success on the real work.** Tasks completed correctly: **3 / 20 → 20 / 20.**
223
+ The job is only done right *with* the engine.
224
+ - **Cheaper, not just better.** **−24%** total cost, **−54%** in the back half — the engine sends a
225
+ compact recalled slice instead of dragging the whole transcript into every call.
226
+
227
+ <p align="center">
228
+ <img alt="Cumulative cost and recall coherence vs turn — engine off vs on" width="780"
229
+ src="docs/benchmarks/artifacts/2026-06-14-deepseek-v4-pro/api_eval_plot.png">
230
+ </p>
231
+
232
+ | Metric | Off (baseline) | On (engine) | Change |
233
+ |---|:---:|:---:|:---:|
234
+ | **Recall coherence** (early facts still correct) | 0.15 | **1.00** | **6.7×** |
235
+ | **Work outcome** (tasks done right) | 3 / 20 | **20 / 20** | **3 → 20** |
236
+ | **Cost — full session** | $0.0711 | **$0.0542** | **−24%** |
237
+ | **Cost — back half (recall phase)** | $0.00117/turn | **$0.00053/turn** | **−54%** |
238
+
239
+ **Committed data:** [full write-up](docs/benchmarks/2026-06-14-deepseek-v4-pro-session-eval.md) ·
240
+ [raw artifacts](docs/benchmarks/artifacts/2026-06-14-deepseek-v4-pro/) (`api_eval_results.json`,
241
+ `api_eval_series.csv`, `api_eval_plot.png`, `RESULTS.md`) · reproduce with
242
+ `python -m bench.api_eval --model deepseek/deepseek-v4-pro --repo microsoft/vscode --arms off,on,on_chain --plot`
243
+
244
+ <sub>**Scope, honestly:** this measures the **engine** (retrieve-on-overflow memory), not the MPO
245
+ chain — on this single-fact recall task the chain **ties** plain recall (both 1.00); its multi-slice
246
+ edge is **synthetic-only so far** (`bench/chain_recall.py`: connected-context recall 0.15 → 0.78),
247
+ with the live `thread` run **pending**, not yet claimed. The 2,000-token window is deliberately tiny
248
+ to force overflow, so a realistic window shows a smaller (still real) gain. N = 20 recall turns,
249
+ single run.</sub>
250
+
251
+ ---
252
+
253
+ ## RAM footprint
254
+
255
+ The engine stays light: **vectors live on disk (mmap'd)** — only the small HNSW index graph and a hot working set are ever resident. So RAM is a predictable formula, not a mystery:
256
+
257
+ ```
258
+ RAM ≈ ~180 MB base (engine + shared static encoder)
259
+ + ~29 MB per GB of pool (resident index)
260
+ + ~30 MB per active session
261
+ ```
262
+ ## MPO: the context chain
263
+
264
+ Plain semantic search returns isolated nearest-neighbors — the single closest slices, ripped out of the thread they belonged to. Recall a fact and you often miss the three slices around it that made it make sense.
265
+
266
+ The **MPO context chain** fixes that. It links the session's slices into one connected structure, so when cosine pulls an entry slice, the chain **pulls in the slices most coupled to it** — widening the working set with the *connected thread*, not stray hits. Cosine is still the retrieval mechanism; the chain **assists** it.
267
+
268
+ The chain is **Aether-tuned, deterministic, and fully local** — no training, no network. It's purely **additive**: it only ever *adds* connected context, never blocks or replaces a hit, and on any hiccup it falls back cleanly to plain cosine.
269
+
270
+ In a planted-thread benchmark, this lifts connected-context recall from **0.15 (cosine alone) to 0.78** — over 5× more of the right thread in the window. On by default:
271
+
272
+ ```python
273
+ Session(model="ollama/qwen2.5", pool_gb=10) # chain on by default
274
+ Session(model="ollama/qwen2.5", pool_gb=10, mpo_chain=False) # plain cosine
275
+ ```
276
+ ```bash
277
+ aether-context run "..." --no-mpo-chain # disable for one run
278
+ ```
279
+
280
+ **Resident index cost by pool size:**
281
+
282
+ | Pool | Index RAM (resident) |
283
+ |------|----------------------|
284
+ | 5 GB | ~146 MB |
285
+ | 10 GB | ~291 MB |
286
+ | 15 GB | ~436 MB |
287
+ | 20 GB | ~582 MB |
288
+
289
+ (The encoder is always shared — stateless, ~31 MB, loaded once. Only the pool/index differs.)
290
+
291
+ > **TL;DR.** **Shared pool → RAM is not your limit** — spin up as many sessions as your CPU allows. **Separate pools → one index each**, so plan on ~3 (20 GB) to ~13 (5 GB) sessions on 8 GB, roughly double at 16 GB. A bigger pool always buys **reach**, never more sessions. Need more headroom? Shrink the pool. (`--index tiered` is reserved for a future paged-graph index and currently runs the flat index — it does not yet reduce resident RAM.)
292
+
293
+ ## Common commands
294
+
295
+ <div align="center">
296
+ <img width="880" alt="Coding time per pool size" src="https://github.com/user-attachments/assets/af626850-96b1-43a2-91fd-b5162bc21e5a" />
297
+ </div>
298
+
299
+ | Command | What it's for |
300
+ |---|---|
301
+ | `aether-context setup` | **Start here.** Guided first run: size the pool, check your model, verify the engine. |
302
+ | `aether-context init` | Pick your pool size — the on-disk storage slider — on first run. |
303
+ | `aether-context run "<task>" --no-mpo-chain` | Run with the MPO context chain disabled (plain cosine). |
304
+ | `aether-context run "<task>"` | One-shot a task with full reach, then print the result. |
305
+ | `aether-context chat` | Open an interactive session; type `/status` anytime, `/clear` to reset. |
306
+ | `aether-context status` | See pool size, slices used, reach, and hit rate at a glance. |
307
+ | `aether-context doctor` | Check Ollama, your model, disk, and RAM before a long run. |
308
+ | `aether-context --pool 20` | Resize the pool anytime (non-destructive re-index). |
309
+
310
+ > **Tip:** run `aether-context doctor` first — it catches the three things that ever go wrong (Ollama down, model not pulled, not enough disk) and prints the exact fix.
311
+
312
+ ## The `aether` coding terminal
313
+
314
+ **`aether`** is an open-source agentic **coding terminal** that runs on the Unlimited Context
315
+ engine. It's **local-first**: turns run on your local **[Ollama](https://ollama.com)** by default
316
+ (no account, no network); sign in and they switch to the **Aether cloud API**.
317
+
318
+ It ships as its own package, not as part of `aether-context`:
319
+
320
+ ```bash
321
+ pip install aether-agent # or: npm install -g aether-agents
322
+ ```
323
+
324
+ Source lives at [AetherAI3/aether-agent](https://github.com/AetherAI3/aether-agent). The
325
+ `aether_agent/` directory in *this* repo is the Python-native twin — same commands, same backend,
326
+ same tools — kept here for development, and deliberately **not** published from this package:
327
+ PyPI's `aether-agent` already owns that import path and the `aether` command, so shipping a
328
+ second copy would silently overwrite it wherever both are installed.
329
+
330
+ | Command | What it does |
331
+ |---|---|
332
+ | `aether` | Open the interactive REPL (local Ollama by default). |
333
+ | `aether "<prompt>"` | One-shot turn, streamed. |
334
+ | `aether code "<task>"` | Autonomous coding run on the Unlimited Context brain (test-gated, git-checkpointed). |
335
+ | `aether auth login` | Sign in (`--token <t>` or `--username/--password`) for the hosted API (then set `backend auto\|cloud`). |
336
+ | `aether auth status \| logout \| token` | Show / clear / print the stored credential. |
337
+ | `aether models` | List models available to your tier. |
338
+ | `aether config [show\|get <k>\|set <k> <v>]` | Local settings, incl. `backend = local (default)\|auto\|cloud`. |
339
+
340
+ **Slash commands** (inside the REPL): `/help` · `/models` · `/model <tag>` · `/agents` · `/agent <id>` · `/tier` · `/audit [n]` · `/web <query>` · `/clear` · `/exit`.
341
+
342
+ **Web tools** — the agent can reach the web on any backend: `web_search` (DuckDuckGo, no key) and `web_fetch` (URL → readable text, SSRF-guarded).
343
+
344
+ **Backend** — `local` (the default) runs every turn on your own Ollama; nothing leaves your machine and no account is needed. Opt into the hosted Aether API with `aether config set backend auto|cloud` (or `AETHER_BACKEND=auto`) plus `aether auth login` — `auto` uses the cloud only when you're signed in and falls back to local otherwise. The hosted API is the maintainer's own instance, so a fresh clone never calls it.
345
+
346
+ **Smoke test** — from a clone of this repo, with Ollama up, `python -m aether_agent.smoke` runs the SSRF guard, a real local turn, a web search + fetch, and the cloud path (when signed in), printing `PASS`/`SKIP`/`FAIL` (exit non-zero only on a real failure — missing Ollama/network/sign-in are skips).
347
+
348
+ ## Quickstart
349
+
350
+ ```bash
351
+ pip install aether-context
352
+ aether-context setup
353
+ ```
354
+
355
+ Prefer npm? Same software, same release — the npm package is a launcher that installs the
356
+ Python engine into a private virtualenv for you (it needs Python 3.10+ on your PATH):
357
+
358
+ ```bash
359
+ npx aether-context setup
360
+ ```
361
+
362
+ `setup` sizes the pool, checks for a local model, and verifies the engine end to end. It works
363
+ with no daemon, no network and no model pulled — the check runs against the built-in mock model.
364
+
365
+ <details>
366
+ <summary>Other install routes</summary>
367
+
368
+ ```bash
369
+ # Straight from source, always the latest main:
370
+ pip install git+https://github.com/AetherAI3/Unlimited-Context-LLM.git
371
+
372
+ # Isolated, if you only want the CLI:
373
+ pipx install aether-context
374
+ ```
375
+
376
+ The distribution name is **`aether-context`** — `pip install unlimited-context` is not this
377
+ package.
378
+ </details>
379
+
380
+ ```python
381
+ from aether_context import Session
382
+
383
+ s = Session(model="ollama/qwen2.5", pool_gb=5)
384
+ s.run("Build me a full-stack weightlifting tracker app.")
385
+ # runs long. stays coherent. walk away.
386
+ ```
387
+
388
+ That's the whole thing. One small model, one command, a billion tokens of reach behind it.
389
+
390
+ ## Honest about the word "unlimited"
391
+
392
+ "Unlimited" means **reach, not attention.** Your model keeps its native window — we make it *reach* a billion-token pool in slices, via fast retrieval. The whole thing rides on retrieval **hit rate**; when it's high (and the loader is built to keep it high), the pool feels like one seamless context. The measured proof of all this is up top — see [The proof](#the-proof).
393
+
394
+ ## Citation
395
+
396
+ If Unlimited Context helps your work, please cite it. Built and maintained by **Aether AI**.
397
+
398
+ ```bibtex
399
+ @software{unlimited_context_2026,
400
+ title = {Unlimited Context (aether-context): virtual memory for LLM attention},
401
+ author = {Barrante, Brandon},
402
+ organization = {Aether AI},
403
+ year = {2026},
404
+ url = {https://github.com/AetherAI3/Unlimited-Context-LLM},
405
+ license = {Apache-2.0}
406
+ }
407
+ ```
408
+
409
+ GitHub's "Cite this repository" button reads [`CITATION.cff`](CITATION.cff) directly.
410
+
411
+ ## ⭐ Star, share, contribute
412
+
413
+ If this gave your local model superpowers, **drop a star** — it's how other people find it. **PRs and issues are welcome** — see [CONTRIBUTING.md](CONTRIBUTING.md). Runnable examples live in [`examples/`](examples/) — start with [`quickstart.py`](examples/quickstart.py), then [`coding_agent.py`](examples/coding_agent.py).
414
+
415
+ ## License
416
+
417
+ **Apache-2.0.** Use it, fork it, ship it in your product.
418
+
419
+ ---
420
+
421
+ <div align="center">
422
+
423
+ Built by **Aether AI** · [Aether](https://aethersystems.net)
424
+
425
+ <img width="880" alt="Unlimited Context" src="https://github.com/user-attachments/assets/4b7eef9a-8b1c-4dc7-b926-771ce53ed04d" />
426
+
427
+ *Unbounded reach for the model you already run.*
428
+
429
+ </div>