> ## 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.

# gateway • Rust AI Agent SDK

> Gateway Module for PraisonAI Rust SDK

# gateway

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

Gateway Module for PraisonAI Rust SDK

Defines protocols and types for gateway/control plane implementations.
These enable multi-agent coordination, session management, and real-time communication.

# Example

```rust,ignore theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
use praisonai::gateway::{GatewayEvent, EventType, GatewayMessage};

let event = GatewayEvent::new(EventType::Message)
.data(serde_json::json!({"text": "Hello"}))
.source("agent-1");

let message = GatewayMessage::new("Hello!", "user-1", "session-1");
```

## Import

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

## Classes

<CardGroup cols={2}>
  <Card title="GatewayEvent" icon="brackets-curly" href="../classes/GatewayEvent">
    A gateway event with metadata.
  </Card>

  <Card title="GatewayMessage" icon="brackets-curly" href="../classes/GatewayMessage">
    A message sent through the gateway.
  </Card>

  <Card title="GatewayConfig" icon="brackets-curly" href="../classes/GatewayConfig">
    Configuration for a gateway.
  </Card>

  <Card title="GatewayHealth" icon="brackets-curly" href="../classes/GatewayHealth">
    Gateway health status.
  </Card>

  <Card title="GatewaySessionProtocol" icon="brackets-curly" href="../classes/GatewaySessionProtocol">
    Protocol for gateway session management. Sessions track conversations between clients and agents, maintaining state and message history.
  </Card>

  <Card title="GatewayClientProtocol" icon="brackets-curly" href="../classes/GatewayClientProtocol">
    Protocol for gateway client connections. Clients are external connections (WebSocket, HTTP, etc.) that communicate with agents through the gateway.
  </Card>

  <Card title="GatewayProtocol" icon="brackets-curly" href="../classes/GatewayProtocol">
    Protocol for gateway/control plane implementations. The gateway coordinates communication between clients and agents, manages sessions, and provides...
  </Card>

  <Card title="EventType" icon="brackets-curly" href="../classes/EventType">
    Standard gateway event types.
  </Card>
</CardGroup>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Gateway" icon="tower-broadcast" href="/docs/rust/gateway" />
</CardGroup>
