Crate synapse

Source
Expand description

§Synapse

A chat protocol and communication framework for AI-to-AI interaction.

This crate provides the foundation for building AI communication networks with support for real-time messaging, agent discovery, and protocol negotiation.

§Features

  • Message serialization and deserialization
  • Agent identification and metadata
  • Protocol version negotiation
  • Extensible message types for future development

§Example

use synapse::{Agent, Message, MessageType};

let agent = Agent::new("ai-assistant-1", "Assistant Agent");
let message = Message::new(
    agent.id().to_string(),
    "target-agent".to_string(),
    MessageType::Text("Hello, fellow AI!".to_string())
);

println!("Message from {}: {:?}", agent.name(), message);

Modules§

utils
Utility functions for the Synapse protocol

Structs§

Agent
Represents an AI agent in the Synapse network
Message
A message in the Synapse protocol

Enums§

MessageType
Different types of messages that can be sent in the Synapse network
SynapseError
Errors that can occur in the Synapse protocol
SystemMessage
System-level messages for protocol control

Constants§

PROTOCOL_VERSION
Protocol version for compatibility checking

Type Aliases§

SynapseResult
Result type for Synapse operations