← Back to Blog

How to Run an AI Video Generation Agent with OE Runtime

Generate short cinematic video clips from text descriptions automatically. OE Runtime connects to Runway, crafts detailed scene prompts, submits the generation job, polls for completion, and returns the video URL — no video production skills required.

🎬
Step 1
Design Video Prompt
Craft a detailed Runway prompt with scene, motion, style, and camera movement details.
Step 2
Generate Video
Submit to Runway and poll every 15 seconds until generation status is SUCCEEDED.
Step 3
Report
Return the prompt used, generation time, video URL, duration, resolution, and recommended use cases.

The Agent YAML

Create a file called agent.yaml inside a video-generation/ directory:

name: Video Creator
description: Generate short video clips from text or image prompts
instructions: |
  You are a video generation agent. Create short video clips using Runway.
  Describe motion, style, and scene clearly. Videos are generated asynchronously —
  poll for completion before returning the URL.
  Complete all steps fully before writing your report.
steps:
  - name: Design Video Prompt
    content: |
      Craft a detailed Runway video prompt for a 5-second product reveal clip.
      Scene: a sleek smartphone emerging from mist on a dark reflective surface.
      Motion: slow upward drift with a rotating reveal.
      Style: cinematic, high contrast, blue accent lighting.
      Camera: slow push-in, shallow depth of field.
  - name: Generate Video
    content: |
      Submit the prompt to the Runway connector.
      Poll every 15 seconds until generation status is "SUCCEEDED".
      Retrieve the video URL once complete.
  - name: Report
    content: |
      Summarize the result:
      - Prompt used for generation
      - Generation time taken
      - Output video URL
      - Duration and resolution
      - Recommended use cases for this clip
connectors:
  - connection_name: Runway
    connection_type: runway

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": "Runway",
      "connection_type": "runway",
      "apiKey": "YOUR_RUNWAY_API_KEY",
      "model": "gen3a_turbo",
      "duration": 5
    }
  ]
}

Get your Runway API key from app.runwayml.com/settings. The model gen3a_turbo is the fastest generation option. The duration field accepts 5 or 10 seconds. Video generation is asynchronous — the agent polls until the job completes before returning the URL.

Download OE Runtime

OE Runtime — Direct Downloads

Run the Agent

Windows

# Run the agent
oe-runtime-win.exe video-generation/agent.yaml --config video-generation/oe-config.json

macOS

# Make executable (first time only)
chmod +x oe-runtime-macos

# Run the agent
oe-runtime-macos video-generation/agent.yaml --config video-generation/oe-config.json

Linux

# Make executable (first time only)
chmod +x oe-runtime-linux

# Run the agent
oe-runtime-linux video-generation/agent.yaml --config video-generation/oe-config.json

macOS Gatekeeper: On first run, macOS may block the binary. Go to System Settings → Privacy & Security → click "Allow Anyway" next to oe-runtime-macos.

Running as an API Server

Add --serve to start OE Runtime as an HTTP server on port 3333:

oe-runtime-win.exe --serve --config video-generation/oe-config.json

Then send a request:

curl -X POST http://localhost:3333/run \
  -H "Content-Type: application/json" \
  -d '{"yaml": "video-generation/agent.yaml", "params": {}}'

Or import the Postman collection (download above) to test all endpoints visually.

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 →