Skip to content

protocols

Multi-protocol mesh model with formal graph representation, routing algorithms, workflow validation, and composable protocol transformers.

Formal protocol model for multi-protocol mesh.

Implements the formal model with the following components:

  • G = (V, E, P, Φ, Γ): Protocol graph model.
  • Protocol-Aware Dijkstra: Optimal routing with translation costs.
  • Semantic Preservation: Round-trip verification.
  • Formal Specifications: Protocol routing property verification.

Example::

from agenticraft_foundation.protocols import (
    ProtocolGraph, ProtocolAwareDijkstra, SemanticPreservationVerifier,
)

graph = ProtocolGraph()
graph.add_agent("agent1", ["code_execution"], {ProtocolName.MCP})
graph.add_agent("agent2", ["task_delegation"], {ProtocolName.A2A})
graph.add_edge("agent1", "agent2", {ProtocolName.MCP, ProtocolName.A2A})

Submodules

Module Description
graph Protocol graph \(G = (V, E, P, \Phi, \Gamma)\)
routing Dijkstra, BFS, and resilient routing algorithms
semantic_routing Capability-based semantic routing
compatibility Protocol compatibility matrix and translation costs
cost Path cost calculation with configurable edge cost models
affinity Protocol affinity scoring per agent-protocol pair
workflow Workflow model \(W = (T, \prec, \rho)\) with validation
transformers Composable protocol message transformers
semantic Semantic routing implementations
specifications Formal protocol specifications