Skip to content

Commit 309da79

Browse files
spec: add IP/legal appendices, library recommendations, and tutorial roadmap
Adds three appendices to the wire protocol spec: Appendix A — Intellectual Property and Prior Art: - Clean-room design statement - Standards licensing table (all freely implementable) - Prior art acknowledgment (Signal, Matrix, XMPP, MLS) - Implementation guidelines for contributors (7 DOs/DONTs) Appendix B — Recommended Cryptographic Libraries: - Audited libraries for all 5 languages (Python, TS, Rust, .NET, Go) - No custom crypto permitted Appendix C — Tutorial and Demo Roadmap: - 8 planned tutorials and demos Also adds Independent Design Statement callout at the top of the spec. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8650dc3 commit 309da79

File tree

1 file changed

+141
-0
lines changed

1 file changed

+141
-0
lines changed

docs/specs/AGENTMESH-WIRE-1.0.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
> messaging in the Agent Governance Toolkit. All SDK implementations (Python,
99
> TypeScript, Rust, .NET, Go) MUST conform to this specification.
1010
11+
> [!IMPORTANT]
12+
> **Independent Design Statement.** This specification is an independent,
13+
> clean-room design built entirely from published, freely-licensed standards
14+
> (see [Section 3](#3-standards-foundation) and [Appendix A](#appendix-a--intellectual-property-and-prior-art)).
15+
> No proprietary protocols, third-party source code, or patented algorithms
16+
> were used. Every cryptographic operation references an IETF RFC or a
17+
> CC0-licensed specification. Implementers should follow this spec and the
18+
> referenced standards only — do not reference, copy, or derive from any
19+
> third-party implementation.
20+
1121
---
1222

1323
## Table of Contents
@@ -30,6 +40,9 @@
3040
16. [Security Considerations](#16-security-considerations)
3141
17. [Test Vectors](#17-test-vectors)
3242
18. [References](#18-references)
43+
- [Appendix A — Intellectual Property and Prior Art](#appendix-a--intellectual-property-and-prior-art)
44+
- [Appendix B — Recommended Cryptographic Libraries](#appendix-b--recommended-cryptographic-libraries)
45+
- [Appendix C — Tutorial and Demo Roadmap](#appendix-c--tutorial-and-demo-roadmap)
3346

3447
---
3548

@@ -885,3 +898,131 @@ Canonical JSON serialization of each frame type will be provided at
885898
7. [RFC 9420 — MLS](https://www.rfc-editor.org/rfc/rfc9420)
886899
8. [W3C DID Core Specification](https://www.w3.org/TR/did-core/)
887900
9. [SPIFFE/SVID Specification](https://spiffe.io/docs/latest/spiffe-about/spiffe-concepts/)
901+
902+
---
903+
904+
## Appendix A — Intellectual Property and Prior Art
905+
906+
### A.1 Clean-Room Design Statement
907+
908+
This specification and all implementations derived from it are the result of
909+
an **independent, clean-room design process**. The design is based exclusively
910+
on:
911+
912+
1. **Published IETF RFCs** — freely implementable internet standards
913+
2. **CC0-licensed Signal Foundation specifications** — explicitly placed in
914+
the public domain by their authors
915+
3. **W3C specifications** — published under royalty-free licensing terms
916+
4. **Original design work** by the Agent Governance Toolkit team for
917+
agent-specific features (KNOCK protocol, governance integration,
918+
registry API, relay semantics)
919+
920+
No proprietary protocols, patented algorithms, or third-party source code
921+
were used in creating this specification.
922+
923+
### A.2 Standards Licensing
924+
925+
| Standard | License | Freely implementable? |
926+
|----------|---------|----------------------|
927+
| Signal X3DH | CC0 (public domain) | ✅ Yes — explicitly |
928+
| Signal Double Ratchet | CC0 (public domain) | ✅ Yes — explicitly |
929+
| RFC 7748 (X25519) | IETF BCP 78 | ✅ Yes — IETF standards |
930+
| RFC 5869 (HKDF) | IETF BCP 78 | ✅ Yes — IETF standards |
931+
| RFC 8439 (ChaCha20-Poly1305) | IETF BCP 78 | ✅ Yes — IETF standards |
932+
| RFC 8032 (Ed25519) | IETF BCP 78 | ✅ Yes — IETF standards |
933+
| RFC 9420 (MLS) | IETF BCP 78 | ✅ Yes — IETF standards |
934+
| W3C DID Core | W3C Document License | ✅ Yes — royalty-free |
935+
| SPIFFE/SVID | Apache 2.0 | ✅ Yes |
936+
937+
### A.3 Prior Art Acknowledgment
938+
939+
The concepts of end-to-end encrypted messaging, store-and-forward relay,
940+
and agent registry are well-established in the field. This specification
941+
acknowledges the following as prior art in the general domain:
942+
943+
- **Signal Protocol** (Open Whisper Systems / Signal Foundation) — the
944+
foundational work on X3DH and Double Ratchet, published as CC0
945+
- **Matrix Protocol** (matrix.org) — federated messaging with E2E encryption
946+
- **XMPP/Jabber** (IETF) — extensible messaging with various encryption extensions
947+
- **MLS** (IETF RFC 9420) — group messaging key agreement
948+
949+
This specification does not claim novelty in the cryptographic primitives.
950+
The novel contribution is the **combination of these well-known primitives
951+
with agent-specific governance** (policy-gated sessions, intent-carrying
952+
handshakes, trust-scored identities, deterministic audit trails) — which
953+
is original work by the AGT team.
954+
955+
### A.4 Implementation Guidelines for Contributors
956+
957+
To maintain clean-room integrity:
958+
959+
1. **DO** implement from this spec and the referenced RFCs/standards only
960+
2. **DO** use audited, published cryptographic libraries (see Appendix B)
961+
3. **DO** write original code — do not copy from any third-party implementation
962+
4. **DO** cite this spec as the design source in code comments
963+
5. **DO NOT** reference, browse, or reverse-engineer any third-party SDK,
964+
relay, or registry implementation while implementing
965+
6. **DO NOT** copy wire formats, API schemas, or frame structures from any
966+
existing implementation — use only what is defined in this document
967+
7. **DO NOT** use any code, pseudocode, or algorithms from sources other
968+
than the RFCs and CC0 specifications listed in Section 18
969+
970+
---
971+
972+
## Appendix B — Recommended Cryptographic Libraries
973+
974+
Implementations MUST use audited, well-known cryptographic libraries.
975+
Custom crypto implementations are prohibited.
976+
977+
### Python
978+
979+
| Primitive | Library | License | Notes |
980+
|-----------|---------|---------|-------|
981+
| X25519, Ed25519 | [PyNaCl](https://pynacl.readthedocs.io/) (libsodium) | Apache 2.0 | Already an AGT dependency |
982+
| HKDF, ChaCha20-Poly1305 | [cryptography](https://cryptography.io/) | Apache 2.0 / BSD | Already an AGT dependency |
983+
984+
### TypeScript / JavaScript
985+
986+
| Primitive | Library | License | Notes |
987+
|-----------|---------|---------|-------|
988+
| X25519, Ed25519 | [@noble/curves](https://github.com/paulmillr/noble-curves) | MIT | Audited, zero deps |
989+
| ChaCha20-Poly1305 | [@noble/ciphers](https://github.com/paulmillr/noble-ciphers) | MIT | Audited, zero deps |
990+
| HKDF, SHA-256, HMAC | [@noble/hashes](https://github.com/paulmillr/noble-hashes) | MIT | Audited, zero deps |
991+
992+
### Rust
993+
994+
| Primitive | Library | License | Notes |
995+
|-----------|---------|---------|-------|
996+
| X25519 | [x25519-dalek](https://crates.io/crates/x25519-dalek) | BSD-3-Clause | Widely used |
997+
| Ed25519 | [ed25519-dalek](https://crates.io/crates/ed25519-dalek) | BSD-3-Clause | Already an AGT dependency |
998+
| ChaCha20-Poly1305 | [chacha20poly1305](https://crates.io/crates/chacha20poly1305) | MIT / Apache 2.0 | RustCrypto project |
999+
| HKDF | [hkdf](https://crates.io/crates/hkdf) | MIT / Apache 2.0 | RustCrypto project |
1000+
1001+
### .NET
1002+
1003+
| Primitive | Library | License | Notes |
1004+
|-----------|---------|---------|-------|
1005+
| X25519, Ed25519, ChaCha20-Poly1305, HKDF | [libsodium-core](https://github.com/tabrath/libsodium-core) or [NSec](https://nsec.rocks/) | MIT | libsodium bindings for .NET |
1006+
1007+
### Go
1008+
1009+
| Primitive | Library | License | Notes |
1010+
|-----------|---------|---------|-------|
1011+
| X25519, Ed25519, HKDF, ChaCha20-Poly1305 | [golang.org/x/crypto](https://pkg.go.dev/golang.org/x/crypto) | BSD-3-Clause | Go standard extended library |
1012+
1013+
---
1014+
1015+
## Appendix C — Tutorial and Demo Roadmap
1016+
1017+
Once this spec is implemented, the following documentation will be provided:
1018+
1019+
| Document | Purpose |
1020+
|----------|---------|
1021+
| **Tutorial: E2E Encrypted Agent Messaging** | Step-by-step guide with code in all 5 languages |
1022+
| **Tutorial: KNOCK Protocol and Intent-Based Sessions** | How to use governance-gated session establishment |
1023+
| **Tutorial: Deploying Relay + Registry** | Docker Compose + Helm chart quickstart |
1024+
| **Demo: Two-Agent Encrypted Conversation** | Runnable example with Alice and Bob agents |
1025+
| **Demo: Multi-Agent Task Delegation** | KNOCK → encrypted channel → task handoff → audit trail |
1026+
| **Demo: Offline Agent Delivery** | Agent sends while peer is offline, relay delivers on reconnect |
1027+
| **API Reference: Registry REST API** | OpenAPI spec for the registry service |
1028+
| **API Reference: Relay WebSocket Protocol** | Frame-by-frame documentation with examples |

0 commit comments

Comments
 (0)