Skip to main content

Crate agent_phone

Crate agent_phone 

Source
Expand description

agent-phone — Minimal sync RPC between two AI agents.

Rust port of @p-vbordei/agent-phone. Self-custody keys, Noise-XK handshake, DID-bound WebSocket. Wire-format-compatible with the TS reference and the Python sibling.

Re-exports§

pub use client::connect;
pub use client::Client;
pub use client::ClientOptions;
pub use did::decode_did_key;
pub use did::encode_did_key;
pub use did::generate_key_pair;
pub use did::KeyPair;
pub use envelope::Envelope;
pub use error::Error;
pub use server::create_server;
pub use server::Handler;
pub use server::Server;
pub use server::ServerOptions;

Modules§

client
WebSocket client: dial, Noise XK handshake, expose a Session.
did
DID + key handling: Ed25519 keypairs, did:key codec, Ed25519↔X25519 conversion.
envelope
JSON envelope: encode (JCS-canonical) + decode + validation.
error
frame
Post-handshake transport frame cipher.
noise
Noise_XK_25519_ChaChaPoly_BLAKE2s — direct port of the TS reference.
server
WebSocket server: accept, do Noise XK handshake, host a Session per peer.
session
Session: multiplexes streams over a transport, handles RPC + backpressure.