Skip to main content

GatewayProtocol

Defined in the gateway module.
Rust AI Agent SDK Protocol for gateway/control plane implementations. The gateway coordinates communication between clients and agents, manages sessions, and provides health/presence tracking.

Methods

is_running

Whether the gateway is currently running.

port

Port the gateway is listening on.

host

Host the gateway is bound to.

start

Start the gateway server.

stop

Stop the gateway server.

register_agent

Register an agent with the gateway. Parameters:

unregister_agent

Unregister an agent from the gateway. Parameters:

get_agent

Get a registered agent by ID. Parameters:

list_agents

List all registered agent IDs.

create_session

Create a new session. Parameters:

get_session

Get a session by ID. Parameters:

close_session

Close a session. Parameters:

list_sessions

List session IDs, optionally filtered by agent. Parameters:

emit

Emit an event to registered handlers. Parameters:

broadcast

Broadcast an event to all connected clients. Parameters:

health

Get gateway health status.

Source

View on GitHub

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

Rust Gateway