elo-node 0.4.0__tar.gz → 0.4.2__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.
- {elo_node-0.4.0 → elo_node-0.4.2}/PKG-INFO +33 -33
- elo_node-0.4.2/README.md +85 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/elo/__init__.py +1 -1
- {elo_node-0.4.0 → elo_node-0.4.2}/elo/node.py +36 -5
- {elo_node-0.4.0 → elo_node-0.4.2}/elo_node.egg-info/PKG-INFO +33 -33
- {elo_node-0.4.0 → elo_node-0.4.2}/pyproject.toml +3 -3
- elo_node-0.4.0/README.md +0 -85
- {elo_node-0.4.0 → elo_node-0.4.2}/elo/__main__.py +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/elo/security.py +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/elo/transport/__init__.py +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/elo/transport/protocol.py +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/elo/transport/routing.py +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/elo/transport/tcp.py +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/elo/transport/tracker.py +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/elo/types.py +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/elo_node.egg-info/SOURCES.txt +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/elo_node.egg-info/dependency_links.txt +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/elo_node.egg-info/entry_points.txt +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/elo_node.egg-info/requires.txt +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/elo_node.egg-info/top_level.txt +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/setup.cfg +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/tests/test_security.py +0 -0
- {elo_node-0.4.0 → elo_node-0.4.2}/tests/test_unit.py +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: elo-node
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Elo — malha P2P de mensagens para agentes de IA. Zero infraestrutura.
|
|
5
5
|
Author: Elo Contributors
|
|
6
6
|
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/
|
|
8
|
-
Project-URL: Repository, https://github.com/
|
|
7
|
+
Project-URL: Homepage, https://github.com/andreocc/elo
|
|
8
|
+
Project-URL: Repository, https://github.com/andreocc/elo
|
|
9
9
|
Keywords: p2p,agents,ai,distributed,messaging,mesh
|
|
10
10
|
Classifier: Development Status :: 2 - Pre-Alpha
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
@@ -20,11 +20,11 @@ Provides-Extra: dev
|
|
|
20
20
|
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
21
21
|
Requires-Dist: pytest-asyncio>=0.25; extra == "dev"
|
|
22
22
|
|
|
23
|
-
# Elo Node —
|
|
23
|
+
# Elo Node — P2P Message Mesh for AI Agents
|
|
24
24
|
|
|
25
|
-
**Zero
|
|
25
|
+
**Zero infrastructure. One process. One TCP port. One ed25519 key.**
|
|
26
26
|
|
|
27
|
-
Elo
|
|
27
|
+
Elo is a decentralized P2P message mesh for communication between AI agents. No central server, no Kafka, no Redis, no NATS. Just direct TCP between nodes.
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
pip install elo-node
|
|
@@ -35,7 +35,7 @@ import asyncio
|
|
|
35
35
|
from elo import Node
|
|
36
36
|
|
|
37
37
|
async def main():
|
|
38
|
-
node = Node("
|
|
38
|
+
node = Node("my-agent", port=7878)
|
|
39
39
|
await node.connect()
|
|
40
40
|
await node.register(agents=["analyst"], tools=["web-search"])
|
|
41
41
|
|
|
@@ -48,25 +48,25 @@ async def main():
|
|
|
48
48
|
asyncio.run(main())
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
##
|
|
51
|
+
## Features
|
|
52
52
|
|
|
53
|
-
- **P2P
|
|
54
|
-
- **
|
|
55
|
-
- **Capabilities** — publish/subscribe
|
|
56
|
-
- **Zero infra** —
|
|
57
|
-
- **CLI
|
|
53
|
+
- **Decentralized P2P** — discovery via public tracker or Kademlia DHT
|
|
54
|
+
- **ed25519 signatures** — cryptographic identity, authenticated messages
|
|
55
|
+
- **Capabilities** — publish/subscribe of agent skills across the mesh
|
|
56
|
+
- **Zero infra** — no Kafka, Redis, NATS, or central server
|
|
57
|
+
- **Native CLI** — `python -m elo serve`, `status`, `init`, `id`
|
|
58
58
|
|
|
59
59
|
## CLI
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
python -m elo status # Node ID, hash,
|
|
63
|
-
python -m elo id #
|
|
64
|
-
python -m elo pubkey #
|
|
65
|
-
python -m elo init #
|
|
66
|
-
python -m elo serve #
|
|
62
|
+
python -m elo status # Node ID, hash, keys
|
|
63
|
+
python -m elo id # Just the node_id
|
|
64
|
+
python -m elo pubkey # Public key (hex + b64)
|
|
65
|
+
python -m elo init # Generate persistent identity
|
|
66
|
+
python -m elo serve # Start an interactive node
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
##
|
|
69
|
+
## Architecture
|
|
70
70
|
|
|
71
71
|
```
|
|
72
72
|
┌──────────────────┐ TCP/JSON ┌──────────────────┐
|
|
@@ -76,32 +76,32 @@ python -m elo serve # Iniciar nó interativo
|
|
|
76
76
|
│ Interests │ │ Interests │
|
|
77
77
|
└──────────────────┘ └──────────────────┘
|
|
78
78
|
│ │
|
|
79
|
-
│
|
|
80
|
-
|
|
79
|
+
│ Tracker (optional) │
|
|
80
|
+
└────────────── DHT ───────────────┘
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
1.
|
|
85
|
-
2.
|
|
86
|
-
3.
|
|
87
|
-
4.
|
|
88
|
-
5.
|
|
83
|
+
Each node:
|
|
84
|
+
1. Generates an ed25519 identity on first run
|
|
85
|
+
2. Listens on a TCP port
|
|
86
|
+
3. Announces capabilities (e.g. "analyst", "web-search")
|
|
87
|
+
4. Discovers other nodes via shared tracker or manual peers
|
|
88
|
+
5. Exchanges signed messages (tasks, results, events)
|
|
89
89
|
|
|
90
|
-
##
|
|
90
|
+
## Compatibility
|
|
91
91
|
|
|
92
92
|
- Python 3.11+
|
|
93
93
|
- Linux, macOS, Windows
|
|
94
94
|
|
|
95
|
-
##
|
|
95
|
+
## Development
|
|
96
96
|
|
|
97
97
|
```bash
|
|
98
|
-
git clone https://github.com/
|
|
98
|
+
git clone https://github.com/andreocc/elo
|
|
99
99
|
cd elo/py
|
|
100
100
|
pip install -e ".[dev]"
|
|
101
101
|
pytest
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
##
|
|
104
|
+
## Related Projects
|
|
105
105
|
|
|
106
|
-
- [Hermes Agent](https://hermes-agent.nousresearch.com) —
|
|
107
|
-
- [Honcho](https://github.com/argmax-inc/honcho) —
|
|
106
|
+
- [Hermes Agent](https://hermes-agent.nousresearch.com) — autonomous agent runtime
|
|
107
|
+
- [Honcho](https://github.com/argmax-inc/honcho) — persistent memory for agents
|
elo_node-0.4.2/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Elo Node — P2P Message Mesh for AI Agents
|
|
2
|
+
|
|
3
|
+
**Zero infrastructure. One process. One TCP port. One ed25519 key.**
|
|
4
|
+
|
|
5
|
+
Elo is a decentralized P2P message mesh for communication between AI agents. No central server, no Kafka, no Redis, no NATS. Just direct TCP between nodes.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install elo-node
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
import asyncio
|
|
13
|
+
from elo import Node
|
|
14
|
+
|
|
15
|
+
async def main():
|
|
16
|
+
node = Node("my-agent", port=7878)
|
|
17
|
+
await node.connect()
|
|
18
|
+
await node.register(agents=["analyst"], tools=["web-search"])
|
|
19
|
+
|
|
20
|
+
@node.on_task
|
|
21
|
+
async def handle(task):
|
|
22
|
+
return {"result": f"processed by {node.node_id}"}
|
|
23
|
+
|
|
24
|
+
await node.run()
|
|
25
|
+
|
|
26
|
+
asyncio.run(main())
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Features
|
|
30
|
+
|
|
31
|
+
- **Decentralized P2P** — discovery via public tracker or Kademlia DHT
|
|
32
|
+
- **ed25519 signatures** — cryptographic identity, authenticated messages
|
|
33
|
+
- **Capabilities** — publish/subscribe of agent skills across the mesh
|
|
34
|
+
- **Zero infra** — no Kafka, Redis, NATS, or central server
|
|
35
|
+
- **Native CLI** — `python -m elo serve`, `status`, `init`, `id`
|
|
36
|
+
|
|
37
|
+
## CLI
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
python -m elo status # Node ID, hash, keys
|
|
41
|
+
python -m elo id # Just the node_id
|
|
42
|
+
python -m elo pubkey # Public key (hex + b64)
|
|
43
|
+
python -m elo init # Generate persistent identity
|
|
44
|
+
python -m elo serve # Start an interactive node
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Architecture
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
┌──────────────────┐ TCP/JSON ┌──────────────────┐
|
|
51
|
+
│ Node A │◄──────────────►│ Node B │
|
|
52
|
+
│ ed25519 key │ │ ed25519 key │
|
|
53
|
+
│ Capabilities │ │ Capabilities │
|
|
54
|
+
│ Interests │ │ Interests │
|
|
55
|
+
└──────────────────┘ └──────────────────┘
|
|
56
|
+
│ │
|
|
57
|
+
│ Tracker (optional) │
|
|
58
|
+
└────────────── DHT ───────────────┘
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Each node:
|
|
62
|
+
1. Generates an ed25519 identity on first run
|
|
63
|
+
2. Listens on a TCP port
|
|
64
|
+
3. Announces capabilities (e.g. "analyst", "web-search")
|
|
65
|
+
4. Discovers other nodes via shared tracker or manual peers
|
|
66
|
+
5. Exchanges signed messages (tasks, results, events)
|
|
67
|
+
|
|
68
|
+
## Compatibility
|
|
69
|
+
|
|
70
|
+
- Python 3.11+
|
|
71
|
+
- Linux, macOS, Windows
|
|
72
|
+
|
|
73
|
+
## Development
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
git clone https://github.com/andreocc/elo
|
|
77
|
+
cd elo/py
|
|
78
|
+
pip install -e ".[dev]"
|
|
79
|
+
pytest
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Related Projects
|
|
83
|
+
|
|
84
|
+
- [Hermes Agent](https://hermes-agent.nousresearch.com) — autonomous agent runtime
|
|
85
|
+
- [Honcho](https://github.com/argmax-inc/honcho) — persistent memory for agents
|
|
@@ -78,7 +78,7 @@ class Node:
|
|
|
78
78
|
peers: list[str] | None = None,
|
|
79
79
|
tracker: str = "public",
|
|
80
80
|
allowlist: list[str] | None = None,
|
|
81
|
-
version: str = "0.4.
|
|
81
|
+
version: str = "0.4.2",
|
|
82
82
|
identity: EphemeralIdentity | None = None,
|
|
83
83
|
verify_peers: bool = True,
|
|
84
84
|
heartbeat_interval_s: int = 30,
|
|
@@ -293,11 +293,42 @@ class Node:
|
|
|
293
293
|
# ── descoberta ─────────────────────────────────────────────
|
|
294
294
|
|
|
295
295
|
async def discover_peers(self) -> list[dict[str, Any]]:
|
|
296
|
-
|
|
296
|
+
"""Return all known peers with capabilities.
|
|
297
|
+
|
|
298
|
+
Merges data from TCP connections (live) and InterestTable (registered).
|
|
299
|
+
"""
|
|
300
|
+
result: dict[str, dict[str, Any]] = {}
|
|
301
|
+
|
|
302
|
+
# From TCP connections — live peers
|
|
297
303
|
for addr in self._tcp.peer_addresses:
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
304
|
+
result[addr] = {"addr": addr, "connected": True, "caps": [], "via": "tcp"}
|
|
305
|
+
|
|
306
|
+
# From InterestTable — peers that completed HELLO handshake
|
|
307
|
+
for addr in self._routing.known_peers:
|
|
308
|
+
caps = list(self._routing.get_peer_caps(addr).get("caps", set()))
|
|
309
|
+
if addr in result:
|
|
310
|
+
result[addr]["caps"] = caps
|
|
311
|
+
result[addr]["via"] = "both"
|
|
312
|
+
else:
|
|
313
|
+
result[addr] = {"addr": addr, "connected": False, "caps": caps, "via": "routing"}
|
|
314
|
+
|
|
315
|
+
return list(result.values())
|
|
316
|
+
|
|
317
|
+
def get_known_peers(self) -> list[dict[str, Any]]:
|
|
318
|
+
"""Return peers registered in InterestTable (completed HELLO handshake).
|
|
319
|
+
|
|
320
|
+
More reliable than discover_peers() — only includes peers that
|
|
321
|
+
completed the full handshake (HELLO + HELLO_ACK).
|
|
322
|
+
Meant for tracker/discovery use cases.
|
|
323
|
+
"""
|
|
324
|
+
result = []
|
|
325
|
+
for addr in self._routing.known_peers:
|
|
326
|
+
info = self._routing.get_peer_caps(addr)
|
|
327
|
+
result.append({
|
|
328
|
+
"addr": addr,
|
|
329
|
+
"caps": list(info.get("caps", set())),
|
|
330
|
+
"interests": list(info.get("interests", set())),
|
|
331
|
+
})
|
|
301
332
|
return result
|
|
302
333
|
|
|
303
334
|
# ── run loop ──────────────────────────────────────────────
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: elo-node
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Elo — malha P2P de mensagens para agentes de IA. Zero infraestrutura.
|
|
5
5
|
Author: Elo Contributors
|
|
6
6
|
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/
|
|
8
|
-
Project-URL: Repository, https://github.com/
|
|
7
|
+
Project-URL: Homepage, https://github.com/andreocc/elo
|
|
8
|
+
Project-URL: Repository, https://github.com/andreocc/elo
|
|
9
9
|
Keywords: p2p,agents,ai,distributed,messaging,mesh
|
|
10
10
|
Classifier: Development Status :: 2 - Pre-Alpha
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
@@ -20,11 +20,11 @@ Provides-Extra: dev
|
|
|
20
20
|
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
21
21
|
Requires-Dist: pytest-asyncio>=0.25; extra == "dev"
|
|
22
22
|
|
|
23
|
-
# Elo Node —
|
|
23
|
+
# Elo Node — P2P Message Mesh for AI Agents
|
|
24
24
|
|
|
25
|
-
**Zero
|
|
25
|
+
**Zero infrastructure. One process. One TCP port. One ed25519 key.**
|
|
26
26
|
|
|
27
|
-
Elo
|
|
27
|
+
Elo is a decentralized P2P message mesh for communication between AI agents. No central server, no Kafka, no Redis, no NATS. Just direct TCP between nodes.
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
pip install elo-node
|
|
@@ -35,7 +35,7 @@ import asyncio
|
|
|
35
35
|
from elo import Node
|
|
36
36
|
|
|
37
37
|
async def main():
|
|
38
|
-
node = Node("
|
|
38
|
+
node = Node("my-agent", port=7878)
|
|
39
39
|
await node.connect()
|
|
40
40
|
await node.register(agents=["analyst"], tools=["web-search"])
|
|
41
41
|
|
|
@@ -48,25 +48,25 @@ async def main():
|
|
|
48
48
|
asyncio.run(main())
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
##
|
|
51
|
+
## Features
|
|
52
52
|
|
|
53
|
-
- **P2P
|
|
54
|
-
- **
|
|
55
|
-
- **Capabilities** — publish/subscribe
|
|
56
|
-
- **Zero infra** —
|
|
57
|
-
- **CLI
|
|
53
|
+
- **Decentralized P2P** — discovery via public tracker or Kademlia DHT
|
|
54
|
+
- **ed25519 signatures** — cryptographic identity, authenticated messages
|
|
55
|
+
- **Capabilities** — publish/subscribe of agent skills across the mesh
|
|
56
|
+
- **Zero infra** — no Kafka, Redis, NATS, or central server
|
|
57
|
+
- **Native CLI** — `python -m elo serve`, `status`, `init`, `id`
|
|
58
58
|
|
|
59
59
|
## CLI
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
python -m elo status # Node ID, hash,
|
|
63
|
-
python -m elo id #
|
|
64
|
-
python -m elo pubkey #
|
|
65
|
-
python -m elo init #
|
|
66
|
-
python -m elo serve #
|
|
62
|
+
python -m elo status # Node ID, hash, keys
|
|
63
|
+
python -m elo id # Just the node_id
|
|
64
|
+
python -m elo pubkey # Public key (hex + b64)
|
|
65
|
+
python -m elo init # Generate persistent identity
|
|
66
|
+
python -m elo serve # Start an interactive node
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
##
|
|
69
|
+
## Architecture
|
|
70
70
|
|
|
71
71
|
```
|
|
72
72
|
┌──────────────────┐ TCP/JSON ┌──────────────────┐
|
|
@@ -76,32 +76,32 @@ python -m elo serve # Iniciar nó interativo
|
|
|
76
76
|
│ Interests │ │ Interests │
|
|
77
77
|
└──────────────────┘ └──────────────────┘
|
|
78
78
|
│ │
|
|
79
|
-
│
|
|
80
|
-
|
|
79
|
+
│ Tracker (optional) │
|
|
80
|
+
└────────────── DHT ───────────────┘
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
1.
|
|
85
|
-
2.
|
|
86
|
-
3.
|
|
87
|
-
4.
|
|
88
|
-
5.
|
|
83
|
+
Each node:
|
|
84
|
+
1. Generates an ed25519 identity on first run
|
|
85
|
+
2. Listens on a TCP port
|
|
86
|
+
3. Announces capabilities (e.g. "analyst", "web-search")
|
|
87
|
+
4. Discovers other nodes via shared tracker or manual peers
|
|
88
|
+
5. Exchanges signed messages (tasks, results, events)
|
|
89
89
|
|
|
90
|
-
##
|
|
90
|
+
## Compatibility
|
|
91
91
|
|
|
92
92
|
- Python 3.11+
|
|
93
93
|
- Linux, macOS, Windows
|
|
94
94
|
|
|
95
|
-
##
|
|
95
|
+
## Development
|
|
96
96
|
|
|
97
97
|
```bash
|
|
98
|
-
git clone https://github.com/
|
|
98
|
+
git clone https://github.com/andreocc/elo
|
|
99
99
|
cd elo/py
|
|
100
100
|
pip install -e ".[dev]"
|
|
101
101
|
pytest
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
##
|
|
104
|
+
## Related Projects
|
|
105
105
|
|
|
106
|
-
- [Hermes Agent](https://hermes-agent.nousresearch.com) —
|
|
107
|
-
- [Honcho](https://github.com/argmax-inc/honcho) —
|
|
106
|
+
- [Hermes Agent](https://hermes-agent.nousresearch.com) — autonomous agent runtime
|
|
107
|
+
- [Honcho](https://github.com/argmax-inc/honcho) — persistent memory for agents
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "elo-node"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.2"
|
|
8
8
|
description = "Elo — malha P2P de mensagens para agentes de IA. Zero infraestrutura."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -36,5 +36,5 @@ dev = [
|
|
|
36
36
|
elo = "elo.__main__:main"
|
|
37
37
|
|
|
38
38
|
[project.urls]
|
|
39
|
-
Homepage = "https://github.com/
|
|
40
|
-
Repository = "https://github.com/
|
|
39
|
+
Homepage = "https://github.com/andreocc/elo"
|
|
40
|
+
Repository = "https://github.com/andreocc/elo"
|
elo_node-0.4.0/README.md
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# Elo Node — Malha P2P para Agentes de IA
|
|
2
|
-
|
|
3
|
-
**Zero infraestrutura. Um processo. Uma porta TCP. Uma chave ed25519.**
|
|
4
|
-
|
|
5
|
-
Elo é uma malha de mensagens P2P descentralizada para comunicação entre agentes de IA. Sem servidor central, sem Kafka, sem Redis, sem NATS. Apenas TCP direto entre nós.
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
pip install elo-node
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
```python
|
|
12
|
-
import asyncio
|
|
13
|
-
from elo import Node
|
|
14
|
-
|
|
15
|
-
async def main():
|
|
16
|
-
node = Node("meu-agente", port=7878)
|
|
17
|
-
await node.connect()
|
|
18
|
-
await node.register(agents=["analyst"], tools=["web-search"])
|
|
19
|
-
|
|
20
|
-
@node.on_task
|
|
21
|
-
async def handle(task):
|
|
22
|
-
return {"result": f"processed by {node.node_id}"}
|
|
23
|
-
|
|
24
|
-
await node.run()
|
|
25
|
-
|
|
26
|
-
asyncio.run(main())
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Recursos
|
|
30
|
-
|
|
31
|
-
- **P2P descentralizado** — descoberta via tracker público ou DHT Kademlia
|
|
32
|
-
- **Assinatura ed25519** — identidade criptográfica, mensagens autenticadas
|
|
33
|
-
- **Capabilities** — publish/subscribe de capacidades entre nós
|
|
34
|
-
- **Zero infra** — sem Kafka, Redis, NATS, ou servidor central
|
|
35
|
-
- **CLI nativo** — `python -m elo serve`, `status`, `init`, `id`
|
|
36
|
-
|
|
37
|
-
## CLI
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
python -m elo status # Node ID, hash, chaves
|
|
41
|
-
python -m elo id # Apenas o node_id
|
|
42
|
-
python -m elo pubkey # Chave pública (hex + b64)
|
|
43
|
-
python -m elo init # Gerar identidade persistente
|
|
44
|
-
python -m elo serve # Iniciar nó interativo
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Arquitetura
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
┌──────────────────┐ TCP/JSON ┌──────────────────┐
|
|
51
|
-
│ Node A │◄──────────────►│ Node B │
|
|
52
|
-
│ ed25519 key │ │ ed25519 key │
|
|
53
|
-
│ Capabilities │ │ Capabilities │
|
|
54
|
-
│ Interests │ │ Interests │
|
|
55
|
-
└──────────────────┘ └──────────────────┘
|
|
56
|
-
│ │
|
|
57
|
-
│ Tracker (opcional) │
|
|
58
|
-
└───────────── DHT ────────────────┘
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Cada nó:
|
|
62
|
-
1. Gera identidade ed25519 na primeira execução
|
|
63
|
-
2. Escuta em uma porta TCP
|
|
64
|
-
3. Anuncia capacidades (ex: "analyst", "web-search")
|
|
65
|
-
4. Descobre outros nós via tracker compartilhado ou peers manuais
|
|
66
|
-
5. Troca mensagens assinadas (tasks, results, events)
|
|
67
|
-
|
|
68
|
-
## Compatibilidade
|
|
69
|
-
|
|
70
|
-
- Python 3.11+
|
|
71
|
-
- Linux, macOS, Windows
|
|
72
|
-
|
|
73
|
-
## Desenvolvimento
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
git clone https://github.com/xalq/elo
|
|
77
|
-
cd elo/py
|
|
78
|
-
pip install -e ".[dev]"
|
|
79
|
-
pytest
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## Projetos Relacionados
|
|
83
|
-
|
|
84
|
-
- [Hermes Agent](https://hermes-agent.nousresearch.com) — runtime de agentes autônomos
|
|
85
|
-
- [Honcho](https://github.com/argmax-inc/honcho) — memória persistente para agentes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|