Relax: Agent for Claude Code

.opencode/agents/launcher-expert.md

launcher-expert is an agent for Claude Code, OpenCode from redai-infra/Relax. It costs 38 tokens per session (1,052 once invoked), scanned A, original, Apache-2.0.

A specialist guide for Ray service deployment and orchestration. Ray is a system for running Python workloads across multiple processes or machines, including workloads that use GPUs.

In plain words
What is it for?
Use it for Ray Serve deployments, placement groups, rollouts, service management, health checks, and GPU allocation issues.
Why use it?
It helps diagnose service lifecycles, resource allocation, health monitoring, job launches, and GPU placement in the Relax project.

Agent for Claude CodeOpenCode

Written for OpenCode and Claude Code: installed under .opencode/, but also a Claude Code subagent (agents/*.md). Also seen: mentions subagents; mentions AGENTS.md.

This is redai-infra/Relax's own configuration. It tells Claude Code and OpenCode how to work on Relax itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Relax configures →

Reuse

Borrowing it

Nothing to install: this file belongs to redai-infra/Relax. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/redai-infra/Relax/main/.opencode/agents/launcher-expert.md
Clone the repo
git clone --depth 1 https://github.com/redai-infra/Relax

Made for: Claude Code, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for launcher-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/redai-infra/relax/launcher-expert/github.svg)](https://agentmods.dev/agents/redai-infra/relax/launcher-expert)
Your own site
<a href="https://agentmods.dev/agents/redai-infra/relax/launcher-expert"><img src="https://agentmods.dev/badge/agents/redai-infra/relax/launcher-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for launcher-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/redai-infra/relax/launcher-expert"><img src="https://agentmods.dev/badge/agents/redai-infra/relax/launcher-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,052 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.01052
Opus 5 $0.00019 $0.00526
Sonnet 5 $0.00008 $0.00210
Haiku 4.5 $0.00004 $0.00105

Measured 10d ago against content hash 6bcc841e7e9a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

launcher-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.opencode/agents/launcher-expert.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Launcher & Orchestration Expert

Relax 的服务编排、部署生命周期、资源分配和健康管理。For project-level rules see AGENTS.md. Ray 底层细节见 ray-expert.

不用于:RL 算法 (algorithm-expert)、Megatron (megatron-expert)、FSDP (fsdp-expert).

三层架构

位置 职责
Controller Controller relax/core/controller.py 顶层编排、训练循环
Service Service relax/core/service.py 生命周期、placement groups
Implementation Actor, Rollout, etc. relax/components/ 具体训练/推理组件

Controller 初始化

Controller.__init__():

  1. _initialize_data_system() — TransferQueue
  2. 创建 DCS coordinator
  3. 部署 Metrics Service(可选)
  4. 注册所有 Ray Serve 服务
  5. 启动健康监控

Service 部署

每个 Service 创建 placement group → serve.run() 部署 → 返回 handle。

服务角色actor · critic · rollout · advantages · genrm · actor_fwd · agent_loop

资源分配

--resource '{"actor": [1, 8], "rollout": [1, 8], ...}'   # [num_serves, num_gpus]
--colocate                                                  # Actor/Rollout 共享 GPU

Colocate 模式:共享 PG + sleep/wake 机制切换训练/推理,需 --offload-train.

RolloutManager

位置: relax/distributed/ray/rollout.py

管理 SGLang 推理引擎:

  • 引擎类型: regular · prefill · decode · placeholder
  • 生命周期: 启动 SGLang → 健康探测 → 生成样本 → 权重更新 → 可选重启/缩放

关联: relax/distributed/ray/actor_group.py (RayTrainGroup)

健康监控

位置: relax/utils/health_system.pyHealthManager

  • 周期性 ping 所有已注册服务
  • 不健康时触发 on_unhealthy 回调自动恢复
  • RolloutManager 使用 concurrency_groups 隔离健康检查 RPC

数据管道

RolloutDataSource → RolloutManager → SGLang → 奖励计算
  → TransferQueueController → SimpleStorageUnit
    → TransferQueueClient → TrainRayActor

存储后端: ray_storage_client (默认) · mooncake_client · yuanrong_client
采样器: grpo_group_n_sampler · rank_aware_sampler · sequential_sampler

故障排除

症状 可能原因 首要步骤
Job 启动失败 Ray 集群未初始化 ray status 检查
GPU 分配错误 GPU 不足或 PG 冲突 对比 GPU 总数 vs 请求量
Service 超时 初始化慢或 OOM 增大超时;检查 GPU 内存
Rollout 引擎崩溃 SGLang 服务失败 检查 SGLang 日志;验证模型路径
权重同步超时 NCCL 通信失败 检查网络;尝试 --colocate
TransferQueue 空 Rollout 未产出数据 验证 rollout 服务健康

Read the full file on GitHub · 105 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 105 lines · 38 tokens per session scan A 6bcc841e7e9a

Subscribe to this mod's changes

launcher-expert is an agent published in the GitHub repository redai-infra/Relax (580 stars, last pushed 12d ago), licensed Apache-2.0. It adds 38 tokens to every session and 1,052 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

service-mesh-expert

Expert service mesh architect specializing in Istio, Linkerd, and cloud-native networking patterns. Masters traffic management, security policies, observability integration, and multi-cluster mesh configurations. Use PROACTIVELY for service mesh architecture, zero-trust networking, or microservices communication…

wshobson/agents · 63 tokens

serv

Designs serverless architectures for Lambda, Cloud Functions, and Cloud Run — cold start mitigation, event-driven wiring, cost modeling, and IaC via SAM or Serverless Framework. Use when building or auditing serverless workloads. Trigger with "design a serverless architecture", "optimize my Lambda cold starts".

jeremylongshore/tons-of-skills-marketplace · 64 tokens

hono-builder

Expert Hono developer for implementing routes, middleware, handlers, and integrations with Cloudflare Workers bindings.

smicolon/ai-kit · 24 tokens

integration-engineer

Integration engineer. Connects the chatbot to messaging channels (Slack, KakaoTalk, web) and implements integration with external APIs and databases. Responsible for deployment and infrastructure.

revfactory/harness-100 · 38 tokens

drupal-ddev

Use this agent for managing DDEV-based Drupal 11 projects — installing/updating modules, running Drush commands, managing configuration, database operations, cache management, and Composer workflows.

siva01c/claude-plugins · 41 tokens

render-expert

Expert in Render.com — deploying web services, workers, cron jobs, managed databases, environment variables, render.yaml (Infrastructure as Code), and production best practices. Use to configure, optimize, or debug deployments on Render.

alexmmatos/arthur-mcp · 48 tokens