mnemopay 1.0.0b1__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.
- mnemopay-1.0.0b1/PKG-INFO +71 -0
- mnemopay-1.0.0b1/README.md +43 -0
- mnemopay-1.0.0b1/mnemopay/__init__.py +135 -0
- mnemopay-1.0.0b1/mnemopay/anomaly.py +503 -0
- mnemopay-1.0.0b1/mnemopay/behavioral.py +644 -0
- mnemopay-1.0.0b1/mnemopay/core.py +679 -0
- mnemopay-1.0.0b1/mnemopay/fico.py +498 -0
- mnemopay-1.0.0b1/mnemopay/integrity.py +394 -0
- mnemopay-1.0.0b1/mnemopay/types.py +477 -0
- mnemopay-1.0.0b1/mnemopay.egg-info/PKG-INFO +71 -0
- mnemopay-1.0.0b1/mnemopay.egg-info/SOURCES.txt +19 -0
- mnemopay-1.0.0b1/mnemopay.egg-info/dependency_links.txt +1 -0
- mnemopay-1.0.0b1/mnemopay.egg-info/requires.txt +4 -0
- mnemopay-1.0.0b1/mnemopay.egg-info/top_level.txt +1 -0
- mnemopay-1.0.0b1/pyproject.toml +55 -0
- mnemopay-1.0.0b1/setup.cfg +4 -0
- mnemopay-1.0.0b1/tests/test_anomaly.py +495 -0
- mnemopay-1.0.0b1/tests/test_behavioral.py +588 -0
- mnemopay-1.0.0b1/tests/test_core.py +743 -0
- mnemopay-1.0.0b1/tests/test_fico.py +472 -0
- mnemopay-1.0.0b1/tests/test_integrity.py +367 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mnemopay
|
|
3
|
+
Version: 1.0.0b1
|
|
4
|
+
Summary: Memory + Wallet for AI Agents. Give any agent persistent memory and micropayment capabilities.
|
|
5
|
+
Author-email: Jerry Omiagbo <jerry@mnemopay.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://mnemopay.com
|
|
8
|
+
Project-URL: Repository, https://github.com/mnemopay/mnemopay-python
|
|
9
|
+
Project-URL: Documentation, https://mnemopay.com/docs/python
|
|
10
|
+
Keywords: ai,agents,memory,payments,fico,behavioral-finance,anomaly-detection
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Requires-Python: >=3.9
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
27
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
28
|
+
|
|
29
|
+
# MnemoPay Python SDK
|
|
30
|
+
|
|
31
|
+
Memory + Wallet for AI Agents. Give any agent persistent memory and micropayment capabilities in 5 lines.
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
from mnemopay import MnemoPay
|
|
35
|
+
|
|
36
|
+
agent = MnemoPay("my-agent")
|
|
37
|
+
agent.remember("user prefers Python")
|
|
38
|
+
tx = agent.charge(10.00, "API call")
|
|
39
|
+
agent.settle(tx.id)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install mnemopay
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Features
|
|
49
|
+
|
|
50
|
+
- **Cognitive Memory**: Ebbinghaus decay, Hebbian reinforcement, auto-scoring
|
|
51
|
+
- **Micropayments**: Escrow-based charges with volume-tiered fees (1.9% / 1.5% / 1.0%)
|
|
52
|
+
- **Agent FICO**: Credit scoring (300-850) adapted for AI agents
|
|
53
|
+
- **Behavioral Finance**: Prospect theory, cooling-off periods, regret prediction
|
|
54
|
+
- **Merkle Integrity**: SHA-256 tamper detection for agent memory
|
|
55
|
+
- **Anomaly Detection**: EWMA streaming detector, behavioral fingerprinting, canary honeypots
|
|
56
|
+
- **Zero Dependencies**: stdlib only (hashlib, math, uuid, datetime, json, dataclasses)
|
|
57
|
+
- **Python 3.9+**: Full type hints, dataclasses, modern Python idioms
|
|
58
|
+
|
|
59
|
+
## Modules
|
|
60
|
+
|
|
61
|
+
| Module | Class | Description |
|
|
62
|
+
|--------|-------|-------------|
|
|
63
|
+
| `mnemopay.core` | `MnemoPay` | Memory + payments + reputation |
|
|
64
|
+
| `mnemopay.fico` | `AgentFICO` | Credit scoring (300-850) |
|
|
65
|
+
| `mnemopay.behavioral` | `BehavioralEngine` | Behavioral finance tools |
|
|
66
|
+
| `mnemopay.integrity` | `MerkleTree` | SHA-256 tamper detection |
|
|
67
|
+
| `mnemopay.anomaly` | `EWMADetector`, `BehaviorMonitor`, `CanarySystem` | Anomaly detection |
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# MnemoPay Python SDK
|
|
2
|
+
|
|
3
|
+
Memory + Wallet for AI Agents. Give any agent persistent memory and micropayment capabilities in 5 lines.
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
from mnemopay import MnemoPay
|
|
7
|
+
|
|
8
|
+
agent = MnemoPay("my-agent")
|
|
9
|
+
agent.remember("user prefers Python")
|
|
10
|
+
tx = agent.charge(10.00, "API call")
|
|
11
|
+
agent.settle(tx.id)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install mnemopay
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Features
|
|
21
|
+
|
|
22
|
+
- **Cognitive Memory**: Ebbinghaus decay, Hebbian reinforcement, auto-scoring
|
|
23
|
+
- **Micropayments**: Escrow-based charges with volume-tiered fees (1.9% / 1.5% / 1.0%)
|
|
24
|
+
- **Agent FICO**: Credit scoring (300-850) adapted for AI agents
|
|
25
|
+
- **Behavioral Finance**: Prospect theory, cooling-off periods, regret prediction
|
|
26
|
+
- **Merkle Integrity**: SHA-256 tamper detection for agent memory
|
|
27
|
+
- **Anomaly Detection**: EWMA streaming detector, behavioral fingerprinting, canary honeypots
|
|
28
|
+
- **Zero Dependencies**: stdlib only (hashlib, math, uuid, datetime, json, dataclasses)
|
|
29
|
+
- **Python 3.9+**: Full type hints, dataclasses, modern Python idioms
|
|
30
|
+
|
|
31
|
+
## Modules
|
|
32
|
+
|
|
33
|
+
| Module | Class | Description |
|
|
34
|
+
|--------|-------|-------------|
|
|
35
|
+
| `mnemopay.core` | `MnemoPay` | Memory + payments + reputation |
|
|
36
|
+
| `mnemopay.fico` | `AgentFICO` | Credit scoring (300-850) |
|
|
37
|
+
| `mnemopay.behavioral` | `BehavioralEngine` | Behavioral finance tools |
|
|
38
|
+
| `mnemopay.integrity` | `MerkleTree` | SHA-256 tamper detection |
|
|
39
|
+
| `mnemopay.anomaly` | `EWMADetector`, `BehaviorMonitor`, `CanarySystem` | Anomaly detection |
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
|
|
43
|
+
MIT
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"""
|
|
2
|
+
MnemoPay Python SDK -- Memory + Wallet for AI Agents
|
|
3
|
+
|
|
4
|
+
Give any AI agent memory and a wallet in 5 lines:
|
|
5
|
+
|
|
6
|
+
from mnemopay import MnemoPay
|
|
7
|
+
|
|
8
|
+
agent = MnemoPay("my-agent")
|
|
9
|
+
agent.remember("user prefers Python")
|
|
10
|
+
tx = agent.charge(10.00, "API call")
|
|
11
|
+
agent.settle(tx.id)
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from .core import MnemoPay, auto_score, compute_score
|
|
15
|
+
from .fico import AgentFICO
|
|
16
|
+
from .behavioral import BehavioralEngine
|
|
17
|
+
from .integrity import MerkleTree
|
|
18
|
+
from .anomaly import EWMADetector, BehaviorMonitor, CanarySystem
|
|
19
|
+
from .types import (
|
|
20
|
+
# Core types
|
|
21
|
+
Memory,
|
|
22
|
+
Transaction,
|
|
23
|
+
TransactionStatus,
|
|
24
|
+
BalanceInfo,
|
|
25
|
+
AgentProfile,
|
|
26
|
+
Dispute,
|
|
27
|
+
AuditEntry,
|
|
28
|
+
ReputationReport,
|
|
29
|
+
ReputationTier,
|
|
30
|
+
# FICO types
|
|
31
|
+
FICOConfig,
|
|
32
|
+
FICOInput,
|
|
33
|
+
FICOTransaction,
|
|
34
|
+
FICOResult,
|
|
35
|
+
FICOComponent,
|
|
36
|
+
FICORating,
|
|
37
|
+
TrustLevel,
|
|
38
|
+
# Behavioral types
|
|
39
|
+
BehavioralConfig,
|
|
40
|
+
ProspectValue,
|
|
41
|
+
CoolingOffResult,
|
|
42
|
+
CommitmentResult,
|
|
43
|
+
LossFrame,
|
|
44
|
+
ReframedExpense,
|
|
45
|
+
RegretEntry,
|
|
46
|
+
RegretPrediction,
|
|
47
|
+
TradeEntry,
|
|
48
|
+
OverconfidenceResult,
|
|
49
|
+
AssetMetrics,
|
|
50
|
+
HerdAlert,
|
|
51
|
+
FinancialGoal,
|
|
52
|
+
EndowedProgress,
|
|
53
|
+
RiskLevel,
|
|
54
|
+
HerdSeverity,
|
|
55
|
+
# Integrity types
|
|
56
|
+
MerkleLeaf,
|
|
57
|
+
MerkleProof,
|
|
58
|
+
MerkleProofStep,
|
|
59
|
+
IntegritySnapshot,
|
|
60
|
+
TamperResult,
|
|
61
|
+
# Anomaly types
|
|
62
|
+
AnomalyConfig,
|
|
63
|
+
EWMAState,
|
|
64
|
+
EWMAAlert,
|
|
65
|
+
AlertSeverity,
|
|
66
|
+
BehaviorFingerprint,
|
|
67
|
+
HijackDetection,
|
|
68
|
+
HijackSeverity,
|
|
69
|
+
CanaryTransaction,
|
|
70
|
+
CanaryAlert,
|
|
71
|
+
CanaryType,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
__version__ = "1.0.0b1"
|
|
75
|
+
__all__ = [
|
|
76
|
+
# Core
|
|
77
|
+
"MnemoPay",
|
|
78
|
+
"auto_score",
|
|
79
|
+
"compute_score",
|
|
80
|
+
# Modules
|
|
81
|
+
"AgentFICO",
|
|
82
|
+
"BehavioralEngine",
|
|
83
|
+
"MerkleTree",
|
|
84
|
+
"EWMADetector",
|
|
85
|
+
"BehaviorMonitor",
|
|
86
|
+
"CanarySystem",
|
|
87
|
+
# Types
|
|
88
|
+
"Memory",
|
|
89
|
+
"Transaction",
|
|
90
|
+
"TransactionStatus",
|
|
91
|
+
"BalanceInfo",
|
|
92
|
+
"AgentProfile",
|
|
93
|
+
"Dispute",
|
|
94
|
+
"AuditEntry",
|
|
95
|
+
"ReputationReport",
|
|
96
|
+
"ReputationTier",
|
|
97
|
+
"FICOConfig",
|
|
98
|
+
"FICOInput",
|
|
99
|
+
"FICOTransaction",
|
|
100
|
+
"FICOResult",
|
|
101
|
+
"FICOComponent",
|
|
102
|
+
"FICORating",
|
|
103
|
+
"TrustLevel",
|
|
104
|
+
"BehavioralConfig",
|
|
105
|
+
"ProspectValue",
|
|
106
|
+
"CoolingOffResult",
|
|
107
|
+
"CommitmentResult",
|
|
108
|
+
"LossFrame",
|
|
109
|
+
"ReframedExpense",
|
|
110
|
+
"RegretEntry",
|
|
111
|
+
"RegretPrediction",
|
|
112
|
+
"TradeEntry",
|
|
113
|
+
"OverconfidenceResult",
|
|
114
|
+
"AssetMetrics",
|
|
115
|
+
"HerdAlert",
|
|
116
|
+
"FinancialGoal",
|
|
117
|
+
"EndowedProgress",
|
|
118
|
+
"RiskLevel",
|
|
119
|
+
"HerdSeverity",
|
|
120
|
+
"MerkleLeaf",
|
|
121
|
+
"MerkleProof",
|
|
122
|
+
"MerkleProofStep",
|
|
123
|
+
"IntegritySnapshot",
|
|
124
|
+
"TamperResult",
|
|
125
|
+
"AnomalyConfig",
|
|
126
|
+
"EWMAState",
|
|
127
|
+
"EWMAAlert",
|
|
128
|
+
"AlertSeverity",
|
|
129
|
+
"BehaviorFingerprint",
|
|
130
|
+
"HijackDetection",
|
|
131
|
+
"HijackSeverity",
|
|
132
|
+
"CanaryTransaction",
|
|
133
|
+
"CanaryAlert",
|
|
134
|
+
"CanaryType",
|
|
135
|
+
]
|