Skip to content

pradeepiyer/ray-agent

Repository files navigation

Ray Agent

AI Agent for Ray.

Principles

  • Reflection: Iterative reasoning within and outside the LLM.
  • Tool Calling: Diverse integrations with Ray environments.
  • Planning: Planning through the reasoning system, with optional support for todo tool.
  • Multi-agent Collaboration: Coordinated workflows among specialized agents.

Quick Start

# Install
uv sync

# Set API key
export OPENAI_API_KEY="sk-..."

# Run
uv run ray-agent

# Commands
/analyze @train.py          # Predict GPU requirements
/refactor @app.py           # Fix Ray anti-patterns with suggestions
/deploy @serve.py           # Generate KubeRay manifests
/debug discover             # Debug Ray workloads on GKE and Anyscale
/ask How to scale Ray?      # Search Ray knowledge base across docs, gihub, slack
/cluster show pods          # Manage k8s and Anyscale clusters

Features

  • OpenAI Responses API: Native tool-calling with structured outputs
  • Multi-source Input: Files (@file.py), inline code
  • Specialized Agents: Analyze, Refactor, Deploy, Debug, Ask, Cluster
  • Production Ready: Connection pooling, retry logic, async throughout

Installation

git clone https://github.com/pradeepiyer/ray-agent.git
cd ray-agent
uv sync

Configuration

Required:

export OPENAI_API_KEY="sk-..."

Optional:

export ANYSCALE_API_KEY="esecret_..."  # Anyscale platform
export SLACK_API_KEY="xoxb-..."        # Slack search
export PYLON_API_KEY="xoxb-..."        # Pylon search
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"  # GCP

Development

make help
General:
  test         - Run test suite with coverage (excludes integration)
  test-integration - Run integration tests (requires API keys)
  install      - Install ray-agent in development mode
  clean        - Remove build artifacts and cache files
  lint         - Run linter and fix issues with ruff and mypy
  sync-deps    - Sync uv dependencies and lock file
  console      - Run interactive chat console (default mode)
  serve        - Start HTTP server with REST and MCP protocols
  help         - Show this help message

Evaluation:
  eval         - Run full evaluation suite (all agents)
  eval-ask     - Run Ask evaluation
  eval-ask-quick - Quick Ask eval, single query
  eval-analyze - Run WorkloadAnalysis evaluation only
  eval-refactor - Run Refactor evaluation only
  eval-refactor-quick - Quick Refactor eval (subset of tests)
  eval-debug   - Run Debug evaluation only
  eval-debug-quick - Quick Debug eval (first scenario)
  eval-debug-record - Record a debug scenario for evaluation
  eval-quick   - Run quick evaluation (subset of tests)

Package Distribution:
  build        - Build wheel package (default)
  build-wheel  - Build wheel package only
  build-sdist  - Build source distribution only
  build-all    - Build both wheel and source distribution
  package-info - Show package information and files

Dependency Management:
  lock-deps    - Update dependency lock file
  check-deps   - Check if dependencies are up to date
  ci           - Run the same checks as GitHub CI (lint, format check, pyright, tests)

Documentation

Core Components

Agent Documentation

Requirements

  • Python 3.13+
  • uv package manager
  • OpenAI API key
  • kubectl (for cluster operations)
  • ripgrep (for source code analysis)

About

AI Agents for Ray: ask ray questions, analyze for resource requrements, refactor ray source, debug GKE and Anyscale Ray resource, cluster management for k8s and deploy ray jobs and services

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors