Skip to content

Commit 363cf7e

Browse files
authored
feat(sandbox): add fc runtime support (#141)
1 parent d527573 commit 363cf7e

12 files changed

Lines changed: 1072 additions & 35 deletions

File tree

.github/workflows/integrated_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- name: Install dependencies
6262
run: |
6363
export PIP_DEFAULT_TIMEOUT=300
64-
pip install -q -e ".[dev,langgraph,agno,autogen,langchain_rag,llamaindex_rag,aliyun_tablestore_ext,memory_ext]"
64+
pip install -q -e ".[dev,langgraph,agno,autogen,langchain_rag,llamaindex_rag,aliyun_tablestore_ext,memory_ext,fc,agentrun]"
6565
6666
- name: Run integrated tests with coverage
6767
env:

cookbook/en/sandbox_advanced.md

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -162,26 +162,47 @@ To configure settings specific to Kubernetes in your sandbox server, ensure you
162162
| `K8S_NAMESPACE` | Kubernetes namespace to be used | `default` | Set the namespace for resource deployment |
163163
| `KUBECONFIG_PATH` | Path to the kubeconfig file | `None` | Specifies the kubeconfig location for cluster access |
164164

165-
### (Optional) AgentRun Settings
165+
#### (Optional) AgentRun Settings
166166

167167
[AgentRun](https://functionai.console.aliyun.com/cn-hangzhou/agent/) is a serverless intelligent Agent development framework launched by Alibaba Cloud. It provides a complete set of tools to help developers quickly build, deploy, and manage AI Agent applications. You can deploy the sandbox servers on AgentRun.
168168

169169
To configure settings specific to [AgentRun](https://functionai.console.aliyun.com/cn-hangzhou/agent/) in your sandbox server, ensure you set `CONTAINER_DEPLOYMENT=agentrun`. Consider adjusting the following parameters:
170170

171-
| Parameter | Description | Default | Notes |
172-
|-------------------------------| ------------------------ |----------------------------------|-------------------------------------------------------------------------------------------|
171+
| Parameter | Description | Default | Notes |
172+
|-------------------------------| ------------------------ |----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
173173
| `AGENT_RUN_ACCOUNT_ID` | Alibaba Cloud Account ID | Empty | Alibaba Cloud main account ID. Log in to the [RAM console](https://ram.console.aliyun.com/profile/access-keys) to get the Alibaba Cloud account ID and AK/SK |
174-
| `AGENT_RUN_ACCESS_KEY_ID` | Access Key ID | Empty | Alibaba Cloud AccessKey ID, requires `AliyunAgentRunFullAccess` permission |
175-
| `AGENT_RUN_ACCESS_KEY_SECRET` | Access Key Secret | Empty | Alibaba Cloud AccessKey Secret |
176-
| `AGENT_RUN_REGION_ID` | Deployment Region ID | Empty | AgentRun deployment region ID |
177-
| `AGENT_RUN_CPU` | CPU Specification | `2.0` | vCPU specification |
178-
| `AGENT_RUN_MEMORY` | Memory Specification | `2048` | Memory specification(MB) |
179-
| `AGENT_RUN_VPC_ID` | VPC ID | `None` | VPC network ID (optional) |
180-
| `AGENT_RUN_VSWITCH_IDS` | Switch ID List | `None` | VSwitch ID list (optional) |
181-
| `AGENT_RUN_SECURITY_GROUP_ID` | Security Group ID | `None` | Security group ID (optional) |
182-
| `AGENT_RUN_PREFIX` | Resource Name Prefix | `agentscope-sandbox` | Prefix for created resource names |
183-
| `AGENT_RUN_LOG_PROJECT` | SLS Log Project | `None` | SLS log project name (optional) |
184-
| `AGENT_RUN_LOG_STORE` | SLS Log Store | `None` | SLS log store name (optional) |
174+
| `AGENT_RUN_ACCESS_KEY_ID` | Access Key ID | Empty | Alibaba Cloud AccessKey ID, requires `AliyunAgentRunFullAccess` permission |
175+
| `AGENT_RUN_ACCESS_KEY_SECRET` | Access Key Secret | Empty | Alibaba Cloud AccessKey Secret |
176+
| `AGENT_RUN_REGION_ID` | Deployment Region ID | Empty | AgentRun deployment region ID |
177+
| `AGENT_RUN_CPU` | CPU Specification | `2.0` | vCPU specification |
178+
| `AGENT_RUN_MEMORY` | Memory Specification | `2048` | Memory specification (MB) |
179+
| `AGENT_RUN_VPC_ID` | VPC ID | `None` | VPC network ID (optional) |
180+
| `AGENT_RUN_VSWITCH_IDS` | Switch ID List | `None` | VSwitch ID list (optional) |
181+
| `AGENT_RUN_SECURITY_GROUP_ID` | Security Group ID | `None` | Security group ID (optional) |
182+
| `AGENT_RUN_PREFIX` | Resource Name Prefix | `agentscope-sandbox` | Prefix for created resource names |
183+
| `AGENT_RUN_LOG_PROJECT` | SLS Log Project | `None` | SLS log project name (optional) |
184+
| `AGENT_RUN_LOG_STORE` | SLS Log Store | `None` | SLS log store name (optional) |
185+
186+
#### (Optional) Function Compute (FC) Settings
187+
188+
[Function Compute](https://fcnext.console.aliyun.com/) (FC) is a serverless computing service that allows you to run your code without managing infrastructure. You can deploy sandbox servers on FC.
189+
190+
To configure settings specific to [FC](https://fcnext.console.aliyun.com/) in your sandbox server, ensure you set `CONTAINER_DEPLOYMENT=fc`. Consider adjusting the following parameters:
191+
192+
| Parameter | Description | Default | Notes |
193+
|-------------------------------| ------------------------ |----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
194+
| `FC_ACCOUNT_ID` | Alibaba Cloud Account ID | Empty | Alibaba Cloud main account ID. Log in to the [RAM console](https://ram.console.aliyun.com/profile/access-keys) to get the Alibaba Cloud account ID and AK/SK |
195+
| `FC_ACCESS_KEY_ID` | Access Key ID | Empty | Alibaba Cloud AccessKey ID, requires `AliyunFCFullAccess` permission |
196+
| `FC_ACCESS_KEY_SECRET` | Access Key Secret | Empty | Alibaba Cloud AccessKey Secret |
197+
| `FC_REGION_ID` | Deployment Region ID | Empty | FC deployment region ID |
198+
| `FC_CPU` | CPU Specification | `2.0` | vCPU specification |
199+
| `FC_MEMORY` | Memory Specification | `2048` | Memory specification (MB) |
200+
| `FC_VPC_ID` | VPC ID | `None` | VPC network ID (optional) |
201+
| `FC_VSWITCH_IDS` | Switch ID List | `None` | VSwitch ID list (optional) |
202+
| `FC_SECURITY_GROUP_ID` | Security Group ID | `None` | Security group ID (optional) |
203+
| `FC_PREFIX` | Resource Name Prefix | `agentscope-sandbox` | Prefix for created resource names |
204+
| `FC_LOG_PROJECT` | SLS Log Project | `None` | SLS log project name (optional) |
205+
| `FC_LOG_STORE` | SLS Log Store | `None` | SLS log store name (optional) |
185206

186207
### Loading Custom Sandbox
187208

0 commit comments

Comments
 (0)