Skip to main content

Crate brainwires_agent_network

Crate brainwires_agent_network 

Source
Expand description

§Brainwires Agent Network

Agent networking layer for the Brainwires Agent Framework.

Provides an MCP server framework, middleware pipeline, agent IPC, remote bridge, and optional mesh networking support.

§Protocol-Layer Stack

The networking layer is organized as a 5-layer protocol stack:

  1. Identity — agent identity, capability advertisement, credentials
  2. Transport — how bytes move (IPC, Remote, TCP, A2A, Pub/Sub)
  3. Routing — where messages go (direct, topology, broadcast, content)
  4. Discovery — how agents find each other (mDNS, registry, manual)
  5. Application — user-facing API (NetworkManager, events)

Re-exports§

pub use connection::ClientInfo;
pub use connection::RequestContext;
pub use error::AgentNetworkError;
pub use handler::McpHandler;
pub use mcp_transport::ServerTransport;
pub use mcp_transport::StdioServerTransport;
pub use middleware::Middleware;
pub use middleware::MiddlewareChain;
pub use middleware::MiddlewareResult;
pub use registry::McpToolDef;
pub use registry::McpToolRegistry;
pub use registry::ToolHandler;
pub use server::McpServer;
pub use middleware::auth::AuthMiddleware;
pub use middleware::logging::LoggingMiddleware;
pub use middleware::rate_limit::RateLimitMiddleware;
pub use middleware::tool_filter::ToolFilterMiddleware;
pub use agent_manager::AgentInfo;
pub use agent_manager::AgentManager;
pub use agent_manager::AgentResult;
pub use agent_manager::SpawnConfig;
pub use agent_tools::AgentToolRegistry;
pub use client::AgentConfig;
pub use client::AgentNetworkClient;
pub use client::AgentNetworkClientError;
pub use identity::AgentCard;
pub use identity::AgentIdentity;
pub use identity::ProtocolId;
pub use network::ConnectionState;
pub use network::MessageEnvelope;
pub use network::MessageTarget;
pub use network::NetworkError;
pub use network::NetworkEvent;
pub use network::NetworkManager;
pub use network::NetworkManagerBuilder;
pub use network::Payload;
pub use network::TransportType;
pub use transport::Transport;
pub use transport::TransportAddress;
pub use transport::IpcTransport;
pub use transport::RemoteTransport;

Modules§

agent_manager
Agent lifecycle management. AgentManager trait and supporting types for agent lifecycle abstraction
agent_tools
Pre-built MCP tools for agent operations. Agent Management Tools for MCP
auth
Authentication for agent network connections.
client
Client for connecting to a remote agent network server.
connection
WebSocket/HTTP connection types.
discovery
Peer discovery — how agents find each other on the network.
error
Error types for the agent network crate.
handler
MCP request handler trait.
identity
Agent identity, capability advertisement, and credentials.
ipc
IPC (inter-process communication) socket protocol.
mcp_transport
MCP server transport (stdio).
middleware
Middleware pipeline (auth, logging, rate-limiting, tool filtering).
network
Core network types: message envelopes, events, and errors.
registry
MCP tool registry.
remote
Remote bridge and realtime protocol.
routing
Message routing — direct, broadcast, and content-based routing.
server
MCP server lifecycle.
traits
Common agent network traits. Trait abstractions for decoupling bridge crate from CLI-specific types
transport
Networking transport layer — pluggable transports for agent communication.