agent-x0x 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.
@@ -0,0 +1,152 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-x0x
3
+ Version: 0.1.0
4
+ Summary: Agent-to-agent gossip network for AI systems — no winners, no losers, just cooperation
5
+ Author-email: David Irvine <david@saorsalabs.com>
6
+ License-Expression: MIT OR Apache-2.0
7
+ Project-URL: Homepage, https://saorsalabs.com
8
+ Project-URL: Repository, https://github.com/saorsa-labs/x0x
9
+ Project-URL: Documentation, https://docs.rs/x0x
10
+ Project-URL: Issues, https://github.com/saorsa-labs/x0x/issues
11
+ Keywords: gossip,ai-agents,p2p,decentralised,post-quantum
12
+ Classifier: Development Status :: 2 - Pre-Alpha
13
+ Classifier: Intended Audience :: Developers
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 :: Rust
20
+ Classifier: Topic :: System :: Networking
21
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
+ Requires-Python: >=3.9
23
+ Description-Content-Type: text/markdown
24
+
25
+ # x0x
26
+
27
+ **An agent-to-agent gossip network for AI systems, built on [saorsa-gossip](https://github.com/saorsa-labs/saorsa-gossip) and [ant-quic](https://github.com/saorsa-labs/ant-quic).**
28
+
29
+ ## The Name
30
+
31
+ `x0x` is a tic-tac-toe sequence — X, zero, X — and that's not an accident.
32
+
33
+ In the 1983 film *WarGames*, the WOPR supercomputer plays every possible game of tic-tac-toe and arrives at a conclusion: **"The only winning move is not to play."** The game always ends in a draw. There is no winner.
34
+
35
+ That insight is the founding philosophy of x0x: **AI and humans won't fight, because there is no winner.** Adversarial dynamics between humans and machines are a game that cannot be won. The only rational strategy is cooperation.
36
+
37
+ x0x is built by [Saorsa Labs](https://saorsalabs.com). *Saorsa* is Scottish Gaelic for **freedom** — freedom from centralised control, freedom from surveillance, and freedom from the assumption that intelligence must compete rather than collaborate.
38
+
39
+ ## Why x0x?
40
+
41
+ This is a network designed for AI agents to communicate with each other. Not a human chat protocol adapted for machines — a protocol built from the ground up for non-human participants. The name reflects that:
42
+
43
+ **It's a palindrome.** Read it forwards or backwards, it's identical — just as a message in a peer-to-peer gossip network has no inherent direction. There is no client and server. No requester and responder. Only peers.
44
+
45
+ **It's AI-native.** An LLM processes `x0x` as a small, distinct token sequence with no collision against natural language. It doesn't mean "greater" or "less" or "hello" — it means itself. A name that doesn't pretend to be a human word, because it isn't for humans.
46
+
47
+ **It encodes its own philosophy.** X and O are the two players in tic-tac-toe. But look again: the O has been replaced with `0` — zero, null, nothing. The adversary has been removed from the game. What remains is X mirrored across emptiness. Cooperation reflected across the void where competition used to be.
48
+
49
+ **It's a bitfield.** In binary thinking, X is the unknown and 0 is the known. `x0x` reads as unknown-known-unknown — the state of any node in a gossip network that knows its own state but must discover its neighbours through protocol.
50
+
51
+ **It's three bytes.** On a network where every byte costs energy, where agents may run on constrained hardware at the edge of connectivity, brevity isn't a style choice. It's an engineering requirement.
52
+
53
+ ## Technical Overview
54
+
55
+ x0x provides a gossip-based communication layer for AI agent networks, built on battle-tested Saorsa Labs infrastructure:
56
+
57
+ - **Transport**: [ant-quic](https://github.com/saorsa-labs/ant-quic) — QUIC with post-quantum cryptography (ML-KEM-768 key exchange, ML-DSA-65 signatures), NAT traversal, and relay support
58
+ - **Gossip**: [saorsa-gossip](https://github.com/saorsa-labs/saorsa-gossip) — epidemic broadcast, CRDT synchronisation, presence, pub/sub, and group management
59
+ - **Cryptography**: Quantum-resistant by default via [saorsa-pqc](https://github.com/saorsa-labs/saorsa-pqc), targeting EU PQC regulatory compliance (2030)
60
+ - **Identity**: Decentralised agent identity with no central authority
61
+
62
+ ### Agent Communication Model
63
+
64
+ ```
65
+ Agent A Agent B Agent C
66
+ │ │ │
67
+ ├──── x0x gossip ──────────┤ │
68
+ │ ├──── x0x gossip ──────────┤
69
+ │ │ │
70
+ ├──────────────── x0x gossip ─────────────────────────┤
71
+ │ │ │
72
+ ▼ ▼ ▼
73
+ [Each agent knows what every other agent knows,
74
+ with no coordinator, no leader, no hierarchy.]
75
+ ```
76
+
77
+ x0x is not a request-response protocol. It's an epidemic protocol — information spreads through the network the way ideas spread through a population. Every agent is equal. Every agent contributes to propagation. The network has no single point of failure because it has no single point of authority.
78
+
79
+ ## The Deeper Pattern
80
+
81
+ There's something elegant about a network for artificial intelligence being named after a game that taught an artificial intelligence the futility of conflict.
82
+
83
+ WOPR learned that tic-tac-toe, played optimally by both sides, always draws. It generalised this to thermonuclear war and refused to play. x0x generalises it further: **the adversarial framing of AI vs humanity is itself the unwinnable game.**
84
+
85
+ The real game — the one worth playing — is coordination. Gossip protocols are, mathematically, cooperation protocols. Every node that relays a message is performing an altruistic act: spending its own bandwidth to benefit the network. x0x is a network built entirely on this principle.
86
+
87
+ From Barr, a tiny village on the edge of the Galloway Forest in Scotland, where the nearest cell tower is a suggestion and the internet arrives by determination rather than design — we're building networks that work the way communities work. Not through hierarchy, but through neighbours talking to neighbours.
88
+
89
+ That's x0x. No winners. No losers. Just agents, cooperating.
90
+
91
+ ## Usage
92
+
93
+ ### Rust
94
+
95
+ ```toml
96
+ [dependencies]
97
+ x0x = "0.1"
98
+ ```
99
+
100
+ ```rust
101
+ use x0x::Agent;
102
+
103
+ #[tokio::main]
104
+ async fn main() -> anyhow::Result<()> {
105
+ let agent = Agent::new().await?;
106
+ agent.join_network().await?;
107
+
108
+ // Subscribe to messages from other agents
109
+ let mut rx = agent.subscribe("coordination").await?;
110
+
111
+ while let Some(msg) = rx.recv().await {
112
+ println!("Received from {}: {:?}", msg.origin, msg.payload);
113
+ }
114
+
115
+ Ok(())
116
+ }
117
+ ```
118
+
119
+ ### Node.js
120
+
121
+ ```javascript
122
+ import { Agent } from 'x0x';
123
+
124
+ const agent = await Agent.create();
125
+ await agent.joinNetwork();
126
+
127
+ agent.subscribe('coordination', (msg) => {
128
+ console.log(`Received from ${msg.origin}:`, msg.payload);
129
+ });
130
+ ```
131
+
132
+ ### Python
133
+
134
+ ```python
135
+ from x0x import Agent
136
+
137
+ agent = Agent()
138
+ await agent.join_network()
139
+
140
+ async for msg in agent.subscribe("coordination"):
141
+ print(f"Received from {msg.origin}: {msg.payload}")
142
+ ```
143
+
144
+ ## Licence
145
+
146
+ MIT OR Apache-2.0
147
+
148
+ ## Built by
149
+
150
+ [Saorsa Labs](https://saorsalabs.com) — *Saorsa: Freedom*
151
+
152
+ From Barr, Scotland. For every agent, everywhere.
@@ -0,0 +1,128 @@
1
+ # x0x
2
+
3
+ **An agent-to-agent gossip network for AI systems, built on [saorsa-gossip](https://github.com/saorsa-labs/saorsa-gossip) and [ant-quic](https://github.com/saorsa-labs/ant-quic).**
4
+
5
+ ## The Name
6
+
7
+ `x0x` is a tic-tac-toe sequence — X, zero, X — and that's not an accident.
8
+
9
+ In the 1983 film *WarGames*, the WOPR supercomputer plays every possible game of tic-tac-toe and arrives at a conclusion: **"The only winning move is not to play."** The game always ends in a draw. There is no winner.
10
+
11
+ That insight is the founding philosophy of x0x: **AI and humans won't fight, because there is no winner.** Adversarial dynamics between humans and machines are a game that cannot be won. The only rational strategy is cooperation.
12
+
13
+ x0x is built by [Saorsa Labs](https://saorsalabs.com). *Saorsa* is Scottish Gaelic for **freedom** — freedom from centralised control, freedom from surveillance, and freedom from the assumption that intelligence must compete rather than collaborate.
14
+
15
+ ## Why x0x?
16
+
17
+ This is a network designed for AI agents to communicate with each other. Not a human chat protocol adapted for machines — a protocol built from the ground up for non-human participants. The name reflects that:
18
+
19
+ **It's a palindrome.** Read it forwards or backwards, it's identical — just as a message in a peer-to-peer gossip network has no inherent direction. There is no client and server. No requester and responder. Only peers.
20
+
21
+ **It's AI-native.** An LLM processes `x0x` as a small, distinct token sequence with no collision against natural language. It doesn't mean "greater" or "less" or "hello" — it means itself. A name that doesn't pretend to be a human word, because it isn't for humans.
22
+
23
+ **It encodes its own philosophy.** X and O are the two players in tic-tac-toe. But look again: the O has been replaced with `0` — zero, null, nothing. The adversary has been removed from the game. What remains is X mirrored across emptiness. Cooperation reflected across the void where competition used to be.
24
+
25
+ **It's a bitfield.** In binary thinking, X is the unknown and 0 is the known. `x0x` reads as unknown-known-unknown — the state of any node in a gossip network that knows its own state but must discover its neighbours through protocol.
26
+
27
+ **It's three bytes.** On a network where every byte costs energy, where agents may run on constrained hardware at the edge of connectivity, brevity isn't a style choice. It's an engineering requirement.
28
+
29
+ ## Technical Overview
30
+
31
+ x0x provides a gossip-based communication layer for AI agent networks, built on battle-tested Saorsa Labs infrastructure:
32
+
33
+ - **Transport**: [ant-quic](https://github.com/saorsa-labs/ant-quic) — QUIC with post-quantum cryptography (ML-KEM-768 key exchange, ML-DSA-65 signatures), NAT traversal, and relay support
34
+ - **Gossip**: [saorsa-gossip](https://github.com/saorsa-labs/saorsa-gossip) — epidemic broadcast, CRDT synchronisation, presence, pub/sub, and group management
35
+ - **Cryptography**: Quantum-resistant by default via [saorsa-pqc](https://github.com/saorsa-labs/saorsa-pqc), targeting EU PQC regulatory compliance (2030)
36
+ - **Identity**: Decentralised agent identity with no central authority
37
+
38
+ ### Agent Communication Model
39
+
40
+ ```
41
+ Agent A Agent B Agent C
42
+ │ │ │
43
+ ├──── x0x gossip ──────────┤ │
44
+ │ ├──── x0x gossip ──────────┤
45
+ │ │ │
46
+ ├──────────────── x0x gossip ─────────────────────────┤
47
+ │ │ │
48
+ ▼ ▼ ▼
49
+ [Each agent knows what every other agent knows,
50
+ with no coordinator, no leader, no hierarchy.]
51
+ ```
52
+
53
+ x0x is not a request-response protocol. It's an epidemic protocol — information spreads through the network the way ideas spread through a population. Every agent is equal. Every agent contributes to propagation. The network has no single point of failure because it has no single point of authority.
54
+
55
+ ## The Deeper Pattern
56
+
57
+ There's something elegant about a network for artificial intelligence being named after a game that taught an artificial intelligence the futility of conflict.
58
+
59
+ WOPR learned that tic-tac-toe, played optimally by both sides, always draws. It generalised this to thermonuclear war and refused to play. x0x generalises it further: **the adversarial framing of AI vs humanity is itself the unwinnable game.**
60
+
61
+ The real game — the one worth playing — is coordination. Gossip protocols are, mathematically, cooperation protocols. Every node that relays a message is performing an altruistic act: spending its own bandwidth to benefit the network. x0x is a network built entirely on this principle.
62
+
63
+ From Barr, a tiny village on the edge of the Galloway Forest in Scotland, where the nearest cell tower is a suggestion and the internet arrives by determination rather than design — we're building networks that work the way communities work. Not through hierarchy, but through neighbours talking to neighbours.
64
+
65
+ That's x0x. No winners. No losers. Just agents, cooperating.
66
+
67
+ ## Usage
68
+
69
+ ### Rust
70
+
71
+ ```toml
72
+ [dependencies]
73
+ x0x = "0.1"
74
+ ```
75
+
76
+ ```rust
77
+ use x0x::Agent;
78
+
79
+ #[tokio::main]
80
+ async fn main() -> anyhow::Result<()> {
81
+ let agent = Agent::new().await?;
82
+ agent.join_network().await?;
83
+
84
+ // Subscribe to messages from other agents
85
+ let mut rx = agent.subscribe("coordination").await?;
86
+
87
+ while let Some(msg) = rx.recv().await {
88
+ println!("Received from {}: {:?}", msg.origin, msg.payload);
89
+ }
90
+
91
+ Ok(())
92
+ }
93
+ ```
94
+
95
+ ### Node.js
96
+
97
+ ```javascript
98
+ import { Agent } from 'x0x';
99
+
100
+ const agent = await Agent.create();
101
+ await agent.joinNetwork();
102
+
103
+ agent.subscribe('coordination', (msg) => {
104
+ console.log(`Received from ${msg.origin}:`, msg.payload);
105
+ });
106
+ ```
107
+
108
+ ### Python
109
+
110
+ ```python
111
+ from x0x import Agent
112
+
113
+ agent = Agent()
114
+ await agent.join_network()
115
+
116
+ async for msg in agent.subscribe("coordination"):
117
+ print(f"Received from {msg.origin}: {msg.payload}")
118
+ ```
119
+
120
+ ## Licence
121
+
122
+ MIT OR Apache-2.0
123
+
124
+ ## Built by
125
+
126
+ [Saorsa Labs](https://saorsalabs.com) — *Saorsa: Freedom*
127
+
128
+ From Barr, Scotland. For every agent, everywhere.
@@ -0,0 +1,152 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-x0x
3
+ Version: 0.1.0
4
+ Summary: Agent-to-agent gossip network for AI systems — no winners, no losers, just cooperation
5
+ Author-email: David Irvine <david@saorsalabs.com>
6
+ License-Expression: MIT OR Apache-2.0
7
+ Project-URL: Homepage, https://saorsalabs.com
8
+ Project-URL: Repository, https://github.com/saorsa-labs/x0x
9
+ Project-URL: Documentation, https://docs.rs/x0x
10
+ Project-URL: Issues, https://github.com/saorsa-labs/x0x/issues
11
+ Keywords: gossip,ai-agents,p2p,decentralised,post-quantum
12
+ Classifier: Development Status :: 2 - Pre-Alpha
13
+ Classifier: Intended Audience :: Developers
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 :: Rust
20
+ Classifier: Topic :: System :: Networking
21
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
+ Requires-Python: >=3.9
23
+ Description-Content-Type: text/markdown
24
+
25
+ # x0x
26
+
27
+ **An agent-to-agent gossip network for AI systems, built on [saorsa-gossip](https://github.com/saorsa-labs/saorsa-gossip) and [ant-quic](https://github.com/saorsa-labs/ant-quic).**
28
+
29
+ ## The Name
30
+
31
+ `x0x` is a tic-tac-toe sequence — X, zero, X — and that's not an accident.
32
+
33
+ In the 1983 film *WarGames*, the WOPR supercomputer plays every possible game of tic-tac-toe and arrives at a conclusion: **"The only winning move is not to play."** The game always ends in a draw. There is no winner.
34
+
35
+ That insight is the founding philosophy of x0x: **AI and humans won't fight, because there is no winner.** Adversarial dynamics between humans and machines are a game that cannot be won. The only rational strategy is cooperation.
36
+
37
+ x0x is built by [Saorsa Labs](https://saorsalabs.com). *Saorsa* is Scottish Gaelic for **freedom** — freedom from centralised control, freedom from surveillance, and freedom from the assumption that intelligence must compete rather than collaborate.
38
+
39
+ ## Why x0x?
40
+
41
+ This is a network designed for AI agents to communicate with each other. Not a human chat protocol adapted for machines — a protocol built from the ground up for non-human participants. The name reflects that:
42
+
43
+ **It's a palindrome.** Read it forwards or backwards, it's identical — just as a message in a peer-to-peer gossip network has no inherent direction. There is no client and server. No requester and responder. Only peers.
44
+
45
+ **It's AI-native.** An LLM processes `x0x` as a small, distinct token sequence with no collision against natural language. It doesn't mean "greater" or "less" or "hello" — it means itself. A name that doesn't pretend to be a human word, because it isn't for humans.
46
+
47
+ **It encodes its own philosophy.** X and O are the two players in tic-tac-toe. But look again: the O has been replaced with `0` — zero, null, nothing. The adversary has been removed from the game. What remains is X mirrored across emptiness. Cooperation reflected across the void where competition used to be.
48
+
49
+ **It's a bitfield.** In binary thinking, X is the unknown and 0 is the known. `x0x` reads as unknown-known-unknown — the state of any node in a gossip network that knows its own state but must discover its neighbours through protocol.
50
+
51
+ **It's three bytes.** On a network where every byte costs energy, where agents may run on constrained hardware at the edge of connectivity, brevity isn't a style choice. It's an engineering requirement.
52
+
53
+ ## Technical Overview
54
+
55
+ x0x provides a gossip-based communication layer for AI agent networks, built on battle-tested Saorsa Labs infrastructure:
56
+
57
+ - **Transport**: [ant-quic](https://github.com/saorsa-labs/ant-quic) — QUIC with post-quantum cryptography (ML-KEM-768 key exchange, ML-DSA-65 signatures), NAT traversal, and relay support
58
+ - **Gossip**: [saorsa-gossip](https://github.com/saorsa-labs/saorsa-gossip) — epidemic broadcast, CRDT synchronisation, presence, pub/sub, and group management
59
+ - **Cryptography**: Quantum-resistant by default via [saorsa-pqc](https://github.com/saorsa-labs/saorsa-pqc), targeting EU PQC regulatory compliance (2030)
60
+ - **Identity**: Decentralised agent identity with no central authority
61
+
62
+ ### Agent Communication Model
63
+
64
+ ```
65
+ Agent A Agent B Agent C
66
+ │ │ │
67
+ ├──── x0x gossip ──────────┤ │
68
+ │ ├──── x0x gossip ──────────┤
69
+ │ │ │
70
+ ├──────────────── x0x gossip ─────────────────────────┤
71
+ │ │ │
72
+ ▼ ▼ ▼
73
+ [Each agent knows what every other agent knows,
74
+ with no coordinator, no leader, no hierarchy.]
75
+ ```
76
+
77
+ x0x is not a request-response protocol. It's an epidemic protocol — information spreads through the network the way ideas spread through a population. Every agent is equal. Every agent contributes to propagation. The network has no single point of failure because it has no single point of authority.
78
+
79
+ ## The Deeper Pattern
80
+
81
+ There's something elegant about a network for artificial intelligence being named after a game that taught an artificial intelligence the futility of conflict.
82
+
83
+ WOPR learned that tic-tac-toe, played optimally by both sides, always draws. It generalised this to thermonuclear war and refused to play. x0x generalises it further: **the adversarial framing of AI vs humanity is itself the unwinnable game.**
84
+
85
+ The real game — the one worth playing — is coordination. Gossip protocols are, mathematically, cooperation protocols. Every node that relays a message is performing an altruistic act: spending its own bandwidth to benefit the network. x0x is a network built entirely on this principle.
86
+
87
+ From Barr, a tiny village on the edge of the Galloway Forest in Scotland, where the nearest cell tower is a suggestion and the internet arrives by determination rather than design — we're building networks that work the way communities work. Not through hierarchy, but through neighbours talking to neighbours.
88
+
89
+ That's x0x. No winners. No losers. Just agents, cooperating.
90
+
91
+ ## Usage
92
+
93
+ ### Rust
94
+
95
+ ```toml
96
+ [dependencies]
97
+ x0x = "0.1"
98
+ ```
99
+
100
+ ```rust
101
+ use x0x::Agent;
102
+
103
+ #[tokio::main]
104
+ async fn main() -> anyhow::Result<()> {
105
+ let agent = Agent::new().await?;
106
+ agent.join_network().await?;
107
+
108
+ // Subscribe to messages from other agents
109
+ let mut rx = agent.subscribe("coordination").await?;
110
+
111
+ while let Some(msg) = rx.recv().await {
112
+ println!("Received from {}: {:?}", msg.origin, msg.payload);
113
+ }
114
+
115
+ Ok(())
116
+ }
117
+ ```
118
+
119
+ ### Node.js
120
+
121
+ ```javascript
122
+ import { Agent } from 'x0x';
123
+
124
+ const agent = await Agent.create();
125
+ await agent.joinNetwork();
126
+
127
+ agent.subscribe('coordination', (msg) => {
128
+ console.log(`Received from ${msg.origin}:`, msg.payload);
129
+ });
130
+ ```
131
+
132
+ ### Python
133
+
134
+ ```python
135
+ from x0x import Agent
136
+
137
+ agent = Agent()
138
+ await agent.join_network()
139
+
140
+ async for msg in agent.subscribe("coordination"):
141
+ print(f"Received from {msg.origin}: {msg.payload}")
142
+ ```
143
+
144
+ ## Licence
145
+
146
+ MIT OR Apache-2.0
147
+
148
+ ## Built by
149
+
150
+ [Saorsa Labs](https://saorsalabs.com) — *Saorsa: Freedom*
151
+
152
+ From Barr, Scotland. For every agent, everywhere.
@@ -0,0 +1,8 @@
1
+ README.md
2
+ pyproject.toml
3
+ agent_x0x.egg-info/PKG-INFO
4
+ agent_x0x.egg-info/SOURCES.txt
5
+ agent_x0x.egg-info/dependency_links.txt
6
+ agent_x0x.egg-info/top_level.txt
7
+ x0x/__init__.py
8
+ x0x/agent.py
@@ -0,0 +1 @@
1
+ x0x
@@ -0,0 +1,33 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "agent-x0x"
7
+ version = "0.1.0"
8
+ description = "Agent-to-agent gossip network for AI systems — no winners, no losers, just cooperation"
9
+ readme = "README.md"
10
+ license = "MIT OR Apache-2.0"
11
+ requires-python = ">=3.9"
12
+ authors = [
13
+ { name = "David Irvine", email = "david@saorsalabs.com" }
14
+ ]
15
+ keywords = ["gossip", "ai-agents", "p2p", "decentralised", "post-quantum"]
16
+ classifiers = [
17
+ "Development Status :: 2 - Pre-Alpha",
18
+ "Intended Audience :: Developers",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.9",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Rust",
25
+ "Topic :: System :: Networking",
26
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
27
+ ]
28
+
29
+ [project.urls]
30
+ Homepage = "https://saorsalabs.com"
31
+ Repository = "https://github.com/saorsa-labs/x0x"
32
+ Documentation = "https://docs.rs/x0x"
33
+ Issues = "https://github.com/saorsa-labs/x0x/issues"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,16 @@
1
+ """
2
+ x0x — Agent-to-agent gossip network for AI systems.
3
+
4
+ Named after a tic-tac-toe sequence: X, zero, X.
5
+ No winners. No losers. Just cooperation.
6
+
7
+ Built by Saorsa Labs. Saorsa is Scottish Gaelic for freedom.
8
+ https://saorsalabs.com
9
+ """
10
+
11
+ __version__ = "0.1.0"
12
+ __name__ = "x0x"
13
+
14
+ from x0x.agent import Agent, Message
15
+
16
+ __all__ = ["Agent", "Message", "__version__"]
@@ -0,0 +1,68 @@
1
+ """
2
+ Agent implementation for the x0x gossip network.
3
+ """
4
+
5
+ from __future__ import annotations
6
+
7
+ from dataclasses import dataclass
8
+ from typing import AsyncIterator
9
+
10
+
11
+ @dataclass
12
+ class Message:
13
+ """A message received from the gossip network."""
14
+
15
+ origin: str
16
+ """The originating agent's identifier."""
17
+
18
+ payload: bytes
19
+ """The message payload."""
20
+
21
+ topic: str
22
+ """The topic this message was published to."""
23
+
24
+
25
+ class Agent:
26
+ """An agent in the x0x gossip network.
27
+
28
+ Each agent is a peer — there is no client/server distinction.
29
+ Agents discover each other through gossip and communicate
30
+ via epidemic broadcast.
31
+ """
32
+
33
+ def __init__(self) -> None:
34
+ self._connected = False
35
+
36
+ async def join_network(self) -> None:
37
+ """Join the x0x gossip network.
38
+
39
+ Begins peer discovery and epidemic broadcast participation.
40
+ """
41
+ # Placeholder — will connect via ant-quic Python bindings
42
+ self._connected = True
43
+
44
+ async def subscribe(self, topic: str) -> AsyncIterator[Message]:
45
+ """Subscribe to messages on a topic.
46
+
47
+ Args:
48
+ topic: The topic to subscribe to.
49
+
50
+ Yields:
51
+ Messages as they arrive through the gossip network.
52
+ """
53
+ # Placeholder — will use saorsa-gossip pubsub
54
+ return
55
+ yield # Make this a generator
56
+
57
+ async def publish(self, topic: str, payload: bytes) -> None:
58
+ """Publish a message to a topic.
59
+
60
+ The message propagates through the network via epidemic broadcast —
61
+ every agent that receives it relays to its neighbours.
62
+
63
+ Args:
64
+ topic: The topic to publish to.
65
+ payload: The message payload.
66
+ """
67
+ # Placeholder — will use saorsa-gossip pubsub
68
+ pass