> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# protocols • Rust AI Agent SDK

> Protocol System Module

# protocols

<Badge color="orange">Rust AI Agent SDK</Badge>

Protocol System Module

This module provides protocol definitions for agent implementations:

* `AgentProtocol` - Minimal protocol for agent implementations
* `RunnableAgentProtocol` - Extended protocol with run/start methods
* `AgentOSProtocol` - Agent OS integration protocol

# Example

```ignore theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
use praisonai::protocols::*;
```

## Classes

<CardGroup cols={2}>
  <Card title="MemoryMessage" icon="brackets-curly" href="../classes/MemoryMessage">
    A message stored in memory.
  </Card>

  <Card title="LlmMessage" icon="brackets-curly" href="../classes/LlmMessage">
    An LLM message.
  </Card>

  <Card title="LlmResponse" icon="brackets-curly" href="../classes/LlmResponse">
    An LLM response.
  </Card>

  <Card title="ToolCall" icon="brackets-curly" href="../classes/ToolCall">
    A tool call from the LLM.
  </Card>

  <Card title="TokenUsage" icon="brackets-curly" href="../classes/TokenUsage">
    Token usage statistics.
  </Card>

  <Card title="ToolSchema" icon="brackets-curly" href="../classes/ToolSchema">
    Tool schema for LLM.
  </Card>

  <Card title="AgentOSConfig" icon="brackets-curly" href="../classes/AgentOSConfig">
    Agent OS configuration.
  </Card>

  <Card title="AgentMetrics" icon="brackets-curly" href="../classes/AgentMetrics">
    Agent metrics for reporting.
  </Card>

  <Card title="BotMessage" icon="brackets-curly" href="../classes/BotMessage">
    A bot message.
  </Card>

  <Card title="BotResponse" icon="brackets-curly" href="../classes/BotResponse">
    A bot response.
  </Card>

  <Card title="BotAttachment" icon="brackets-curly" href="../classes/BotAttachment">
    A bot attachment.
  </Card>

  <Card title="BotAction" icon="brackets-curly" href="../classes/BotAction">
    A bot action/button.
  </Card>

  <Card title="AgentProtocol" icon="brackets-curly" href="../classes/AgentProtocol">
    Minimal Protocol for agent implementations. This defines the essential interface that any agent must provide. It enables proper mocking and testing...
  </Card>

  <Card title="RunnableAgentProtocol" icon="brackets-curly" href="../classes/RunnableAgentProtocol">
    Extended Protocol for agents that support run/start methods.
  </Card>

  <Card title="ToolProtocol" icon="brackets-curly" href="../classes/ToolProtocol">
    Protocol for tool implementations.
  </Card>

  <Card title="MemoryProtocol" icon="brackets-curly" href="../classes/MemoryProtocol">
    Protocol for memory implementations.
  </Card>

  <Card title="LlmProtocol" icon="brackets-curly" href="../classes/LlmProtocol">
    Protocol for LLM provider implementations.
  </Card>

  <Card title="AgentOSProtocol" icon="brackets-curly" href="../classes/AgentOSProtocol">
    Protocol for Agent OS integration.
  </Card>

  <Card title="BotProtocol" icon="brackets-curly" href="../classes/BotProtocol">
    Bot protocol for chat integrations.
  </Card>
</CardGroup>
