protocols • Rust AI Agent SDK
Protocol System Module
protocols
Rust AI Agent SDK
Protocol System Module
This module provides protocol definitions for agent implementations:
AgentProtocol– Minimal protocol for agent implementationsRunnableAgentProtocol– Extended protocol with run/start methodsAgentOSProtocol– Agent OS integration protocol
Example
use praisonai::protocols::AgentProtocol;
struct MockAgent {
name: String,
}
impl AgentProtocol for MockAgent {
fn name(&self) -> &str { &self.name }
fn chat(&self, prompt: &str) -> String { "Response".to_string() }
}Import
use praisonai::protocols::*;Classes
A message stored in memory.
LlmMessageAn LLM message.
LlmResponseAn LLM response.
ToolCallA tool call from the LLM.
TokenUsageToken usage statistics.
ToolSchemaTool schema for LLM.
AgentOSConfigAgent OS configuration.
AgentMetricsAgent metrics for reporting.
BotMessageA bot message.
BotResponseA bot response.
BotAttachmentA bot attachment.
BotActionA bot action/button.
AgentProtocolMinimal Protocol for agent implementations. This defines the essential interface that any agent must provide. It enables proper mocking and testing…
RunnableAgentProtocolExtended Protocol for agents that support run/start methods.
ToolProtocolProtocol for tool implementations.
MemoryProtocolProtocol for memory implementations.
LlmProtocolProtocol for LLM provider implementations.
AgentOSProtocolProtocol for Agent OS integration.
BotProtocolBot protocol for chat integrations.