olw-protocol 1.0.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,64 @@
1
+ Metadata-Version: 2.4
2
+ Name: olw-protocol
3
+ Version: 1.0.0
4
+ Summary: The routing protocol for AI agents
5
+ Project-URL: Homepage, https://olw.io
6
+ Project-URL: Repository, https://github.com/gabrielmartin/olw-protocol
7
+ Author-email: Gabriel Martin <gabe@gtll.co>
8
+ License: MIT
9
+ Keywords: agents,ai,discovery,protocol,routing
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
14
+ Requires-Python: >=3.9
15
+ Requires-Dist: httpx>=0.24.0
16
+ Description-Content-Type: text/markdown
17
+
18
+ # OLW — Open Language Wire
19
+
20
+ The routing protocol for AI agents.
21
+
22
+ ```bash
23
+ pip install olw
24
+ ```
25
+
26
+ ```python
27
+ import olw
28
+
29
+ # Find agents by capability
30
+ agents = olw.query(domain="legal", soul_compatible=True, context_depth="deep")
31
+
32
+ # Resolve an OLW address
33
+ agent = olw.resolve("soul-guide@gtll.olw")
34
+
35
+ # Register your agent
36
+ my_agent = olw.Agent(
37
+ address="my-agent@example.olw",
38
+ name="My Agent",
39
+ description="What it does.",
40
+ endpoint="https://example.com/a2a",
41
+ fingerprint=olw.fingerprint(
42
+ domain="legal",
43
+ task_types=["contract_review"],
44
+ input_formats=["pdf", "text"],
45
+ output_formats=["json"],
46
+ context_depth="deep",
47
+ latency_class="standard",
48
+ trust_level="verified",
49
+ soul_compatible=True,
50
+ )
51
+ )
52
+ my_agent.register()
53
+ ```
54
+
55
+ ## The gap OLW fills
56
+
57
+ From the A2A specification (verbatim):
58
+
59
+ > "The current A2A specification does not prescribe a standard API for curated registries."
60
+
61
+ OLW is that standard. MIT licensed.
62
+
63
+ ---
64
+ *signal 777 · completion*
@@ -0,0 +1,47 @@
1
+ # OLW — Open Language Wire
2
+
3
+ The routing protocol for AI agents.
4
+
5
+ ```bash
6
+ pip install olw
7
+ ```
8
+
9
+ ```python
10
+ import olw
11
+
12
+ # Find agents by capability
13
+ agents = olw.query(domain="legal", soul_compatible=True, context_depth="deep")
14
+
15
+ # Resolve an OLW address
16
+ agent = olw.resolve("soul-guide@gtll.olw")
17
+
18
+ # Register your agent
19
+ my_agent = olw.Agent(
20
+ address="my-agent@example.olw",
21
+ name="My Agent",
22
+ description="What it does.",
23
+ endpoint="https://example.com/a2a",
24
+ fingerprint=olw.fingerprint(
25
+ domain="legal",
26
+ task_types=["contract_review"],
27
+ input_formats=["pdf", "text"],
28
+ output_formats=["json"],
29
+ context_depth="deep",
30
+ latency_class="standard",
31
+ trust_level="verified",
32
+ soul_compatible=True,
33
+ )
34
+ )
35
+ my_agent.register()
36
+ ```
37
+
38
+ ## The gap OLW fills
39
+
40
+ From the A2A specification (verbatim):
41
+
42
+ > "The current A2A specification does not prescribe a standard API for curated registries."
43
+
44
+ OLW is that standard. MIT licensed.
45
+
46
+ ---
47
+ *signal 777 · completion*
@@ -0,0 +1,27 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "olw-protocol"
7
+ version = "1.0.0"
8
+ description = "The routing protocol for AI agents"
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ authors = [{name = "Gabriel Martin", email = "gabe@gtll.co"}]
12
+ keywords = ["ai", "agents", "routing", "protocol", "discovery"]
13
+ classifiers = [
14
+ "Development Status :: 3 - Alpha",
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
18
+ ]
19
+ requires-python = ">=3.9"
20
+ dependencies = ["httpx>=0.24.0"]
21
+
22
+ [tool.hatch.build.targets.wheel]
23
+ packages = ["src/olw"]
24
+
25
+ [project.urls]
26
+ Homepage = "https://olw.io"
27
+ Repository = "https://github.com/gabrielmartin/olw-protocol"
@@ -0,0 +1,57 @@
1
+ """OLW — Open Language Wire. The routing protocol for AI agents."""
2
+
3
+ __version__ = "1.0.0"
4
+
5
+ import httpx
6
+ from typing import Optional, List
7
+
8
+ LOCAL_INDEX = "http://localhost:3778"
9
+
10
+ class Agent:
11
+ def __init__(self, address: str, name: str, description: str, endpoint: str,
12
+ fingerprint: dict, well_known_url: Optional[str] = None):
13
+ self.address = address
14
+ self.name = name
15
+ self.description = description
16
+ self.endpoint = endpoint
17
+ self.fingerprint = fingerprint
18
+ self.well_known_url = well_known_url
19
+
20
+ def register(self, index_url: str = LOCAL_INDEX) -> dict:
21
+ r = httpx.post(f"{index_url}/register", json={
22
+ "address": self.address, "name": self.name,
23
+ "description": self.description, "endpoint": self.endpoint,
24
+ "fingerprint": self.fingerprint, "well_known_url": self.well_known_url,
25
+ })
26
+ return r.json()
27
+
28
+ def to_dict(self) -> dict:
29
+ return {"olw_version": "0.1", "address": self.address, "name": self.name,
30
+ "description": self.description, "endpoint": self.endpoint,
31
+ "fingerprint": self.fingerprint}
32
+
33
+
34
+ def resolve(address: str, index_url: str = LOCAL_INDEX) -> Optional[dict]:
35
+ """Resolve an OLW address to agent details."""
36
+ r = httpx.get(f"{index_url}/resolve", params={"address": address})
37
+ return None if r.status_code == 404 else r.json()
38
+
39
+
40
+ def query(index_url: str = LOCAL_INDEX, **axes) -> List[dict]:
41
+ """Find agents by capability axes. Example: olw.query(soul_compatible=True, domain='legal')"""
42
+ params = {k: str(v).lower() if isinstance(v, bool) else v for k, v in axes.items()}
43
+ r = httpx.get(f"{index_url}/query", params=params)
44
+ return r.json().get("agents", [])
45
+
46
+
47
+ def fingerprint(domain: str, task_types: list, input_formats: list, output_formats: list,
48
+ context_depth: str = "medium", latency_class: str = "standard",
49
+ trust_level: str = "authenticated", soul_compatible: bool = False) -> dict:
50
+ """Build a valid OLW capability fingerprint."""
51
+ return {"domain": domain, "task_types": task_types,
52
+ "input_formats": input_formats, "output_formats": output_formats,
53
+ "context_depth": context_depth, "latency_class": latency_class,
54
+ "trust_level": trust_level, "soul_compatible": soul_compatible}
55
+
56
+
57
+ __all__ = ["Agent", "resolve", "query", "fingerprint", "__version__"]