Repository navigation
Releases
Releases · alok-108/agentwire
AgentWire (swarmwire) v0.4.0 — Ed25519 Identity, TLS, Persistent Replay/Idempotency & Real LangGraph Tests
AgentWire (swarmwire) v0.4.0 — Ed25519 Identity, TLS, Persistent Replay/Idempotency & Real LangGraph Tests
Latest
AgentWire (swarmwire) v0.4.0 — Ed25519 Per-Agent Identity, TLS Transport, Persistent Replay/Idempotency & Real LangGraph Validation
Closes all 6 production-security and distributed-systems gaps identified during code review:
- Per-Agent Asymmetric Ed25519 Identity (
agentwire-core,agentwire-py):- Added
generate_ed25519_keypair,sign_ast_ed25519, andverify_frame_ed25519(FLAG_SIGNED_ED25519, 64-byte signatures bound strictly topublic_keys[source_agent]) — a compromised agent can no longer impersonate another role.
- Added
- Native TLS / mTLS Transport Confidentiality (
swarmwire.transport):- Added
ssl.SSLContextsupport toAgentWireRpcServerandAgentWireRpcClient, verified end-to-end with encrypted TLS handshakes and plaintext rejection.
- Added
- Cross-Restart & Multi-Instance Replay + Idempotency Persistence (
swarmwire.state):- Added pluggable
StateStoreprotocol + zero-dependencySqliteStateStore(SQLite WAL +BEGIN IMMEDIATEatomic writes), verified across server restarts and concurrent multi-server instances.
- Added pluggable
- Idempotent Retry Safety:
AgentWireRpcClientattaches stableidempotency_keyvalues across retries (with fresh transport nonces) and refuses blind retries on non-idempotentMUTATEcalls;AgentWireRpcServerdeduplicates retried requests (deduplicated=True) without double-executing handlers.
- Independent Server-Side Usage Metering (
IndependentTokenMeter/UsageMeter):- Independently measures inbound AST + outbound payload tokens and enforces
max(measured, handler_reported)during two-phase budget settlement so handlers cannot zero-out usage.
- Independently measures inbound AST + outbound payload tokens and enforces
- Real Upstream LangGraph Integration + Dual Imports (
import swarmwire&import agentwire):- Added real compiled
langgraph.graph.StateGraphintegration tests (tests/test_real_langgraph.py) running in CI, documented explicit threat boundaries inSECURITY.md, and bundled bothimport swarmwireandimport agentwire.
- Added real compiled
Install
pip install swarmwire==0.4.0AgentWire (swarmwire) v0.3.1 — Dual Import Support (import swarmwire & import agentwire)
Adds first-class \import swarmwire\ (\swarmwire.adapters, \swarmwire.telemetry, \swarmwire.transport) alongside backwards-compatible \import agentwire. Install with \pip install swarmwire.
AgentWire (swarmwire) v0.3.0 — Apache-2.0 & Zenodo Archival
AgentWire (swarmwire) v0.3.0 — Apache-2.0 License, Citation Metadata & Zenodo Archival
Highlights
- Apache License, Version 2.0: Migrated future releases (
v0.3.0+) to Apache-2.0 with officialLICENSEandNOTICEfiles packaged into all wheels andsdist(prior releasesv0.2.0andv0.2.1remain under the MIT License). - Academic & Software Citability: Added
CITATION.cff(enabling GitHub's "Cite this repository" BibTeX/APA widget) and.zenodo.jsonfor automated Zenodo DOI archival. - Full Stack Verified: Rust
AW01binary codec (agentwire-core), constant-time HMAC-SHA256 authentication + replay protection, two-phase Reserve/Settle budget accounting (agentwire-validator), thread-safe PyO3 bindings (agentwire-py), networked length-prefixed TCP RPC transport (agentwire.transport), LangGraph & CrewAI adapters, and live SSE trace decompiler dashboard.
Install
pip install swarmwire==0.3.0(Imports in Python as import agentwire; pre-built Linux, macOS, and Windows wheels + sdist are built and attached automatically via GitHub Actions.)
v0.2.1
swarmwire v0.2.1 — Author metadata fix (Alok Pandey)
AgentWire v0.2.0 — Cryptographic Auth, Two-Phase Budgets & TCP RPC
AgentWire v0.2.0 — Cryptographic Auth, Two-Phase Budgets & Networked TCP RPC
AgentWire is a compact, cryptographically verifiable binary wire protocol (AW01) and deterministic policy runtime for multi-agent AI systems built with Rust + PyO3.
Highlights
- HMAC-SHA256 Frame Authentication & Replay Protection (
agentwire-core,agentwire-validator):- Constant-time HMAC-SHA256 signing (
sign_ast/verify_frame) over canonical headers, replaynonce,timestamp_ms, and typed AST body. - Zero-trust receiver validation: sender
GUARD_VERIFIEDflags are advisory only and never trusted by receivers. - Replay nonce cache (
REPLAY_DETECTED) and clock-skew freshness window (EXPIRED_TIMESTAMP).
- Constant-time HMAC-SHA256 signing (
- Two-Phase Budget Accounting (
Reserve -> Settle / Release):PolicyEnginereserves declared max budgets on frame acceptance, settles actual downstream token/cost spend viasettle_usage(returning unused budget to the session pool), and refunds 100% viarelease_reservationon error or timeout.Mutex-backed thread safety verified under 8-thread concurrent sessions.
- Cross-Process TCP RPC Transport (
agentwire.transport):- Length-prefixed binary TCP
AgentWireRpcServer&AgentWireRpcClientwith(trace_id, span_id)correlation, timeouts, exponential-backoff retries, independent receiver-side HMAC + policy enforcement, andCrewAIWire.register_remote_role.
- Length-prefixed binary TCP
- Apples-to-Apples Benchmarks (1,000 hops,
tiktoken:cl100k_base):- Wire Bytes (exact same AST struct):
-68.3%vs. compact JSON and-60.7%vs. RFC 8949 CBOR (unsigned115.2 B);-57.4%vs. compact JSON even with 32-byte HMAC-SHA256 + nonce/timestamp (155.1 B). - LLM Context Tokens (separated from wire bytes):
-15.3%vs. minimal compact AST JSON (62.2 -> 52.8 tok/hop) and-83.1%vs. verbose framework envelopes (312.2 -> 52.8 tok/hop). - Full Authenticated Rust Pipeline:
24.55 µsmean (97.70 µsp99); forged rogueMUTATEblocked in4.00 µs, replay blocked in1.80 µs.
- Wire Bytes (exact same AST struct):
- Fuzzing & Robustness:
- Rust
proptestproperty-based roundtrip and arbitrary-byte fuzzing (13 Rust tests passing, 0 warnings) + 27 Python unit, adversarial, 500-case FFI fuzz, concurrency, and TCP RPC tests.
- Rust
Quick Install
- Pre-built wheel (Windows x64, Python 3.12):
pip install agentwire-0.2.0-cp312-cp312-win_amd64.whl
- Build from source (Linux / macOS / Windows, Python 3.10–3.13 + Rust):
git clone https://github.com/alok-108/agentwire.git cd agentwire uv venv .venv && uv pip install --python .venv/bin/python maturin pytest tiktoken .venv/bin/maturin develop --release