https://github.com/jrcalgo/relayrl
A Multi-Agent Distributed Reinforcement Learning Framework primarily for Rust workflows
https://github.com/jrcalgo/relayrl
cli deep-reinforcement-learning distributed-system framework monorepo python-bindings tensor-types
Last synced: 21 days ago
JSON representation
A Multi-Agent Distributed Reinforcement Learning Framework primarily for Rust workflows
- Host: GitHub
- URL: https://github.com/jrcalgo/relayrl
- Owner: jrcalgo
- License: apache-2.0
- Created: 2025-09-25T06:03:46.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-01-12T20:38:22.000Z (2 months ago)
- Last Synced: 2026-01-13T00:04:58.665Z (2 months ago)
- Topics: cli, deep-reinforcement-learning, distributed-system, framework, monorepo, python-bindings, tensor-types
- Language: Rust
- Homepage: https://crates.io/crates/relayrl_framework
- Size: 1.15 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RelayRL
**Multi-Agent Distributed Reinforcement Learning Framework**
[](https://www.rust-lang.org/)
[](LICENSE)
[]()
*A Rust-native framework for scalable deep reinforcement learning experiments*
---
## Overview
RelayRL is a **monorepo** containing a suite of Rust crates designed for distributed multi-agent reinforcement learning. Built with a Rust-first philosophy, the framework prioritizes performance, type safety, and scalability while maintaining an ergonomic API for single- and multi-agent learning environments.
> **Alpha Software:** This project is under active development. Expect breaking changes and incomplete functionality.
### Key Highlights
- **Pure Rust Core** — No Python dependencies in the framework layer
- **Multi-Actor Native** — Concurrent actor execution with router-based message dispatching
- **Backend Agnostic** — Generic tensor interface via Burn (supports `NdArray`, `Tch` for CPU/CUDA/MPS)
- **Modular Architecture** — Decoupled layers for client, server, transport, and data handling
- **Robust Error Handling** — Proper error propagation instead of panics
## Crates
| Crate | Version | Description |
|-------|---------|-------------|
| [`relayrl_framework`](crates/relayrl_framework/) | `0.5.0-alpha` | Core library with client runtime, server scaffolding, and utilities |
| [`relayrl_types`](crates/relayrl_types/) | `0.4.0` | Data types, tensor containers, and codec pipeline (compression, encryption, integrity) |
| [`relayrl_algorithms`](crates/relayrl_algorithms/) | `0.1.0` | RL algorithms (PPO, REINFORCE) — *scaffolding only* |
| [`relayrl_python`](crates/relayrl_python/) | `0.1.0` | Python bindings via PyO3 — *scaffolding only* |
| [`relayrl_cli`](crates/relayrl_cli/) | `0.1.0` | Command-line interface with gRPC — *scaffolding only* |
## Platform Support
| Platform | Status |
|----------|--------|
| macOS (Apple Silicon) | Tested |
| Linux (Ubuntu) | Tested |
| Windows 10 (x86_64) | Tested |
| Windows 11 (x86_64) | Not tested (yet) |
## Quick Start
### Prerequisites
- Rust 2024 edition (`rustup update`)
- For GPU support: CUDA toolkit or MPS-compatible macOS
### Installation
In your Cargo.toml:
```toml
relayrl_framework = "0.5.0-alpha"
relayrl_types = "0.3.21"
```
### Basic Usage
```rust
use relayrl_framework::prelude::network::{RelayRLAgent, AgentBuilder};
use relayrl_framework::prelude::types::{ModelModule, DeviceType};
use burn_ndarray::NdArray;
use burn_tensor::{Tensor, Float};
#[tokio::main]
async fn main() -> Result<(), Box> {
// Build agent with 4 concurrent actors
let (mut agent, params) = AgentBuilder::::builder()
.actor_count(4)
.default_model(ModelModule::::load_from_path("model.pt".into()))
.build().await?;
// Start the agent runtime
agent.start(
params.actor_count,
params.router_scale,
params.default_device,
params.default_model,
params.config_path
).await?;
// Request actions from actors
let obs = Tensor::::zeros([1, 4], &Default::default());
let ids = agent.get_actor_ids()?;
let actions = agent.request_action(ids, obs, None, 1.0).await?;
// Graceful shutdown
agent.shutdown().await?;
Ok(())
}
```
For more usage details, see the [Framework README](crates/relayrl_framework/README.md) and the [Client Guide](CLIENT_GUIDE.md).
## Framework Roadmap
### Near Term
- **v0.5.0** — Client ZMQ transport, PostgreSQL/SQLite database layer, comprehensive testing
- **v0.6.0** — Training Server with online/offline workflows, algorithm integration
### Medium Term
- **v0.7.0** — Inference Server for remote inference capabilities
- **v0.8.0** — Full system integration, performance optimizations, API stabilization
### Long Term
- **v0.9.0 / v1.0.0** — Production stability guarantees
- `relayrl_algorithms` — Complete RL algorithm implementations
- `relayrl_cli` — Language-agnostic deployable gRPC interface
## Contributing
Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) before submitting PRs.
## License
Licensed under [Apache License 2.0](LICENSE).