Agent Protocol • Rust AI Agent SDK

AgentProtocol: Minimal Protocol for agent implementations. This defines the essential interface that any agent must provide. It enables proper mocking and testing…

AgentProtocol

Defined in the protocols module.

Rust AI Agent SDK

Minimal Protocol for agent implementations. This defines the essential interface that any agent must provide. It enables proper mocking and testing without real LLM dependencies.

Diagram

Input Data

Agent: AgentProtocol

Output Result

Methods

name

rust
fn name(&self) -> &str

Get the agent’s name

chat

rust
fn chat(&self, prompt: &str) -> Result<String>

Synchronous chat with the agent

Parameters:

NameType
prompt&str

achat

rust
async fn achat(&self, prompt: &str) -> Result<String>

Asynchronous chat with the agent

Parameters:

NameType
prompt&str

Source

View on GitHub

praisonai/src/protocols/mod.rs at line 0


Related Documentation