synapse-layer 2.3.1__tar.gz → 2.4.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.
- synapse_layer-2.4.0/LICENSE +17 -0
- synapse_layer-2.4.0/PKG-INFO +255 -0
- synapse_layer-2.4.0/README.md +229 -0
- {synapse_layer-2.3.1 → synapse_layer-2.4.0}/pyproject.toml +3 -2
- {synapse_layer-2.3.1 → synapse_layer-2.4.0}/synapse_layer/__init__.py +3 -1
- {synapse_layer-2.3.1 → synapse_layer-2.4.0}/synapse_layer/a2a_client.py +1 -1
- synapse_layer-2.4.0/synapse_layer/client.py +217 -0
- synapse_layer-2.4.0/synapse_layer.egg-info/PKG-INFO +255 -0
- {synapse_layer-2.3.1 → synapse_layer-2.4.0}/synapse_layer.egg-info/SOURCES.txt +2 -0
- {synapse_layer-2.3.1 → synapse_layer-2.4.0}/synapse_layer.egg-info/requires.txt +1 -0
- synapse_layer-2.3.1/PKG-INFO +0 -688
- synapse_layer-2.3.1/README.md +0 -665
- synapse_layer-2.3.1/synapse_layer.egg-info/PKG-INFO +0 -688
- {synapse_layer-2.3.1 → synapse_layer-2.4.0}/setup.cfg +0 -0
- {synapse_layer-2.3.1 → synapse_layer-2.4.0}/synapse_layer/crewai_tools.py +0 -0
- {synapse_layer-2.3.1 → synapse_layer-2.4.0}/synapse_layer/langchain_memory.py +0 -0
- {synapse_layer-2.3.1 → synapse_layer-2.4.0}/synapse_layer/plugins/__init__.py +0 -0
- {synapse_layer-2.3.1 → synapse_layer-2.4.0}/synapse_layer/plugins/base.py +0 -0
- {synapse_layer-2.3.1 → synapse_layer-2.4.0}/synapse_layer/plugins/medical_resolver.py +0 -0
- {synapse_layer-2.3.1 → synapse_layer-2.4.0}/synapse_layer.egg-info/dependency_links.txt +0 -0
- {synapse_layer-2.3.1 → synapse_layer-2.4.0}/synapse_layer.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Copyright 2026 Synapse Layer
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: synapse-layer
|
|
3
|
+
Version: 2.4.0
|
|
4
|
+
Summary: Python SDK for Synapse Layer — persistent, encrypted, cross-agent memory for AI agents.
|
|
5
|
+
Author-email: Synapse Layer <founder.synapselayer@proton.me>
|
|
6
|
+
Project-URL: Homepage, https://synapselayer.org
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/SynapseLayer/synapse-sdk-python/issues
|
|
8
|
+
Project-URL: Documentation, https://synapselayer.org/docs
|
|
9
|
+
Project-URL: Repository, https://github.com/SynapseLayer/synapse-sdk-python
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Requires-Python: >=3.9
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: requests>=2.25.0
|
|
19
|
+
Requires-Dist: pydantic>=2.0.0
|
|
20
|
+
Requires-Dist: aiohttp>=3.8.0
|
|
21
|
+
Provides-Extra: langchain
|
|
22
|
+
Requires-Dist: langchain-core>=0.1.0; extra == "langchain"
|
|
23
|
+
Provides-Extra: crewai
|
|
24
|
+
Requires-Dist: crewai>=0.1.0; extra == "crewai"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# Synapse Layer
|
|
28
|
+
|
|
29
|
+
[](https://pypi.org/project/synapse-layer/)
|
|
30
|
+
[](https://modelcontextprotocol.io/)
|
|
31
|
+
[](https://github.com/SynapseLayer/synapse-sdk-python)
|
|
32
|
+
[](https://github.com/SynapseLayer/synapse-sdk-python)
|
|
33
|
+
[](./LICENSE)
|
|
34
|
+
[](https://github.com/SynapseLayer/synapse-sdk-python)
|
|
35
|
+
|
|
36
|
+
> **RAG retrieves. Synapse remembers.**
|
|
37
|
+
|
|
38
|
+
Persistent memory infrastructure for AI agents — encrypted, governed, and cross-agent.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## ⚡ 30-Second Quickstart
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install synapse-layer
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from synapse_layer import Synapse
|
|
50
|
+
|
|
51
|
+
s = Synapse(token="sk_connect_YOUR_TOKEN")
|
|
52
|
+
|
|
53
|
+
s.save("user likes coffee")
|
|
54
|
+
print(s.recall("what does user like?"))
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Get your token at [forge.synapselayer.org](https://forge.synapselayer.org) → Dashboard → Connect
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Why Synapse?
|
|
62
|
+
|
|
63
|
+
Superpowers proved agents need discipline. Synapse provides the **continuity layer** that makes that discipline persistent across sessions, tools, and handoffs.
|
|
64
|
+
|
|
65
|
+
### Key Capabilities
|
|
66
|
+
|
|
67
|
+
| Capability | Description |
|
|
68
|
+
|---|---|
|
|
69
|
+
| **State Continuity** | OAuth for AI Memory. Persistent context across sessions and models. |
|
|
70
|
+
| **Privacy First** | Server never sees plaintext. AES-256-GCM encrypted at rest with per-operation random IV. |
|
|
71
|
+
| **Agent-Native** | 30-second install. Built for the MCP ecosystem. |
|
|
72
|
+
| **Cross-Agent** | Share memory between agents via A2A protocol. |
|
|
73
|
+
| **Trust Quotient** | Weighted memory ranking: confidence, recency, and usage. |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Install
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install synapse-layer
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Optional Integrations
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pip install synapse-layer[langchain]
|
|
87
|
+
pip install synapse-layer[crewai]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Quick Start
|
|
93
|
+
|
|
94
|
+
### Core Client (always available)
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
from synapse_layer import SynapseA2AClient
|
|
98
|
+
|
|
99
|
+
async with SynapseA2AClient(api_key="your-key") as client:
|
|
100
|
+
# Store a memory
|
|
101
|
+
await client.store_memory(
|
|
102
|
+
user_id="agent-001",
|
|
103
|
+
content="User prefers dark mode and Portuguese.",
|
|
104
|
+
source_type="user_input",
|
|
105
|
+
confidence=0.95
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
# Recall memories
|
|
109
|
+
result = await client.recall_memory(
|
|
110
|
+
user_id="agent-001",
|
|
111
|
+
query="What are the user preferences?",
|
|
112
|
+
limit=10
|
|
113
|
+
)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### LangChain Adapter (requires `langchain-core`)
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
from synapse_layer import SynapseMemory
|
|
120
|
+
|
|
121
|
+
memory = SynapseMemory(
|
|
122
|
+
api_key="your-key",
|
|
123
|
+
user_id="agent-001",
|
|
124
|
+
input_key="input",
|
|
125
|
+
memory_key="history"
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
# Use with any LangChain agent
|
|
129
|
+
variables = await memory.load_memory_variables({"input": "What do I know?"})
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### CrewAI Tools (requires `crewai`)
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
from synapse_layer import SynapseStoreMemoryTool, SynapseRecallMemoryTool
|
|
136
|
+
|
|
137
|
+
store_tool = SynapseStoreMemoryTool(api_key="your-key")
|
|
138
|
+
recall_tool = SynapseRecallMemoryTool(api_key="your-key")
|
|
139
|
+
|
|
140
|
+
# Use as CrewAI tools in your agents
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Architecture
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
┌───────────────────────────────────────────────────────────┐
|
|
149
|
+
│ YOUR AGENT │
|
|
150
|
+
│ (Claude, GPT-4o, Gemini, etc.) │
|
|
151
|
+
└─────────────────────────────┬─────────────────────────────┘
|
|
152
|
+
│
|
|
153
|
+
┌─────────┴─────────┐
|
|
154
|
+
│ synapse-layer │
|
|
155
|
+
│ Python SDK │
|
|
156
|
+
└─────────┬─────────┘
|
|
157
|
+
│
|
|
158
|
+
┌─────────────┴─────────────┐
|
|
159
|
+
│ SYNAPSE LAYER VAULT │
|
|
160
|
+
│ │
|
|
161
|
+
│ ✓ AES-256-GCM encrypted │
|
|
162
|
+
│ ✓ Server-side at rest │
|
|
163
|
+
│ ✓ Per-operation random IV │
|
|
164
|
+
│ ✓ Trust Quotient scoring │
|
|
165
|
+
└─────────────┬─────────────┘
|
|
166
|
+
│
|
|
167
|
+
┌───────┴───────┐
|
|
168
|
+
│ │
|
|
169
|
+
▼ ▼
|
|
170
|
+
┌────────────┐ ┌────────────┐
|
|
171
|
+
│ Session 2 │ │ Session 3 │
|
|
172
|
+
│ (GPT-4o) │ │ (Gemini) │
|
|
173
|
+
│ recalls ✓ │ │ recalls ✓ │
|
|
174
|
+
└────────────┘ └────────────┘
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Security Model
|
|
180
|
+
|
|
181
|
+
| Layer | Implementation |
|
|
182
|
+
|---|---|
|
|
183
|
+
| **Encryption** | AES-256-GCM with per-operation random IV. GCM auth tag validated on every read. |
|
|
184
|
+
| **Key Management** | Keys rotated per environment. Never logged. |
|
|
185
|
+
| **Privacy** | Differential privacy via Gaussian noise on embeddings. |
|
|
186
|
+
| **Validation** | Intent validation pipeline with confidence scoring. |
|
|
187
|
+
|
|
188
|
+
> Server never sees plaintext. All sensitive data is AES-256-GCM encrypted at rest with per-operation random IV. Designed for LGPD/GDPR alignment.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## API Reference
|
|
193
|
+
|
|
194
|
+
### `SynapseA2AClient`
|
|
195
|
+
|
|
196
|
+
Core async client for the Synapse Layer A2A protocol (JSON-RPC 2.0 over HTTPS).
|
|
197
|
+
|
|
198
|
+
| Method | Description |
|
|
199
|
+
|---|---|
|
|
200
|
+
| `store_memory()` | Store encrypted memory with semantic embedding |
|
|
201
|
+
| `recall_memory()` | Retrieve memories ranked by Trust Quotient |
|
|
202
|
+
| `create_handover()` | Create signed context for cross-agent transfer |
|
|
203
|
+
| `forget_memory()` | Soft-delete specific memories |
|
|
204
|
+
|
|
205
|
+
### `SynapseMemory` *(requires langchain-core)*
|
|
206
|
+
|
|
207
|
+
LangChain `BaseMemory` adapter for persistent agent memory.
|
|
208
|
+
|
|
209
|
+
### `SynapseChatHistory` *(requires langchain-core)*
|
|
210
|
+
|
|
211
|
+
LangChain `BaseChatMessageHistory` for persistent chat histories.
|
|
212
|
+
|
|
213
|
+
### CrewAI Tools *(requires crewai)*
|
|
214
|
+
|
|
215
|
+
- `SynapseStoreMemoryTool` — Store memories
|
|
216
|
+
- `SynapseRecallMemoryTool` — Recall memories
|
|
217
|
+
- `SynapseHandoverTool` — Cross-agent context transfer
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Trust Quotient (TQ)
|
|
222
|
+
|
|
223
|
+
Memories are ranked using a weighted scoring formula:
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
TQ = f(confidence, recency, usage)
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Higher TQ scores surface the most relevant and reliable memories first. The exact weights are proprietary and dynamically calibrated.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Links
|
|
234
|
+
|
|
235
|
+
- **Website**: [synapselayer.org](https://synapselayer.org)
|
|
236
|
+
- **Forge (Dashboard)**: [forge.synapselayer.org](https://forge.synapselayer.org)
|
|
237
|
+
- **Documentation**: [synapselayer.org/docs](https://synapselayer.org/docs)
|
|
238
|
+
- **Issues**: [GitHub Issues](https://github.com/SynapseLayer/synapse-sdk-python/issues)
|
|
239
|
+
- **MCP Server**: [Smithery](https://smithery.ai/server/@nicholasmarchi/synapse-layer)
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## License
|
|
244
|
+
|
|
245
|
+
Apache 2.0 — see [LICENSE](./LICENSE) for details.
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
<p align="center">
|
|
250
|
+
<strong>Synapse Layer</strong><br>
|
|
251
|
+
Persistent memory infrastructure for AI agents.<br><br>
|
|
252
|
+
<a href="https://pypi.org/project/synapse-layer/">PyPI</a> ·
|
|
253
|
+
<a href="https://synapselayer.org">Website</a> ·
|
|
254
|
+
<a href="https://forge.synapselayer.org">Forge</a>
|
|
255
|
+
</p>
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# Synapse Layer
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/synapse-layer/)
|
|
4
|
+
[](https://modelcontextprotocol.io/)
|
|
5
|
+
[](https://github.com/SynapseLayer/synapse-sdk-python)
|
|
6
|
+
[](https://github.com/SynapseLayer/synapse-sdk-python)
|
|
7
|
+
[](./LICENSE)
|
|
8
|
+
[](https://github.com/SynapseLayer/synapse-sdk-python)
|
|
9
|
+
|
|
10
|
+
> **RAG retrieves. Synapse remembers.**
|
|
11
|
+
|
|
12
|
+
Persistent memory infrastructure for AI agents — encrypted, governed, and cross-agent.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## ⚡ 30-Second Quickstart
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install synapse-layer
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
from synapse_layer import Synapse
|
|
24
|
+
|
|
25
|
+
s = Synapse(token="sk_connect_YOUR_TOKEN")
|
|
26
|
+
|
|
27
|
+
s.save("user likes coffee")
|
|
28
|
+
print(s.recall("what does user like?"))
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Get your token at [forge.synapselayer.org](https://forge.synapselayer.org) → Dashboard → Connect
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Why Synapse?
|
|
36
|
+
|
|
37
|
+
Superpowers proved agents need discipline. Synapse provides the **continuity layer** that makes that discipline persistent across sessions, tools, and handoffs.
|
|
38
|
+
|
|
39
|
+
### Key Capabilities
|
|
40
|
+
|
|
41
|
+
| Capability | Description |
|
|
42
|
+
|---|---|
|
|
43
|
+
| **State Continuity** | OAuth for AI Memory. Persistent context across sessions and models. |
|
|
44
|
+
| **Privacy First** | Server never sees plaintext. AES-256-GCM encrypted at rest with per-operation random IV. |
|
|
45
|
+
| **Agent-Native** | 30-second install. Built for the MCP ecosystem. |
|
|
46
|
+
| **Cross-Agent** | Share memory between agents via A2A protocol. |
|
|
47
|
+
| **Trust Quotient** | Weighted memory ranking: confidence, recency, and usage. |
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Install
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install synapse-layer
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Optional Integrations
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pip install synapse-layer[langchain]
|
|
61
|
+
pip install synapse-layer[crewai]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Quick Start
|
|
67
|
+
|
|
68
|
+
### Core Client (always available)
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
from synapse_layer import SynapseA2AClient
|
|
72
|
+
|
|
73
|
+
async with SynapseA2AClient(api_key="your-key") as client:
|
|
74
|
+
# Store a memory
|
|
75
|
+
await client.store_memory(
|
|
76
|
+
user_id="agent-001",
|
|
77
|
+
content="User prefers dark mode and Portuguese.",
|
|
78
|
+
source_type="user_input",
|
|
79
|
+
confidence=0.95
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
# Recall memories
|
|
83
|
+
result = await client.recall_memory(
|
|
84
|
+
user_id="agent-001",
|
|
85
|
+
query="What are the user preferences?",
|
|
86
|
+
limit=10
|
|
87
|
+
)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### LangChain Adapter (requires `langchain-core`)
|
|
91
|
+
|
|
92
|
+
```python
|
|
93
|
+
from synapse_layer import SynapseMemory
|
|
94
|
+
|
|
95
|
+
memory = SynapseMemory(
|
|
96
|
+
api_key="your-key",
|
|
97
|
+
user_id="agent-001",
|
|
98
|
+
input_key="input",
|
|
99
|
+
memory_key="history"
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
# Use with any LangChain agent
|
|
103
|
+
variables = await memory.load_memory_variables({"input": "What do I know?"})
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### CrewAI Tools (requires `crewai`)
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
from synapse_layer import SynapseStoreMemoryTool, SynapseRecallMemoryTool
|
|
110
|
+
|
|
111
|
+
store_tool = SynapseStoreMemoryTool(api_key="your-key")
|
|
112
|
+
recall_tool = SynapseRecallMemoryTool(api_key="your-key")
|
|
113
|
+
|
|
114
|
+
# Use as CrewAI tools in your agents
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Architecture
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
┌───────────────────────────────────────────────────────────┐
|
|
123
|
+
│ YOUR AGENT │
|
|
124
|
+
│ (Claude, GPT-4o, Gemini, etc.) │
|
|
125
|
+
└─────────────────────────────┬─────────────────────────────┘
|
|
126
|
+
│
|
|
127
|
+
┌─────────┴─────────┐
|
|
128
|
+
│ synapse-layer │
|
|
129
|
+
│ Python SDK │
|
|
130
|
+
└─────────┬─────────┘
|
|
131
|
+
│
|
|
132
|
+
┌─────────────┴─────────────┐
|
|
133
|
+
│ SYNAPSE LAYER VAULT │
|
|
134
|
+
│ │
|
|
135
|
+
│ ✓ AES-256-GCM encrypted │
|
|
136
|
+
│ ✓ Server-side at rest │
|
|
137
|
+
│ ✓ Per-operation random IV │
|
|
138
|
+
│ ✓ Trust Quotient scoring │
|
|
139
|
+
└─────────────┬─────────────┘
|
|
140
|
+
│
|
|
141
|
+
┌───────┴───────┐
|
|
142
|
+
│ │
|
|
143
|
+
▼ ▼
|
|
144
|
+
┌────────────┐ ┌────────────┐
|
|
145
|
+
│ Session 2 │ │ Session 3 │
|
|
146
|
+
│ (GPT-4o) │ │ (Gemini) │
|
|
147
|
+
│ recalls ✓ │ │ recalls ✓ │
|
|
148
|
+
└────────────┘ └────────────┘
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Security Model
|
|
154
|
+
|
|
155
|
+
| Layer | Implementation |
|
|
156
|
+
|---|---|
|
|
157
|
+
| **Encryption** | AES-256-GCM with per-operation random IV. GCM auth tag validated on every read. |
|
|
158
|
+
| **Key Management** | Keys rotated per environment. Never logged. |
|
|
159
|
+
| **Privacy** | Differential privacy via Gaussian noise on embeddings. |
|
|
160
|
+
| **Validation** | Intent validation pipeline with confidence scoring. |
|
|
161
|
+
|
|
162
|
+
> Server never sees plaintext. All sensitive data is AES-256-GCM encrypted at rest with per-operation random IV. Designed for LGPD/GDPR alignment.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## API Reference
|
|
167
|
+
|
|
168
|
+
### `SynapseA2AClient`
|
|
169
|
+
|
|
170
|
+
Core async client for the Synapse Layer A2A protocol (JSON-RPC 2.0 over HTTPS).
|
|
171
|
+
|
|
172
|
+
| Method | Description |
|
|
173
|
+
|---|---|
|
|
174
|
+
| `store_memory()` | Store encrypted memory with semantic embedding |
|
|
175
|
+
| `recall_memory()` | Retrieve memories ranked by Trust Quotient |
|
|
176
|
+
| `create_handover()` | Create signed context for cross-agent transfer |
|
|
177
|
+
| `forget_memory()` | Soft-delete specific memories |
|
|
178
|
+
|
|
179
|
+
### `SynapseMemory` *(requires langchain-core)*
|
|
180
|
+
|
|
181
|
+
LangChain `BaseMemory` adapter for persistent agent memory.
|
|
182
|
+
|
|
183
|
+
### `SynapseChatHistory` *(requires langchain-core)*
|
|
184
|
+
|
|
185
|
+
LangChain `BaseChatMessageHistory` for persistent chat histories.
|
|
186
|
+
|
|
187
|
+
### CrewAI Tools *(requires crewai)*
|
|
188
|
+
|
|
189
|
+
- `SynapseStoreMemoryTool` — Store memories
|
|
190
|
+
- `SynapseRecallMemoryTool` — Recall memories
|
|
191
|
+
- `SynapseHandoverTool` — Cross-agent context transfer
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Trust Quotient (TQ)
|
|
196
|
+
|
|
197
|
+
Memories are ranked using a weighted scoring formula:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
TQ = f(confidence, recency, usage)
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Higher TQ scores surface the most relevant and reliable memories first. The exact weights are proprietary and dynamically calibrated.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Links
|
|
208
|
+
|
|
209
|
+
- **Website**: [synapselayer.org](https://synapselayer.org)
|
|
210
|
+
- **Forge (Dashboard)**: [forge.synapselayer.org](https://forge.synapselayer.org)
|
|
211
|
+
- **Documentation**: [synapselayer.org/docs](https://synapselayer.org/docs)
|
|
212
|
+
- **Issues**: [GitHub Issues](https://github.com/SynapseLayer/synapse-sdk-python/issues)
|
|
213
|
+
- **MCP Server**: [Smithery](https://smithery.ai/server/@nicholasmarchi/synapse-layer)
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## License
|
|
218
|
+
|
|
219
|
+
Apache 2.0 — see [LICENSE](./LICENSE) for details.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
<p align="center">
|
|
224
|
+
<strong>Synapse Layer</strong><br>
|
|
225
|
+
Persistent memory infrastructure for AI agents.<br><br>
|
|
226
|
+
<a href="https://pypi.org/project/synapse-layer/">PyPI</a> ·
|
|
227
|
+
<a href="https://synapselayer.org">Website</a> ·
|
|
228
|
+
<a href="https://forge.synapselayer.org">Forge</a>
|
|
229
|
+
</p>
|
|
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "synapse-layer"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.4.0"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Synapse Layer", email="founder.synapselayer@proton.me" },
|
|
10
10
|
]
|
|
11
|
-
description = "
|
|
11
|
+
description = "Python SDK for Synapse Layer — persistent, encrypted, cross-agent memory for AI agents."
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
requires-python = ">=3.9"
|
|
14
14
|
classifiers = [
|
|
@@ -21,6 +21,7 @@ classifiers = [
|
|
|
21
21
|
dependencies = [
|
|
22
22
|
"requests>=2.25.0",
|
|
23
23
|
"pydantic>=2.0.0",
|
|
24
|
+
"aiohttp>=3.8.0",
|
|
24
25
|
]
|
|
25
26
|
|
|
26
27
|
[project.optional-dependencies]
|
|
@@ -14,10 +14,11 @@ CrewAI tools (requires crewai):
|
|
|
14
14
|
from synapse_layer import SynapseStoreMemoryTool, SynapseRecallMemoryTool
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
|
-
__version__ = "2.
|
|
17
|
+
__version__ = "2.4.0"
|
|
18
18
|
|
|
19
19
|
# Core — always importable, zero optional deps
|
|
20
20
|
from .a2a_client import SynapseA2AClient
|
|
21
|
+
from .client import Synapse
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
# ---------------------------------------------------------------------------
|
|
@@ -60,6 +61,7 @@ __all__ = [
|
|
|
60
61
|
"__version__",
|
|
61
62
|
# Core
|
|
62
63
|
"SynapseA2AClient",
|
|
64
|
+
"Synapse",
|
|
63
65
|
# LangChain (lazy)
|
|
64
66
|
"SynapseMemory",
|
|
65
67
|
"SynapseChatHistory",
|