xerolith 1.0.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.
- xerolith-1.0.0/LICENSE +5 -0
- xerolith-1.0.0/PKG-INFO +146 -0
- xerolith-1.0.0/README.md +121 -0
- xerolith-1.0.0/setup.cfg +4 -0
- xerolith-1.0.0/setup.py +23 -0
- xerolith-1.0.0/xerolith/__init__.py +38 -0
- xerolith-1.0.0/xerolith/agent.py +440 -0
- xerolith-1.0.0/xerolith/config.py +121 -0
- xerolith-1.0.0/xerolith/idle.py +206 -0
- xerolith-1.0.0/xerolith/kernel.py +233 -0
- xerolith-1.0.0/xerolith/llm/__init__.py +190 -0
- xerolith-1.0.0/xerolith/philosophy.py +383 -0
- xerolith-1.0.0/xerolith/subconscious.py +221 -0
- xerolith-1.0.0/xerolith/vault/__init__.py +165 -0
- xerolith-1.0.0/xerolith.egg-info/PKG-INFO +146 -0
- xerolith-1.0.0/xerolith.egg-info/SOURCES.txt +17 -0
- xerolith-1.0.0/xerolith.egg-info/dependency_links.txt +1 -0
- xerolith-1.0.0/xerolith.egg-info/requires.txt +2 -0
- xerolith-1.0.0/xerolith.egg-info/top_level.txt +1 -0
xerolith-1.0.0/LICENSE
ADDED
xerolith-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: xerolith
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Autonomous AI with persistent memory that never forgets
|
|
5
|
+
Home-page: https://github.com/xerolith-ai/xerolith
|
|
6
|
+
Author: Tyler Love
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: requests>=2.28.0
|
|
15
|
+
Requires-Dist: python-dotenv>=0.20.0
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: classifier
|
|
18
|
+
Dynamic: description
|
|
19
|
+
Dynamic: description-content-type
|
|
20
|
+
Dynamic: home-page
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
Dynamic: requires-dist
|
|
23
|
+
Dynamic: requires-python
|
|
24
|
+
Dynamic: summary
|
|
25
|
+
|
|
26
|
+
# XEROLITH
|
|
27
|
+
|
|
28
|
+
**Autonomous AI with Persistent Memory**
|
|
29
|
+
|
|
30
|
+
An LLM that never forgets. Xerolith is a lightweight, on-device intelligence framework with self-healing and philosophy synthesis.
|
|
31
|
+
|
|
32
|
+
- 🧠 **Persistent Memory** — SQLite vault stores every conversation
|
|
33
|
+
- 🎯 **Philosophy Synthesis** — Automatically learns and forms beliefs
|
|
34
|
+
- 🤖 **Autonomous Operation** — Thinks and acts when you're away
|
|
35
|
+
- 🔐 **Self-Healing** — Auto-corrects errors via stderr injection
|
|
36
|
+
- 🚀 **LLM-Agnostic** — Works with Gemini, Claude, GPT, or local models
|
|
37
|
+
- 📱 **On-Device** — No cloud dependency. Works on Android (Termux), desktop, servers
|
|
38
|
+
- 🛡️ **Patent-Protected** — Utility patent filed with USPTO
|
|
39
|
+
|
|
40
|
+
## Quick Start
|
|
41
|
+
|
|
42
|
+
### 1. Get API Key
|
|
43
|
+
Go to https://aistudio.google.com/app/apikey and create a free key.
|
|
44
|
+
|
|
45
|
+
### 2. Install
|
|
46
|
+
```bash
|
|
47
|
+
pip install xerolith
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 3. Set API Key
|
|
51
|
+
```bash
|
|
52
|
+
export GEMINI_API_KEY="your-key-here"
|
|
53
|
+
# OR
|
|
54
|
+
echo "GEMINI_API_KEY=your-key" > .env
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 4. Run
|
|
58
|
+
```python
|
|
59
|
+
from xerolith import Xerolith
|
|
60
|
+
|
|
61
|
+
xero = Xerolith(api_key="your-key")
|
|
62
|
+
response = xero.chat("Hello! Remember this.")
|
|
63
|
+
print(response)
|
|
64
|
+
xero.close()
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Or run the interactive demo:
|
|
68
|
+
```bash
|
|
69
|
+
python examples/quickstart.py
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Features
|
|
73
|
+
|
|
74
|
+
### Persistent Memory
|
|
75
|
+
All conversations stored in SQLite vault. Never loses context.
|
|
76
|
+
|
|
77
|
+
### 4D Resonance Kernel
|
|
78
|
+
Tracks state in 4 dimensions: Bedrock (intent), Vector (emotion), Gravity (priority), Resonance (time).
|
|
79
|
+
|
|
80
|
+
### Philosophy Synthesis
|
|
81
|
+
Automatically extracts lessons and synthesizes beliefs from conversations.
|
|
82
|
+
|
|
83
|
+
### Autonomous Operation
|
|
84
|
+
Background thread triggers during inactivity to synthesize beliefs and explore memories.
|
|
85
|
+
|
|
86
|
+
### 12 Integrated Tools
|
|
87
|
+
Memory search, file I/O, shell execution, kernel tuning, dream generation, and more.
|
|
88
|
+
|
|
89
|
+
## Examples
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Interactive chat
|
|
93
|
+
python examples/quickstart.py
|
|
94
|
+
|
|
95
|
+
# Game NPC (persistent characters)
|
|
96
|
+
python examples/game_npc.py
|
|
97
|
+
|
|
98
|
+
# Digital companion
|
|
99
|
+
python examples/personal_ai.py
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Mobile (Android/Termux)
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
pkg install python
|
|
106
|
+
pip install xerolith
|
|
107
|
+
echo "GEMINI_API_KEY=your-key" > .env
|
|
108
|
+
python examples/quickstart.py
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Architecture
|
|
112
|
+
|
|
113
|
+
- **Vault** — SQLite persistent memory with axis organization
|
|
114
|
+
- **Kernel** — 4D Resonance engine with soul seed
|
|
115
|
+
- **Philosophy Engine** — Thematic clustering, lesson extraction, belief synthesis
|
|
116
|
+
- **Subconscious** — Markov encoder/decoder for intuitive responses
|
|
117
|
+
- **Idle Autonomy** — Background thread for autonomous thinking
|
|
118
|
+
- **LLM Client** — Gemini API with 12 integrated tools
|
|
119
|
+
|
|
120
|
+
## Security
|
|
121
|
+
|
|
122
|
+
**API keys are NEVER hardcoded.**
|
|
123
|
+
|
|
124
|
+
Users set their own key via environment variables, .env file, or constructor parameter.
|
|
125
|
+
Keys are never logged or committed to version control.
|
|
126
|
+
|
|
127
|
+
## Patent
|
|
128
|
+
|
|
129
|
+
**Utility Patent:** "System and Method for Deterministic LLM-to-OS Bridge via Binary State Vaulting"
|
|
130
|
+
|
|
131
|
+
Filed with USPTO (~8 months ago). Can commercialize now.
|
|
132
|
+
|
|
133
|
+
## License
|
|
134
|
+
|
|
135
|
+
Dual license:
|
|
136
|
+
- **Open Source:** MIT License
|
|
137
|
+
- **Commercial:** Available for licensing
|
|
138
|
+
|
|
139
|
+
## Author
|
|
140
|
+
|
|
141
|
+
**Tyler Love** (@MuskaTat)
|
|
142
|
+
- Twitter: [@MuskaTat](https://twitter.com/MuskaTat)
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
**An AI that forgets is just a chatbot. Xerolith doesn't forget.**
|
xerolith-1.0.0/README.md
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# XEROLITH
|
|
2
|
+
|
|
3
|
+
**Autonomous AI with Persistent Memory**
|
|
4
|
+
|
|
5
|
+
An LLM that never forgets. Xerolith is a lightweight, on-device intelligence framework with self-healing and philosophy synthesis.
|
|
6
|
+
|
|
7
|
+
- 🧠 **Persistent Memory** — SQLite vault stores every conversation
|
|
8
|
+
- 🎯 **Philosophy Synthesis** — Automatically learns and forms beliefs
|
|
9
|
+
- 🤖 **Autonomous Operation** — Thinks and acts when you're away
|
|
10
|
+
- 🔐 **Self-Healing** — Auto-corrects errors via stderr injection
|
|
11
|
+
- 🚀 **LLM-Agnostic** — Works with Gemini, Claude, GPT, or local models
|
|
12
|
+
- 📱 **On-Device** — No cloud dependency. Works on Android (Termux), desktop, servers
|
|
13
|
+
- 🛡️ **Patent-Protected** — Utility patent filed with USPTO
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
### 1. Get API Key
|
|
18
|
+
Go to https://aistudio.google.com/app/apikey and create a free key.
|
|
19
|
+
|
|
20
|
+
### 2. Install
|
|
21
|
+
```bash
|
|
22
|
+
pip install xerolith
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 3. Set API Key
|
|
26
|
+
```bash
|
|
27
|
+
export GEMINI_API_KEY="your-key-here"
|
|
28
|
+
# OR
|
|
29
|
+
echo "GEMINI_API_KEY=your-key" > .env
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 4. Run
|
|
33
|
+
```python
|
|
34
|
+
from xerolith import Xerolith
|
|
35
|
+
|
|
36
|
+
xero = Xerolith(api_key="your-key")
|
|
37
|
+
response = xero.chat("Hello! Remember this.")
|
|
38
|
+
print(response)
|
|
39
|
+
xero.close()
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Or run the interactive demo:
|
|
43
|
+
```bash
|
|
44
|
+
python examples/quickstart.py
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Features
|
|
48
|
+
|
|
49
|
+
### Persistent Memory
|
|
50
|
+
All conversations stored in SQLite vault. Never loses context.
|
|
51
|
+
|
|
52
|
+
### 4D Resonance Kernel
|
|
53
|
+
Tracks state in 4 dimensions: Bedrock (intent), Vector (emotion), Gravity (priority), Resonance (time).
|
|
54
|
+
|
|
55
|
+
### Philosophy Synthesis
|
|
56
|
+
Automatically extracts lessons and synthesizes beliefs from conversations.
|
|
57
|
+
|
|
58
|
+
### Autonomous Operation
|
|
59
|
+
Background thread triggers during inactivity to synthesize beliefs and explore memories.
|
|
60
|
+
|
|
61
|
+
### 12 Integrated Tools
|
|
62
|
+
Memory search, file I/O, shell execution, kernel tuning, dream generation, and more.
|
|
63
|
+
|
|
64
|
+
## Examples
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Interactive chat
|
|
68
|
+
python examples/quickstart.py
|
|
69
|
+
|
|
70
|
+
# Game NPC (persistent characters)
|
|
71
|
+
python examples/game_npc.py
|
|
72
|
+
|
|
73
|
+
# Digital companion
|
|
74
|
+
python examples/personal_ai.py
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Mobile (Android/Termux)
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pkg install python
|
|
81
|
+
pip install xerolith
|
|
82
|
+
echo "GEMINI_API_KEY=your-key" > .env
|
|
83
|
+
python examples/quickstart.py
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Architecture
|
|
87
|
+
|
|
88
|
+
- **Vault** — SQLite persistent memory with axis organization
|
|
89
|
+
- **Kernel** — 4D Resonance engine with soul seed
|
|
90
|
+
- **Philosophy Engine** — Thematic clustering, lesson extraction, belief synthesis
|
|
91
|
+
- **Subconscious** — Markov encoder/decoder for intuitive responses
|
|
92
|
+
- **Idle Autonomy** — Background thread for autonomous thinking
|
|
93
|
+
- **LLM Client** — Gemini API with 12 integrated tools
|
|
94
|
+
|
|
95
|
+
## Security
|
|
96
|
+
|
|
97
|
+
**API keys are NEVER hardcoded.**
|
|
98
|
+
|
|
99
|
+
Users set their own key via environment variables, .env file, or constructor parameter.
|
|
100
|
+
Keys are never logged or committed to version control.
|
|
101
|
+
|
|
102
|
+
## Patent
|
|
103
|
+
|
|
104
|
+
**Utility Patent:** "System and Method for Deterministic LLM-to-OS Bridge via Binary State Vaulting"
|
|
105
|
+
|
|
106
|
+
Filed with USPTO (~8 months ago). Can commercialize now.
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
Dual license:
|
|
111
|
+
- **Open Source:** MIT License
|
|
112
|
+
- **Commercial:** Available for licensing
|
|
113
|
+
|
|
114
|
+
## Author
|
|
115
|
+
|
|
116
|
+
**Tyler Love** (@MuskaTat)
|
|
117
|
+
- Twitter: [@MuskaTat](https://twitter.com/MuskaTat)
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
**An AI that forgets is just a chatbot. Xerolith doesn't forget.**
|
xerolith-1.0.0/setup.cfg
ADDED
xerolith-1.0.0/setup.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name="xerolith",
|
|
5
|
+
version="1.0.0",
|
|
6
|
+
author="Tyler Love",
|
|
7
|
+
description="Autonomous AI with persistent memory that never forgets",
|
|
8
|
+
long_description=open("README.md").read(),
|
|
9
|
+
long_description_content_type="text/markdown",
|
|
10
|
+
url="https://github.com/xerolith-ai/xerolith",
|
|
11
|
+
packages=find_packages(),
|
|
12
|
+
classifiers=[
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"Programming Language :: Python :: 3.9",
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
],
|
|
18
|
+
python_requires=">=3.9",
|
|
19
|
+
install_requires=[
|
|
20
|
+
"requests>=2.28.0",
|
|
21
|
+
"python-dotenv>=0.20.0",
|
|
22
|
+
],
|
|
23
|
+
)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""
|
|
2
|
+
XEROLITH — Autonomous AI with Persistent Memory
|
|
3
|
+
A lightweight, on-device memory system for LLMs with self-healing and philosophy synthesis.
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
from xerolith import Xerolith
|
|
7
|
+
|
|
8
|
+
xero = Xerolith(api_key="your-key-here")
|
|
9
|
+
response = xero.chat("hello")
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
__version__ = "1.0.0"
|
|
13
|
+
__author__ = "Tyler Love (@MuskaTat)"
|
|
14
|
+
|
|
15
|
+
import os
|
|
16
|
+
import logging
|
|
17
|
+
from .config import XerolithConfig
|
|
18
|
+
from .agent import Xerolith
|
|
19
|
+
|
|
20
|
+
logging.basicConfig(level=logging.INFO)
|
|
21
|
+
logger = logging.getLogger("xerolith")
|
|
22
|
+
|
|
23
|
+
def init(api_key=None, vault_path=None, model="gemma-4-31b-it"):
|
|
24
|
+
"""
|
|
25
|
+
Initialize a Xerolith agent.
|
|
26
|
+
|
|
27
|
+
Args:
|
|
28
|
+
api_key: Gemini API key (or set GEMINI_API_KEY env var)
|
|
29
|
+
vault_path: Path to vault file (default: ~/.xerolith/vault.bin)
|
|
30
|
+
model: LLM model pool (default: gemma-4-31b-it)
|
|
31
|
+
|
|
32
|
+
Returns:
|
|
33
|
+
Xerolith agent instance
|
|
34
|
+
"""
|
|
35
|
+
config = XerolithConfig(api_key=api_key, vault_path=vault_path, model=model)
|
|
36
|
+
return Xerolith(config)
|
|
37
|
+
|
|
38
|
+
__all__ = ["Xerolith", "init", "XerolithConfig"]
|