Skip to content

Ray Integration

This section contains documentation for Rustic AI's Ray integration, which provides distributed execution capabilities for scalable agent systems.

Overview

Ray is a unified framework for scaling AI and Python applications. The Rustic AI Ray integration allows you to:

  • Scale your agent systems across multiple machines
  • Distribute agent workloads efficiently
  • Manage resources adaptively based on demand
  • Build high-performance, resilient multi-agent applications

Features

  • Distributed Execution Engine - Run agents across a Ray cluster
  • Resource Management - Allocate CPU, GPU, and memory resources intelligently
  • Fault Tolerance - Recover from node failures automatically
  • Dynamic Scaling - Add or remove compute resources as needed

Getting Started

To use the Ray integration, you'll need:

  1. Ray installed in your environment
  2. A Ray cluster (can be local or distributed)
  3. Rustic AI core framework configured properly

Basic Example

from rustic_ai.core.guild.builders import GuildBuilder
from rustic_ai.ray.execution_engine import RayExecutionEngine

# Configure a guild to use Ray for execution
guild_builder = GuildBuilder(guild_name="DistributedGuild") \
    .set_description("A guild using Ray for distributed execution") \
    .set_execution_engine("rustic_ai.ray.execution_engine.RayExecutionEngine") \
    .set_execution_engine_config({
        "address": "auto",  # Connect to existing Ray cluster
        "resources_per_agent": {"CPU": 1, "GPU": 0.1}
    })

# Add agents and launch
# ...

Documentation

Comprehensive documentation for all Ray integration features is currently under development. Please check back for updates as we expand this section.