AI Agent for Ray.
- 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.
# 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- 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
git clone https://github.com/pradeepiyer/ray-agent.git
cd ray-agent
uv syncRequired:
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" # GCPmake 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)- Agents - Core orchestration
- Console - CLI interface
- API - Agent API, REST and MCP
- Config - Configuration system
- Prompts - YAML templates
- Clients - API clients
- Analyze Agent - GPU requirement prediction
- Refactor Agent - Ray anti-pattern detection and automatic refactoring
- Debug Agent - Ray workload debugging
- Ask Agent - Ray knowledge base search
- Cluster Agent - K8s and Anyscale cluster management
- Deploy Agent - KubeRay manifest generation (In Progress)
- Python 3.13+
- uv package manager
- OpenAI API key
- kubectl (for cluster operations)
- ripgrep (for source code analysis)