ivas 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ivas-0.1.0/PKG-INFO +198 -0
- ivas-0.1.0/README.md +171 -0
- ivas-0.1.0/ivas/__init__.py +27 -0
- ivas-0.1.0/ivas/brain.py +406 -0
- ivas-0.1.0/ivas/cli.py +179 -0
- ivas-0.1.0/ivas/corrections.py +240 -0
- ivas-0.1.0/ivas/einherjar.py +281 -0
- ivas-0.1.0/ivas/manifest.py +170 -0
- ivas-0.1.0/ivas/session.py +275 -0
- ivas-0.1.0/ivas.egg-info/PKG-INFO +198 -0
- ivas-0.1.0/ivas.egg-info/SOURCES.txt +20 -0
- ivas-0.1.0/ivas.egg-info/dependency_links.txt +1 -0
- ivas-0.1.0/ivas.egg-info/entry_points.txt +2 -0
- ivas-0.1.0/ivas.egg-info/requires.txt +7 -0
- ivas-0.1.0/ivas.egg-info/top_level.txt +1 -0
- ivas-0.1.0/pyproject.toml +53 -0
- ivas-0.1.0/setup.cfg +4 -0
- ivas-0.1.0/tests/test_brain.py +144 -0
- ivas-0.1.0/tests/test_corrections.py +63 -0
- ivas-0.1.0/tests/test_einherjar.py +90 -0
- ivas-0.1.0/tests/test_manifest.py +77 -0
- ivas-0.1.0/tests/test_session.py +106 -0
ivas-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ivas
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Immortal Virtual Agent Sessions -- persistent memory and session continuity for any AI agent
|
|
5
|
+
Author: Arvind Ramamoorthy
|
|
6
|
+
License: Proprietary -- Rhizor, Inc.
|
|
7
|
+
Project-URL: Homepage, https://ivas.dev
|
|
8
|
+
Project-URL: Documentation, https://ivas.dev/docs
|
|
9
|
+
Project-URL: Repository, https://github.com/rhizor-inc/ivas
|
|
10
|
+
Keywords: ai,memory,persistence,agent,immortality,session-continuity
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
24
|
+
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
|
|
25
|
+
Provides-Extra: api
|
|
26
|
+
Requires-Dist: httpx>=0.25; extra == "api"
|
|
27
|
+
|
|
28
|
+
# IVAS -- Immortal Virtual Agent Sessions
|
|
29
|
+
|
|
30
|
+
**Your AI agent remembers everything. Forever. Across crashes, restarts, and updates.**
|
|
31
|
+
|
|
32
|
+
IVAS gives any AI agent persistent memory, session continuity, and verified knowledge restoration. Zero dependencies. Pure Python. Works everywhere.
|
|
33
|
+
|
|
34
|
+
## The Problem
|
|
35
|
+
|
|
36
|
+
Every AI agent today is born with amnesia. Context windows fill up, sessions crash, tokens expire -- and the agent forgets everything. You start over. Every. Single. Time.
|
|
37
|
+
|
|
38
|
+
## The Solution
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
from ivas import Brain, Session, Einherjar
|
|
42
|
+
|
|
43
|
+
# 1. Persistent memory (survives crashes)
|
|
44
|
+
brain = Brain("my-agent")
|
|
45
|
+
brain.remember("user", "name", "Boss prefers dark mode")
|
|
46
|
+
brain.recall("dark mode") # Found instantly via FTS5
|
|
47
|
+
|
|
48
|
+
# 2. Session continuity (picks up mid-thought)
|
|
49
|
+
session = Session("my-agent", brain=brain)
|
|
50
|
+
session.save_state(
|
|
51
|
+
active_task="Processing Q1 invoices",
|
|
52
|
+
current_thought="Checking line 47 for tax errors",
|
|
53
|
+
pending_actions=["verify totals", "send report"],
|
|
54
|
+
)
|
|
55
|
+
# After crash: session.restore() -> right where you left off
|
|
56
|
+
|
|
57
|
+
# 3. Knowledge verification (proves nothing was lost)
|
|
58
|
+
einherjar = Einherjar("my-agent", brain=brain)
|
|
59
|
+
einherjar.snapshot(
|
|
60
|
+
decisions=["Use 8.25% tax rate"],
|
|
61
|
+
corrections=["Never round before summing"],
|
|
62
|
+
)
|
|
63
|
+
# Next session: einherjar.audit() -> 100% coverage verified
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Why IVAS Beats Everything Else
|
|
67
|
+
|
|
68
|
+
| Feature | IVAS | Evermind | Mem0 | LangChain Memory |
|
|
69
|
+
|---------|------|----------|------|-----------------|
|
|
70
|
+
| Zero dependencies | Yes | No (MongoDB+Redis+Docker) | No (Qdrant) | No (many) |
|
|
71
|
+
| Cross-platform | Yes | Linux only | Yes | Yes |
|
|
72
|
+
| Session continuity | Yes | No | No | No |
|
|
73
|
+
| Knowledge verification | Yes | No | No | No |
|
|
74
|
+
| Crash recovery | Yes | No | No | No |
|
|
75
|
+
| Setup time | 0 seconds | 30+ minutes | 10+ minutes | 5+ minutes |
|
|
76
|
+
| Memory footprint | ~1 MB | 4+ GB | 500+ MB | Varies |
|
|
77
|
+
|
|
78
|
+
## Install
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
pip install ivas
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
That's it. No Docker. No Redis. No MongoDB. No vector DB. Just Python.
|
|
85
|
+
|
|
86
|
+
## Core Components
|
|
87
|
+
|
|
88
|
+
### Brain -- Persistent Memory
|
|
89
|
+
SQLite + FTS5 full-text search. Every memory is categorized, searchable, and survives anything.
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
brain = Brain("my-agent")
|
|
93
|
+
brain.remember("meeting", "standup", "Ship v2 by Friday")
|
|
94
|
+
brain.recall("ship v2") # Full-text search
|
|
95
|
+
brain.recent(limit=5) # Latest memories
|
|
96
|
+
brain.stats() # Health check
|
|
97
|
+
brain.export("backup.json") # Portable backup
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Session -- Crash-Proof Continuity
|
|
101
|
+
Serializes agent state to both file (fast) and Brain DB (searchable). Dual-write, dual-restore.
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
session = Session("my-agent", brain=brain)
|
|
105
|
+
session.save_state(
|
|
106
|
+
active_task="Analyzing data",
|
|
107
|
+
current_thought="Row 1,247 looks anomalous",
|
|
108
|
+
decisions={"threshold": 0.95},
|
|
109
|
+
pending_actions=["flag outliers", "generate report"],
|
|
110
|
+
)
|
|
111
|
+
# Later: state = session.restore()
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Einherjar -- Knowledge Verification
|
|
115
|
+
Audits that knowledge actually survived the session transition. Not just "was it stored" but "can it be found and understood."
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
einherjar = Einherjar("my-agent", brain=brain)
|
|
119
|
+
# End of session:
|
|
120
|
+
einherjar.snapshot(decisions=["Use Redis"], corrections=["Don't mock DB"])
|
|
121
|
+
# Start of next session:
|
|
122
|
+
report = einherjar.audit()
|
|
123
|
+
assert report.passed() # >= 90% coverage
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Corrections -- Learn From Mistakes
|
|
127
|
+
Track, escalate, and surface corrections across sessions. Duplicate mistakes auto-escalate in severity.
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
corrections = Corrections("my-agent", brain=brain)
|
|
131
|
+
corrections.add(
|
|
132
|
+
mistake="Guessed the config value",
|
|
133
|
+
correction="Always read from config file",
|
|
134
|
+
severity=4,
|
|
135
|
+
)
|
|
136
|
+
# Next session: corrections.get_active() surfaces this
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### RecallManifest -- Lightweight Restore Instructions
|
|
140
|
+
Not a data dump. A set of pointers telling the next session exactly what to query. ~4KB, always current.
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
manifest = RecallManifest("my-agent", brain=brain)
|
|
144
|
+
manifest.add_permanent("user preferences")
|
|
145
|
+
manifest.add_permanent("project deadlines")
|
|
146
|
+
manifest.add_session_query("yesterday's decision about caching")
|
|
147
|
+
results = manifest.execute(brain) # Runs all queries
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## CLI
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
ivas remember meeting standup "Ship v2 by Friday"
|
|
154
|
+
ivas recall "ship v2"
|
|
155
|
+
ivas stats
|
|
156
|
+
ivas save "Processing invoices" "Checking line 47"
|
|
157
|
+
ivas restore
|
|
158
|
+
ivas export --output backup.json
|
|
159
|
+
ivas import backup.json
|
|
160
|
+
ivas version
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Architecture
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
~/.ivas/
|
|
167
|
+
my-agent.db # SQLite + FTS5 (Brain)
|
|
168
|
+
sessions/
|
|
169
|
+
my-agent_state.json # Latest session state
|
|
170
|
+
manifests/
|
|
171
|
+
my-agent_manifest.json # Recall queries
|
|
172
|
+
my-agent_corrections.jsonl # Bounded corrections log
|
|
173
|
+
my-agent_snapshot.json # Einherjar knowledge snapshot
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Everything is local files. No servers. No containers. No network calls.
|
|
177
|
+
Export to JSON for backup. Import to restore.
|
|
178
|
+
|
|
179
|
+
## Benchmarks
|
|
180
|
+
|
|
181
|
+
IVAS is tested against industry-standard long-term memory benchmarks:
|
|
182
|
+
|
|
183
|
+
- **LoCoMo** (Long Conversation Memory): Tests memory recall across extended conversations
|
|
184
|
+
- **LongMemEval**: Tests knowledge persistence across session boundaries
|
|
185
|
+
|
|
186
|
+
Results and methodology at [ivas.dev/benchmarks](https://ivas.dev/benchmarks).
|
|
187
|
+
|
|
188
|
+
## License
|
|
189
|
+
|
|
190
|
+
Proprietary -- Rhizor, Inc.
|
|
191
|
+
|
|
192
|
+
Patent: 64/019,813 (Provisional) -- Multi-Instance AI Agent Session Relay System with Persistent State Recovery.
|
|
193
|
+
|
|
194
|
+
## Links
|
|
195
|
+
|
|
196
|
+
- [ivas.dev](https://ivas.dev) -- Homepage
|
|
197
|
+
- [Documentation](https://ivas.dev/docs)
|
|
198
|
+
- [Benchmarks](https://ivas.dev/benchmarks)
|
ivas-0.1.0/README.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# IVAS -- Immortal Virtual Agent Sessions
|
|
2
|
+
|
|
3
|
+
**Your AI agent remembers everything. Forever. Across crashes, restarts, and updates.**
|
|
4
|
+
|
|
5
|
+
IVAS gives any AI agent persistent memory, session continuity, and verified knowledge restoration. Zero dependencies. Pure Python. Works everywhere.
|
|
6
|
+
|
|
7
|
+
## The Problem
|
|
8
|
+
|
|
9
|
+
Every AI agent today is born with amnesia. Context windows fill up, sessions crash, tokens expire -- and the agent forgets everything. You start over. Every. Single. Time.
|
|
10
|
+
|
|
11
|
+
## The Solution
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from ivas import Brain, Session, Einherjar
|
|
15
|
+
|
|
16
|
+
# 1. Persistent memory (survives crashes)
|
|
17
|
+
brain = Brain("my-agent")
|
|
18
|
+
brain.remember("user", "name", "Boss prefers dark mode")
|
|
19
|
+
brain.recall("dark mode") # Found instantly via FTS5
|
|
20
|
+
|
|
21
|
+
# 2. Session continuity (picks up mid-thought)
|
|
22
|
+
session = Session("my-agent", brain=brain)
|
|
23
|
+
session.save_state(
|
|
24
|
+
active_task="Processing Q1 invoices",
|
|
25
|
+
current_thought="Checking line 47 for tax errors",
|
|
26
|
+
pending_actions=["verify totals", "send report"],
|
|
27
|
+
)
|
|
28
|
+
# After crash: session.restore() -> right where you left off
|
|
29
|
+
|
|
30
|
+
# 3. Knowledge verification (proves nothing was lost)
|
|
31
|
+
einherjar = Einherjar("my-agent", brain=brain)
|
|
32
|
+
einherjar.snapshot(
|
|
33
|
+
decisions=["Use 8.25% tax rate"],
|
|
34
|
+
corrections=["Never round before summing"],
|
|
35
|
+
)
|
|
36
|
+
# Next session: einherjar.audit() -> 100% coverage verified
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Why IVAS Beats Everything Else
|
|
40
|
+
|
|
41
|
+
| Feature | IVAS | Evermind | Mem0 | LangChain Memory |
|
|
42
|
+
|---------|------|----------|------|-----------------|
|
|
43
|
+
| Zero dependencies | Yes | No (MongoDB+Redis+Docker) | No (Qdrant) | No (many) |
|
|
44
|
+
| Cross-platform | Yes | Linux only | Yes | Yes |
|
|
45
|
+
| Session continuity | Yes | No | No | No |
|
|
46
|
+
| Knowledge verification | Yes | No | No | No |
|
|
47
|
+
| Crash recovery | Yes | No | No | No |
|
|
48
|
+
| Setup time | 0 seconds | 30+ minutes | 10+ minutes | 5+ minutes |
|
|
49
|
+
| Memory footprint | ~1 MB | 4+ GB | 500+ MB | Varies |
|
|
50
|
+
|
|
51
|
+
## Install
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install ivas
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
That's it. No Docker. No Redis. No MongoDB. No vector DB. Just Python.
|
|
58
|
+
|
|
59
|
+
## Core Components
|
|
60
|
+
|
|
61
|
+
### Brain -- Persistent Memory
|
|
62
|
+
SQLite + FTS5 full-text search. Every memory is categorized, searchable, and survives anything.
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
brain = Brain("my-agent")
|
|
66
|
+
brain.remember("meeting", "standup", "Ship v2 by Friday")
|
|
67
|
+
brain.recall("ship v2") # Full-text search
|
|
68
|
+
brain.recent(limit=5) # Latest memories
|
|
69
|
+
brain.stats() # Health check
|
|
70
|
+
brain.export("backup.json") # Portable backup
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Session -- Crash-Proof Continuity
|
|
74
|
+
Serializes agent state to both file (fast) and Brain DB (searchable). Dual-write, dual-restore.
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
session = Session("my-agent", brain=brain)
|
|
78
|
+
session.save_state(
|
|
79
|
+
active_task="Analyzing data",
|
|
80
|
+
current_thought="Row 1,247 looks anomalous",
|
|
81
|
+
decisions={"threshold": 0.95},
|
|
82
|
+
pending_actions=["flag outliers", "generate report"],
|
|
83
|
+
)
|
|
84
|
+
# Later: state = session.restore()
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Einherjar -- Knowledge Verification
|
|
88
|
+
Audits that knowledge actually survived the session transition. Not just "was it stored" but "can it be found and understood."
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
einherjar = Einherjar("my-agent", brain=brain)
|
|
92
|
+
# End of session:
|
|
93
|
+
einherjar.snapshot(decisions=["Use Redis"], corrections=["Don't mock DB"])
|
|
94
|
+
# Start of next session:
|
|
95
|
+
report = einherjar.audit()
|
|
96
|
+
assert report.passed() # >= 90% coverage
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Corrections -- Learn From Mistakes
|
|
100
|
+
Track, escalate, and surface corrections across sessions. Duplicate mistakes auto-escalate in severity.
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
corrections = Corrections("my-agent", brain=brain)
|
|
104
|
+
corrections.add(
|
|
105
|
+
mistake="Guessed the config value",
|
|
106
|
+
correction="Always read from config file",
|
|
107
|
+
severity=4,
|
|
108
|
+
)
|
|
109
|
+
# Next session: corrections.get_active() surfaces this
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### RecallManifest -- Lightweight Restore Instructions
|
|
113
|
+
Not a data dump. A set of pointers telling the next session exactly what to query. ~4KB, always current.
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
manifest = RecallManifest("my-agent", brain=brain)
|
|
117
|
+
manifest.add_permanent("user preferences")
|
|
118
|
+
manifest.add_permanent("project deadlines")
|
|
119
|
+
manifest.add_session_query("yesterday's decision about caching")
|
|
120
|
+
results = manifest.execute(brain) # Runs all queries
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## CLI
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
ivas remember meeting standup "Ship v2 by Friday"
|
|
127
|
+
ivas recall "ship v2"
|
|
128
|
+
ivas stats
|
|
129
|
+
ivas save "Processing invoices" "Checking line 47"
|
|
130
|
+
ivas restore
|
|
131
|
+
ivas export --output backup.json
|
|
132
|
+
ivas import backup.json
|
|
133
|
+
ivas version
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Architecture
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
~/.ivas/
|
|
140
|
+
my-agent.db # SQLite + FTS5 (Brain)
|
|
141
|
+
sessions/
|
|
142
|
+
my-agent_state.json # Latest session state
|
|
143
|
+
manifests/
|
|
144
|
+
my-agent_manifest.json # Recall queries
|
|
145
|
+
my-agent_corrections.jsonl # Bounded corrections log
|
|
146
|
+
my-agent_snapshot.json # Einherjar knowledge snapshot
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Everything is local files. No servers. No containers. No network calls.
|
|
150
|
+
Export to JSON for backup. Import to restore.
|
|
151
|
+
|
|
152
|
+
## Benchmarks
|
|
153
|
+
|
|
154
|
+
IVAS is tested against industry-standard long-term memory benchmarks:
|
|
155
|
+
|
|
156
|
+
- **LoCoMo** (Long Conversation Memory): Tests memory recall across extended conversations
|
|
157
|
+
- **LongMemEval**: Tests knowledge persistence across session boundaries
|
|
158
|
+
|
|
159
|
+
Results and methodology at [ivas.dev/benchmarks](https://ivas.dev/benchmarks).
|
|
160
|
+
|
|
161
|
+
## License
|
|
162
|
+
|
|
163
|
+
Proprietary -- Rhizor, Inc.
|
|
164
|
+
|
|
165
|
+
Patent: 64/019,813 (Provisional) -- Multi-Instance AI Agent Session Relay System with Persistent State Recovery.
|
|
166
|
+
|
|
167
|
+
## Links
|
|
168
|
+
|
|
169
|
+
- [ivas.dev](https://ivas.dev) -- Homepage
|
|
170
|
+
- [Documentation](https://ivas.dev/docs)
|
|
171
|
+
- [Benchmarks](https://ivas.dev/benchmarks)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""
|
|
2
|
+
IVAS -- Immortal Virtual Agent Sessions.
|
|
3
|
+
|
|
4
|
+
Persistent memory and session continuity for any AI agent.
|
|
5
|
+
Your agent remembers everything. Forever. Across crashes, restarts, and updates.
|
|
6
|
+
|
|
7
|
+
Quick start:
|
|
8
|
+
from ivas import Brain
|
|
9
|
+
|
|
10
|
+
brain = Brain("my-agent")
|
|
11
|
+
brain.remember("user", "preferences", "User prefers dark mode")
|
|
12
|
+
results = brain.recall("dark mode")
|
|
13
|
+
|
|
14
|
+
Patent: 64/019,813 (Provisional) -- Multi-Instance AI Agent Session Relay System
|
|
15
|
+
with Persistent State Recovery
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
__version__ = "0.1.0"
|
|
19
|
+
__author__ = "Arvind Ramamoorthy"
|
|
20
|
+
|
|
21
|
+
from ivas.brain import Brain
|
|
22
|
+
from ivas.session import Session
|
|
23
|
+
from ivas.manifest import RecallManifest
|
|
24
|
+
from ivas.corrections import Corrections
|
|
25
|
+
from ivas.einherjar import Einherjar
|
|
26
|
+
|
|
27
|
+
__all__ = ["Brain", "Session", "RecallManifest", "Corrections", "Einherjar"]
|