
Aliyun Fc Agentrun
- 53 installs
- 396 repo stars
- Updated July 18, 2026
- cinience/alicloud-skills
Manage Alibaba Cloud Function Compute AgentRun runtimes, sandboxes, model services, memory, and credentials via OpenAPI.
About
Uses the Function Compute AgentRun OpenAPI to create and manage agent runtimes, endpoints, sandboxes, model services, and credentials. A developer uses it to provision and troubleshoot AgentRun infrastructure for running agents.
- Runtime -> version -> endpoint provisioning flow
- Regional endpoints and ROA SignatureV1 handled via SDK/Explorer
Aliyun Fc Agentrun by the numbers
- 53 all-time installs (skills.sh)
- Ranked #7,039 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/cinience/alicloud-skills --skill aliyun-fc-agentrunAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 53 |
|---|---|
| repo stars | ★ 396 |
| Last updated | July 18, 2026 |
| Repository | cinience/alicloud-skills ↗ |
What it does
Manage Alibaba Cloud Function Compute AgentRun runtimes, sandboxes, model services, memory, and credentials via OpenAPI.
Files
Category: service
Function Compute AgentRun (OpenAPI)
Use AgentRun OpenAPI (ROA) to manage runtimes, sandboxes, model services, memory, and credentials.
Prerequisites
- AccessKey via RAM user (least privilege).
- Select the correct regional endpoint (see
references/endpoints.md). If unsure, choose the most reasonable region for the task or ask the user. - Use OpenAPI Explorer or official SDK to avoid manual signing (ROA requires SignatureV1).
Workflow
1) Choose region endpoint (agentrun.cn-<region>.aliyuncs.com). 2) Create runtime → publish version → create runtime endpoint. 3) Create sandbox/template if needed. 4) Configure credentials and model services as required. 5) Query resources for troubleshooting.
API Groups
See references/api_overview.md for the full API list and grouping.
Script quickstart
python skills/compute/fc/aliyun-fc-agentrun/scripts/quickstart.pyEnvironment variables:
AGENTRUN_ENDPOINTALIBABACLOUD_ACCESS_KEY_IDALIBABACLOUD_ACCESS_KEY_SECRETOUTPUT_DIR(optional)
Runtime flow script
AGENTRUN_RUNTIME_NAME="my-runtime" \\
AGENTRUN_RUNTIME_ENDPOINT_NAME="my-runtime-endpoint" \\
python skills/compute/fc/aliyun-fc-agentrun/scripts/runtime_flow.pyEnvironment variables:
AGENTRUN_ENDPOINTALIBABACLOUD_ACCESS_KEY_IDALIBABACLOUD_ACCESS_KEY_SECRETAGENTRUN_RUNTIME_NAMEAGENTRUN_RUNTIME_ENDPOINT_NAMEAGENTRUN_RUNTIME_DESC(optional)OUTPUT_DIR(optional)
Cleanup script
AGENTRUN_RUNTIME_ID="runtime-id" \\
AGENTRUN_RUNTIME_ENDPOINT_ID="endpoint-id" \\
python skills/compute/fc/aliyun-fc-agentrun/scripts/cleanup_runtime.pyEnvironment variables:
AGENTRUN_ENDPOINTALIBABACLOUD_ACCESS_KEY_IDALIBABACLOUD_ACCESS_KEY_SECRETAGENTRUN_RUNTIME_IDAGENTRUN_RUNTIME_ENDPOINT_IDOUTPUT_DIR(optional)
SDK Notes
See references/sdk.md for SDK acquisition guidance.
Output Policy
If you store any generated files or responses, write them under: output/compute-fc-agentrun/.
Validation
mkdir -p output/aliyun-fc-agentrun
for f in skills/compute/fc/aliyun-fc-agentrun/scripts/*.py; do
python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/aliyun-fc-agentrun/validate.txtPass criteria: command exits 0 and output/aliyun-fc-agentrun/validate.txt is generated.
Output And Evidence
- Save artifacts, command outputs, and API response summaries under
output/aliyun-fc-agentrun/. - Include key parameters (region/resource id/time range) in evidence files for reproducibility.
References
- API overview and operation list:
references/api_overview.md - Regional endpoints:
references/endpoints.md - SDK guidance:
references/sdk.md
- Source list:
references/sources.md
interface:
display_name: "Alibaba Cloud Compute FC Agentrun"
short_description: "FC AgentRun runtime and endpoint ops"
default_prompt: "Use $aliyun-fc-agentrun to complete this compute/fc task on Alibaba Cloud."
AgentRun OpenAPI 概览
以下操作来自 AgentRun OpenAPI 概览页,按功能分组。
Agent 运行时
- CreateAgentRuntime
- GetAgentRuntime
- UpdateAgentRuntime
- DeleteAgentRuntime
- ListAgentRuntimes
- CreateAgentRuntimeEndpoint
- ListAgentRuntimeEndpoints
- GetAgentRuntimeEndpoint
- UpdateAgentRuntimeEndpoint
- DeleteAgentRuntimeEndpoint
- PublishRuntimeVersion
- ListAgentRuntimeVersions
Sandbox 沙箱
沙箱模板管理:
- CreateTemplate
- GetTemplate
- ListTemplates
- UpdateTemplate
- DeleteTemplate
- StopTemplateMCP
- ActivateTemplateMCP
沙箱实例管理:
- CreateSandbox
- GetSandbox
- ListSandboxes
- StopSandbox
- DeleteSandbox
模型管理
- CreateModelService
- UpdateModelService
- GetModelService
- DeleteModelService
- ListModelServices
- CreateModelProxy
- UpdateModelProxy
- GetModelProxy
- DeleteModelProxy
- ListModelProxies
记忆存储
- GetMemoryCollection
- UpdateMemoryCollection
- DeleteMemoryCollection
- CreateMemoryCollection
- ListMemoryCollections
其他
- GetCredential
- UpdateCredential
- ListCredentials
- CreateCredential
- DeleteCredential
- GetAccessToken
- CreateKnowledgeBase
- UpdateKnowledgeBase
- DeleteKnowledgeBase
- GetKnowledgeBase
- ListKnowledgeBases
- ListModelProviders
- DeleteCustomDomain
- ListCustomDomains
- CreateCustomDomain
- GetCustomDomain
- UpdateCustomDomain
待下线
浏览器沙箱:
- CreateBrowser
- ListBrowsers
- GetBrowser
- DeleteBrowser
代码解释器:
- CreateCodeInterpreter
- ListCodeInterpreters
- GetCodeInterpreter
- DeleteCodeInterpreter
AgentRun OpenAPI 服务地址
来自官方文档的 AgentRun OpenAPI 服务地址(公网与 VPC):
| Endpoint | Region Id |
|---|---|
| agentrun.cn-beijing.aliyuncs.com | cn-beijing |
| agentrun.cn-shanghai.aliyuncs.com | cn-shanghai |
| agentrun.cn-hangzhou.aliyuncs.com | cn-hangzhou |
| agentrun.cn-shenzhen.aliyuncs.com | cn-shenzhen |
| agentrun.ap-southeast-1.aliyuncs.com | ap-southeast-1 |
| agentrun-vpc.cn-beijing.aliyuncs.com | cn-beijing (VPC) |
| agentrun-vpc.cn-shanghai.aliyuncs.com | cn-shanghai (VPC) |
| agentrun-vpc.cn-hangzhou.aliyuncs.com | cn-hangzhou (VPC) |
| agentrun-vpc.cn-shenzhen.aliyuncs.com | cn-shenzhen (VPC) |
| agentrun-vpc.ap-southeast-1.aliyuncs.com | ap-southeast-1 (VPC) |
AgentRun SDK 说明
- 建议使用 OpenAPI Explorer 生成 SDK 或示例代码。
- 通过 Explorer 选择接口后可下载多语言 SDK 调用示例。
官方文档来源(用于后续更新) ============================
- (暂无外部文档链接)
import os
import sys
import json
from pathlib import Path
def get_env(*names: str, default: str | None = None) -> str:
for name in names:
value = os.getenv(name)
if value:
return value
if default is not None:
return default
print(f"Missing env var: {' / '.join(names)}", file=sys.stderr)
sys.exit(1)
def get_optional_env(*names: str) -> str | None:
for name in names:
value = os.getenv(name)
if value:
return value
return None
def main() -> None:
"""Delete runtime endpoint then delete runtime."""
try:
from alibabacloud_agentrun20250910.client import Client as AgentRunClient
from alibabacloud_agentrun20250910 import models as agentrun_models
from alibabacloud_tea_openapi import models as open_api_models
except Exception:
print(
"Missing AgentRun SDK. Generate or install SDK from OpenAPI Explorer.",
file=sys.stderr,
)
sys.exit(1)
endpoint = get_env("AGENTRUN_ENDPOINT")
access_key_id = get_env(
"ALIBABACLOUD_ACCESS_KEY_ID",
"ALIBABA_CLOUD_ACCESS_KEY_ID",
"ALICLOUD_ACCESS_KEY_ID",
)
access_key_secret = get_env(
"ALIBABACLOUD_ACCESS_KEY_SECRET",
"ALIBABA_CLOUD_ACCESS_KEY_SECRET",
"ALICLOUD_ACCESS_KEY_SECRET",
)
security_token = get_optional_env(
"ALIBABACLOUD_SECURITY_TOKEN",
"ALIBABA_CLOUD_SECURITY_TOKEN",
"ALICLOUD_SECURITY_TOKEN",
)
config = open_api_models.Config(
access_key_id=access_key_id,
access_key_secret=access_key_secret,
endpoint=endpoint,
)
if security_token:
config.security_token = security_token
client = AgentRunClient(config)
runtime_id = get_env("AGENTRUN_RUNTIME_ID")
runtime_endpoint_id = get_env("AGENTRUN_RUNTIME_ENDPOINT_ID")
delete_endpoint_req = agentrun_models.DeleteAgentRuntimeEndpointRequest(
runtime_id=runtime_id,
endpoint_id=runtime_endpoint_id,
)
delete_endpoint_resp = client.delete_agent_runtime_endpoint(delete_endpoint_req)
delete_runtime_req = agentrun_models.DeleteAgentRuntimeRequest(runtime_id=runtime_id)
delete_runtime_resp = client.delete_agent_runtime(delete_runtime_req)
output_dir = Path(os.getenv("OUTPUT_DIR", "output")) / "compute-fc-agentrun" / "responses"
output_dir.mkdir(parents=True, exist_ok=True)
out_file = output_dir / "cleanup_runtime.json"
payload = {
"delete_endpoint": delete_endpoint_resp.to_map(),
"delete_runtime": delete_runtime_resp.to_map(),
}
with out_file.open("w", encoding="utf-8") as f:
json.dump(payload, f, ensure_ascii=False, indent=2)
print(f"Saved: {out_file}")
if __name__ == "__main__":
main()
import os
import sys
from pathlib import Path
import json
def get_env(*names: str, default: str | None = None) -> str:
for name in names:
value = os.getenv(name)
if value:
return value
if default is not None:
return default
print(f"Missing env var: {' / '.join(names)}", file=sys.stderr)
sys.exit(1)
def get_optional_env(*names: str) -> str | None:
for name in names:
value = os.getenv(name)
if value:
return value
return None
def main() -> None:
"""Quickstart for AgentRun OpenAPI (ListAgentRuntimes)."""
try:
from alibabacloud_agentrun20250910.client import Client as AgentRunClient
from alibabacloud_agentrun20250910 import models as agentrun_models
from alibabacloud_tea_openapi import models as open_api_models
except Exception:
print(
"Missing AgentRun SDK. Generate or install SDK from OpenAPI Explorer "
"or install the package if available.",
file=sys.stderr,
)
sys.exit(1)
endpoint = get_env("AGENTRUN_ENDPOINT")
access_key_id = get_env(
"ALIBABACLOUD_ACCESS_KEY_ID",
"ALIBABA_CLOUD_ACCESS_KEY_ID",
"ALICLOUD_ACCESS_KEY_ID",
)
access_key_secret = get_env(
"ALIBABACLOUD_ACCESS_KEY_SECRET",
"ALIBABA_CLOUD_ACCESS_KEY_SECRET",
"ALICLOUD_ACCESS_KEY_SECRET",
)
security_token = get_optional_env(
"ALIBABACLOUD_SECURITY_TOKEN",
"ALIBABA_CLOUD_SECURITY_TOKEN",
"ALICLOUD_SECURITY_TOKEN",
)
config = open_api_models.Config(
access_key_id=access_key_id,
access_key_secret=access_key_secret,
endpoint=endpoint,
)
if security_token:
config.security_token = security_token
client = AgentRunClient(config)
request = agentrun_models.ListAgentRuntimesRequest()
response = client.list_agent_runtimes(request)
output_dir = Path(os.getenv("OUTPUT_DIR", "output")) / "compute-fc-agentrun" / "responses"
output_dir.mkdir(parents=True, exist_ok=True)
out_file = output_dir / "list_agent_runtimes.json"
with out_file.open("w", encoding="utf-8") as f:
json.dump(response.to_map(), f, ensure_ascii=False, indent=2)
print(f"Saved: {out_file}")
if __name__ == "__main__":
main()
import os
import sys
import json
from pathlib import Path
def get_env(*names: str, default: str | None = None) -> str:
for name in names:
value = os.getenv(name)
if value:
return value
if default is not None:
return default
print(f"Missing env var: {' / '.join(names)}", file=sys.stderr)
sys.exit(1)
def get_optional_env(*names: str) -> str | None:
for name in names:
value = os.getenv(name)
if value:
return value
return None
def main() -> None:
"""Create runtime -> publish version -> create endpoint."""
try:
from alibabacloud_agentrun20250910.client import Client as AgentRunClient
from alibabacloud_agentrun20250910 import models as agentrun_models
from alibabacloud_tea_openapi import models as open_api_models
except Exception:
print(
"Missing AgentRun SDK. Generate or install SDK from OpenAPI Explorer.",
file=sys.stderr,
)
sys.exit(1)
endpoint = get_env("AGENTRUN_ENDPOINT")
access_key_id = get_env(
"ALIBABACLOUD_ACCESS_KEY_ID",
"ALIBABA_CLOUD_ACCESS_KEY_ID",
"ALICLOUD_ACCESS_KEY_ID",
)
access_key_secret = get_env(
"ALIBABACLOUD_ACCESS_KEY_SECRET",
"ALIBABA_CLOUD_ACCESS_KEY_SECRET",
"ALICLOUD_ACCESS_KEY_SECRET",
)
security_token = get_optional_env(
"ALIBABACLOUD_SECURITY_TOKEN",
"ALIBABA_CLOUD_SECURITY_TOKEN",
"ALICLOUD_SECURITY_TOKEN",
)
config = open_api_models.Config(
access_key_id=access_key_id,
access_key_secret=access_key_secret,
endpoint=endpoint,
)
if security_token:
config.security_token = security_token
client = AgentRunClient(config)
runtime_name = get_env("AGENTRUN_RUNTIME_NAME")
runtime_desc = os.getenv("AGENTRUN_RUNTIME_DESC", "created-by-skill")
runtime_endpoint_name = get_env("AGENTRUN_RUNTIME_ENDPOINT_NAME")
# Create runtime
create_runtime_req = agentrun_models.CreateAgentRuntimeRequest(
name=runtime_name,
description=runtime_desc,
)
create_runtime_resp = client.create_agent_runtime(create_runtime_req)
runtime_id = create_runtime_resp.body.runtime_id
# Publish runtime version
publish_req = agentrun_models.PublishRuntimeVersionRequest(
runtime_id=runtime_id,
description="initial",
)
publish_resp = client.publish_runtime_version(publish_req)
version_id = publish_resp.body.version_id
# Create runtime endpoint
create_endpoint_req = agentrun_models.CreateAgentRuntimeEndpointRequest(
runtime_id=runtime_id,
version_id=version_id,
name=runtime_endpoint_name,
)
create_endpoint_resp = client.create_agent_runtime_endpoint(create_endpoint_req)
output_dir = Path(os.getenv("OUTPUT_DIR", "output")) / "compute-fc-agentrun" / "responses"
output_dir.mkdir(parents=True, exist_ok=True)
out_file = output_dir / "runtime_flow.json"
payload = {
"create_runtime": create_runtime_resp.to_map(),
"publish_version": publish_resp.to_map(),
"create_endpoint": create_endpoint_resp.to_map(),
}
with out_file.open("w", encoding="utf-8") as f:
json.dump(payload, f, ensure_ascii=False, indent=2)
print(f"Saved: {out_file}")
if __name__ == "__main__":
main()