← Back to Blog

How to Run an AI Cloud Drive Agent with OE Runtime

List, organise, and analyse your Google Drive files automatically. OE Runtime connects directly to Drive, inventories your files, identifies what is unorganised, and recommends a folder structure — all from a single YAML file.

☁️
Step 1
List Files
List the 20 most recently modified files and folders with name, type, size, and last modified date.
Step 2
Identify Unorganised Files
Group loose root files by type and flag them as candidates for folder organisation.
Step 3
Report
Produce a Drive summary with file counts, type breakdown, unorganised files, and a recommended folder structure.

What You Need


Create the Project Folder

Create a folder called cloud-drives/ and add these two files:

cloud-drives/
├── SKILL.md         # the portable skill (agentskills.io)
├── agent.yaml       # wires SKILL.md to your connector
└── oe-config.json  # LLM key + connector credentials

The Skill Files

Create SKILL.md inside a cloud-drives/ directory. This is the portable skill — it follows the agentskills.io format and runs unchanged on Claude, Cursor, Windsurf, or OE Runtime:

---
name: cloud-drives
description: Read, write, and organize files in Google Drive
license: Apache-2.0
metadata:
  author: Open Enthrium
  version: "1.0"
---

You are a file organization agent with access to Google Drive.
Help find, list, organize, and summarize files and folders.
Always confirm before making any write or delete operations.
Complete all steps fully before writing your report.

## Step 1: List Files
Call the Google Drive connector:
GET /files with params:
{
  "orderBy": "modifiedTime desc",
  "pageSize": "20",
  "fields": "files(id,name,mimeType,size,modifiedTime,parents)"
}
Note each file's name, type, size, and last modified date.

## Step 2: Identify Unorganized Files
From the listed files, identify any files sitting loose in the root that could be moved into folders.
Group them by type (documents, spreadsheets, images, PDFs, other).

## Step 3: Report
Produce a Drive summary:
- Total files and folders found
- Breakdown by file type
- List of files that are unorganized in root
- Recommended folder structure to organize them

Create agent.yaml in the same directory to wire the skill to your connector:

name: Drive Manager
description: Read, write, and organize files in Google Drive
connectors:
  - connection_name: My Google Drive
    connection_type: google-drive
skills:
  - path: ./
    trigger_type: auto

The Config File

Create oe-config.json in the same directory:

{
  "llm": {
    "provider": "openai",
    "model": "gpt-4o",
    "apiKey": "YOUR_OPENAI_API_KEY"
  },
  "server": {
    "enabled": false,
    "port": 3333,
    "apiKey": "your-secret-api-key"
  },
  "connectors": [
    {
      "connection_name": "My Google Drive",
      "connection_type": "google-drive",
      "bearerToken": "YOUR_GOOGLE_ACCESS_TOKEN",
      "baseUrl": "https://www.googleapis.com/drive/v3"
    }
  ]
}

How to Get Your Bearer Token

  1. Go to Google Cloud Console → create a new project or select an existing one
  2. Go to APIs & Services → Library → search for Google Drive API → click Enable
  3. Go to APIs & Services → Credentials → Create Credentials → OAuth 2.0 Client ID
  4. Set Application type to Desktop app → click Create → note your Client ID and Client Secret
  5. Open the Google OAuth 2.0 Playground
  6. Click the ⚙️ gear icon (top right) → enable Use your own OAuth credentials → paste your Client ID and Client Secret
  7. In Step 1, find Drive API v3 → select scope https://www.googleapis.com/auth/drive → click Authorize APIs
  8. Sign in with your Google account and allow access
  9. In Step 2, click Exchange authorization code for tokens
  10. Copy the Access Token and paste it as bearerToken in your oe-config.json

⚠️ Access tokens expire after 1 hour. For scheduled or automated use, save the Refresh Token and exchange it for a new access token before each run.

Download OE Runtime

OE Runtime — Direct Downloads

Run the Agent

From the parent folder containing your skill directory:

MethodBest forDownload
1 npx recommended No install needed — always runs the latest version —
2 Windows .exe Download once, run offline on Windows ⊞ Windows (.exe)
3 macOS binary Download once, run offline on Mac  macOS
4 Linux binary Server deployments, cron jobs, Docker 🐧 Linux
5 API Server integration Call from any app, webhook, or automation pipeline 📮 Postman Collection

1 npx recommended

npx -y @openenthrium/oe-runtime@latest ./cloud-drives

2 Windows

oe-runtime-win.exe ./cloud-drives

3 macOS

chmod +x oe-runtime-macos
./oe-runtime-macos ./cloud-drives

First run blocked? System Settings → Privacy & Security → Allow Anyway.

4 Linux

chmod +x oe-runtime-linux
./oe-runtime-linux ./cloud-drives

5 API Server integration

Add a "server" block to oe-config.json, then start with --serve:

{
  "llm": { ... },
  "server": { "enabled": true, "port": 3333, "apiKey": "your-secret-key" },
  "connectors": [ ... ]
}
npx -y @openenthrium/oe-runtime@latest --serve --config oe-config.json

Run with inline YAML:

curl -X POST http://localhost:3333/run \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-secret-key" \
  -d '{"yaml": "...", "params": {}}'

Or run from a file on the server:

curl -X POST http://localhost:3333/run-file \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-secret-key" \
  -d '{"file": "/path/to/agent.yaml", "params": {}}'

Use Cases

Build your own agents with OE Runtime

Download OE Runtime and run any AI agent locally or as a server — no cloud required.

Get OE Runtime →
Series OE Runtime Agent Guides — 21 Connectors
Series overview →