Skip to content

[RFC] Add OpenYuanrong & AKernel sandbox system as deployment backend #31

@ShengDev

Description

@ShengDev

[RFC] Add OpenYuanrong & AKernel sandbox system as deployment backend

Summary

Currently, uni-agent supports local deployment, vefaas deployment and Modal deployment as deployment backends. We intend to introduce a minimal adaptation layer and configuration options to allow uni-agent to utilize OpenYuanrong & AKernel sandbox system as an alternative deployment backend.

Motivation

OpenYuanrong and AKernel sandbox system constitutes a next-generation AI infrastructure, specifically architected for large-scale reinforcement learning training workloads. It features AI-native DevOps, deploy-anywhere portability, advanced enterprise capabilities including checkpoint/restore and image acceleration, plus a friendly SDK/CLI for agent ecosystems.

Image

Its key features include:

Isolation in RL training: Prevent damage to the main process or unauthorized resource access.
Large-scale sandbox management: Operates stably on server clusters with up to 10000 sandboxes
Rapid elasticity: Start 1000 sandboxes within 1 second with rapid cold-start tech

This integration aims to meet the needs of VeRL's agent-based reinforcement learning. It allows to execute codes in a totally isolated environment, to run a large number of sandboxes simultaneously and to start sandboxes in a very short time.

Design Overview

Image

The whole process follows the same paradigm as other deployments.

  1. create sandbox
    Uni agent creates sandbox using AKernel sdk. Then openYuanrong will create a sandbox according to the configuration. In swe use case, swe server will be launched. Once the above steps are done and the service has started, the client will be able to get the server endpoint.

  2. communicate with swe server
    Uni agent communicate with swe server via endpoint abtained in the previous step.

  3. kill sandbox
    When task is done, uni agent can kill sandbox using AKernel sdk.

Architecture

uni_agent
└── deployment
      ├── local
      ├── modal
      ├── vefaas
      └── openyuanrong
           └── deployment.py

yr/deployment.py is an adaptation layer for this new deployment backend.

Openyuanrong deployment configuration (YRDeploymentConfig) will be introduced, which contains all configs needed by openyuanrong deployment. In addition, an ssl_verify flag to indicate whether do ssl verification between uni agent and remote swe server or not(default true) is introduced in remote_runtime.py.

To use yr deployment:

set type of deployment as yr

AgentEnvConfig(**{
    "deployment": {
        "type": "yr",
        # backend-specific fields go here
    }
})

set connection infos

export OPENYUANRONG_SERVER_ADDRESS=<ip:port>
export OPENYUANRONG_TOKEN=<token>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions