Agnes Video Gen 2 logo

Agnes Video Gen 2

Community
smart-open
agnes-video-gen-2

Generates cinematic videos via Agnes Video 2.5 Flash API. Invoke when user asks to generate/create/animate a video from text or images, or transform images into video.

Overview

Publishersmart-open
Repositoryskills
Skill nameagnes-video-gen-2
Stars
23
Forks
5
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by smart-open on GitHub. Read the source before you install it.

Installation

Install the Agnes Video Gen 2 AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/smart-open/skills/tree/main/agnes-video-gen-2
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/smart-open/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/agnes-video-gen-2 .claude/skills/agnes-video-gen-2
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Agnes Video Gen 2 in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Agnes Video Gen 2 on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Agnes Video Gen 2 is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Agnes Video Generation 2 (agnes-video-gen-2)

通过 Agnes Video 2.5 Flash 官方 API 生成电影级视频。支持 文生视频、图生视频、多图视频、关键帧动画 四种工作流,自动创建任务、轮询结果并下载 MP4。

何时调用本 Skill

当用户出现以下意图时调用:

  • 要求"生成 / 创建 / 做一个视频"(文生视频)
  • 要求"让这张图片动起来 / 把图片变成视频"(图生视频)
  • 要求"用多张图生成视频 / 图间过渡动画"(多图视频 / 关键帧)
  • 明确提到 Agnes / agnes-video 模型
  • 需要电影质感、高质量 AI 视频生成

运行环境与依赖

  • 仅依赖 Node.js 内置模块(https、fs、path 等),无需 npm 安装任何包,要求 Node.js 12+。
  • 辅助脚本路径:<skill-dir>/scripts/agnes_video_gen.js

API 密钥获取(关键)

API key 按以下优先级解析(脚本自动处理):

  1. 命令行参数 --api-key(最高优先级)
  2. 环境变量 agnes-api-key
  3. 环境变量 AGNES_API_KEY

调用约定:如果用户在提示词上下文中直接给出了 API key(例如消息里写了 sk-xxxx),务必通过 --api-key 参数传给脚本,不要把它写进环境变量后再调用,以免泄露。若上下文中没有 key,则依赖环境变量 agnes-api-key,脚本会自动读取。

工作流总览

工作流--workflow 值说明是否需要图片
文生视频text2video纯文本描述生成视频(默认)否
图生视频image2video为单张图片添加动画是(1 张)
多图视频multi2video多张参考图引导生成是(≥2 张)
关键帧动画keyframes在关键帧之间生成流畅过渡是(≥2 张)

默认优化参数(开箱即用)

脚本已内置文档推荐的优化默认值,未指定参数时自动采用:

参数默认值说明
width × height1152×768(16:9,720p)标准视频生成尺寸,API 会自动标准化到最近档位
num_frames121遵循 8n+1 规则
frame_rate24约 5 秒时长,运动流畅
画质增强自动开启追加电影质感修饰词(keyframes 模式除外,避免与过渡指令冲突)

即不传任何尺寸/帧数参数,即可生成一段约 5 秒、720p、24fps、电影质感的视频。

文生视频(text2video)

bash
node "<skill-dir>/scripts/agnes_video_gen.js" \
  --workflow text2video \
  --prompt "一只猫在日落时的海滩上漫步,柔和的海浪,温暖的金色光线,逼真的运动" \
  --output "./out/cat_beach.mp4" \
  --api-key "sk-xxxx"

图生视频(image2video)

bash
node "<skill-dir>/scripts/agnes_video_gen.js" \
  --workflow image2video \
  --prompt "女子缓缓转身回望镜头,自然的表情,电影感运镜" \
  --image "https://example.com/woman.png" \
  --output "./out/woman_turn.mp4" \
  --api-key "sk-xxxx"

多图视频(multi2video)

bash
node "<skill-dir>/scripts/agnes_video_gen.js" \
  --workflow multi2video \
  --prompt "在两张参考图之间创建平滑的变换场景,电影级光照,保持人物身份一致,自然运动" \
  --image "https://example.com/img1.png" "https://example.com/img2.png" \
  --output "./out/transform.mp4" \
  --api-key "sk-xxxx"

关键帧动画(keyframes)

bash
node "<skill-dir>/scripts/agnes_video_gen.js" \
  --workflow keyframes \
  --prompt "在关键帧之间生成流畅的电影级过渡,保持视觉一致性,自然的镜头运动" \
  --image "https://example.com/keyframe1.png" "https://example.com/keyframe2.png" \
  --output "./out/keyframe_transition.mp4" \
  --api-key "sk-xxxx"

视频时长与帧数控制

公式:seconds = num_frames / frame_rate

  • num_frames 必须 ≤ 441,且遵循 8n + 1 规则(如 1, 9, 17, ..., 121, 241, 441)。
  • frame_rate 支持 1–60。

常用时长(脚本默认即"约 5 秒"那一行):

目标时长num_framesframe_rate
约 3 秒8124
约 5 秒(默认)12124
约 10 秒24124
约 18 秒(最长)44124

示例:生成约 10 秒横版视频

bash
node "<skill-dir>/scripts/agnes_video_gen.js" --workflow text2video \
  --prompt "城市夜景延时摄影,霓虹灯光流转" \
  --num-frames 241 --frame-rate 24 --output "city_night.mp4" --api-key "sk-xxxx"

推荐尺寸(标准档位)

API 会自动将尺寸标准化到最近档位:480p / 720p / 1080p。按宽高比选择:

宽高比推荐尺寸(width×height)适用场景
16:91152×768(默认)横版视频、产品演示、YouTube
9:16720×1280 或 1080×1920竖版短视频、TikTok / Reels / Shorts
1:11024×1024 或 720×720方形视频、社交流
4:31024×768传统横版、通用演示
3:4768×1024竖版演示、肖像/产品为主

示例:生成竖版短视频(约 3 秒)

bash
node "<skill-dir>/scripts/agnes_video_gen.js" --workflow text2video \
  --prompt "美食特写,蒸汽升腾,慢动作" \
  --width 720 --height 1280 --num-frames 81 --frame-rate 24 \
  --output "food_vertical.mp4" --api-key "sk-xxxx"

提示词最佳实践

脚本已自动补充电影质感修饰词(文生/图生/多图模式),主体描述仍需清晰。建议结构:

[主体] + [动作/运动] + [场景/环境] + [风格] + [光照] + [镜头运动]
  • 文生视频:一只猫在日落海滩漫步,柔和海浪,温暖金色光线,逼真运动,电影级
  • 图生视频:清楚描述图片中主体应有的动作(如"缓缓转身""微微一笑""风吹动头发")
  • 关键帧:说明过渡方式 + 需保持一致的内容

用 --negative-prompt 排除不想要的内容,用 --seed 固定可复现结果。

执行流程(推荐两步式,确保文件持久)

重要:视频生成是长时间任务,需用长进程执行。但长进程退出后其写入的文件可能被环境清空(变为 0 字节)。因此采用两步式:长进程只获取视频 URL,短命令负责下载文件——短命令写入的文件持久可靠。

第 1 步:创建任务 + 轮询获取 VIDEO_URL(长进程,--url-only)

bash
node "<skill-dir>/scripts/agnes_video_gen.js" \
  --url-only \
  --workflow text2video \
  --prompt "你的视频描述" \
  --num-frames 241 --frame-rate 24 \
  --api-key "sk-xxxx"

脚本完成后输出 VIDEO_URL=https://...mp4。从输出中解析该 URL。

第 2 步:下载视频文件(短命令,确保持久)

从第 1 步输出的 VIDEO_URL 下载到本地(任选其一)。下载后必须立即设置只读属性,否则工作区会自动将文件清空为 0 字节。

PowerShell 方式(Windows 推荐):

powershell
Invoke-WebRequest -Uri "VIDEO_URL" -OutFile "./out/out.mp4" -UseBasicParsing
(Get-Item "./out/out.mp4").IsReadOnly = $true

Node.js 方式(跨平台):

bash
node -e "const https=require('https');const fs=require('fs');const u='VIDEO_URL';const o='out.mp4';const f=(url,p,r)=>{r=r||0;return new Promise((res,rej)=>{if(r>5)return rej(new Error('redirects'));const c=url.startsWith('https')?https:http;c.get(url,{headers:{'User-Agent':'Mozilla/5.0','Connection':'close'},timeout:300000},s=>{if(s.statusCode>=300&&s.statusCode<400&&s.headers.location){s.resume();return res(f(new URL(s.headers.location,url).href,p,r+1));}if(s.statusCode!==200){s.resume();return rej(new Error('HTTP '+s.statusCode));}const ch=[];let n=0;s.on('data',d=>{ch.push(d);n+=d.length;});s.on('end',()=>{const b=Buffer.concat(ch,n);fs.writeFileSync(p,b);try{fs.chmodSync(p,0o444)}catch(e){}console.log('OK '+n+' bytes');res();});s.on('error',rej);}).on('error',rej).on('timeout',function(){this.destroy(new Error('timeout'));});});};f(u,o).then(()=>process.exit(0)).catch(e=>{console.error(e.message);process.exit(1);});"

关键:只读属性(PowerShell IsReadOnly=$true / Node.js chmod 0o444)是防止工作区清空文件的唯一可靠手段。已验证:设只读后文件持久保持,不设只读则数分钟内被清空为 0 字节。

任务状态:queued(排队)→ in_progress(生成中)→ completed(成功)/ failed(失败)。

执行后必做

  1. 从第 1 步输出解析 VIDEO_URL=...。
  2. 用第 2 步短命令下载到工程根目录 ./out/ 下。
  3. 下载后立即验证文件大小非 0:Get-Item <文件> | Select Length。
  4. 向用户提供 computer:// 链接,例如:[查看视频](computer://./out/out.mp4)
  5. 如效果不符,优化提示词 / 调整帧数与尺寸后重试。
  6. 注意:视频生成耗时较长(几十秒到数分钟),第 1 步默认最长等待 20 分钟(--max-wait 1200)。请用长进程执行第 1 步,短命令执行第 2 步。

注意事项

  1. 图片输入仅支持公开 URL:图生/多图/关键帧的 --image 必须是 https:// 开头的公开可访问链接。本地文件需先上传(可用 agnes-image-gen-2 skill 生成后取 URL,或任意图床)。脚本检测到非 URL 会直接报错提示。
  2. 帧数规则:num_frames 必须满足 8n+1 且 ≤441,脚本会校验并提示最近合法值。
  3. 尺寸标准化:API 会把请求尺寸映射到 480p/720p/1080p 最近档位,最终输出以响应 size 为准。
  4. 模型名称:固定 agnes-video-2.5-flash。
  5. 结果获取:新接入一律用 video_id(GET /agnesapi?video_id=),不用旧版 task_id 接口。
  6. 超时与重试:视频创建接口响应可能较慢(模型加载排队),脚本已将创建任务超时设为 10 分钟,并自动重试 5 次(递增等待);偶发 503/超时属正常。
  7. 文件持久性(关键):工作区会自动将非只读的视频文件清空为 0 字节。务必使用 --url-only 两步式流程:第 1 步长进程只获取 VIDEO_URL(不写文件),第 2 步用短命令下载并立即设置只读属性(PowerShell IsReadOnly=$true / Node.js chmod 0o444)。已验证只读文件持久保持,非只读文件数分钟内被清空。

参数速查

参数说明必填默认
--prompt / -p文本描述是—
--workflow / -wtext2video/image2video/multi2video/keyframes否text2video
--image / -i图片 URL(可多个)图生/多图/关键帧必填—
--width视频宽度否1152
--height视频高度否768
--num-frames / -n帧数(8n+1,≤441)否121
--frame-rate帧率 1–60否24
--steps推理步数否模型默认
--seed随机种子(可复现)否随机
--negative-prompt反向提示词否—
--output / -o输出文件路径否agnes_<workflow>_<时间戳>.mp4
--api-keyAPI key(覆盖环境变量)视情况—
--no-enhance关闭自动电影质感增强否开启
--url-only只创建任务+轮询,输出 VIDEO_URL,不下载(推荐)否关闭
--poll-interval轮询间隔(秒)否10
--max-wait最长等待(秒)否1200

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Agnes Video Gen 2 AI skill do?

Generates cinematic videos via Agnes Video 2.5 Flash API. Invoke when user asks to generate/create/animate a video from text or images, or transform images into video.

Why use Agnes Video Gen 2 on TypingMind?

Because you install it once and use it with any model. Agnes Video Gen 2 is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Agnes Video Gen 2 in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/smart-open/skills/tree/main/agnes-video-gen-2. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Agnes Video Gen 2?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Agnes Video Gen 2?

As many as you like. As long as a model supports skills, you can use Agnes Video Gen 2 with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Agnes Video Gen 2 AI skill free?

It is published on GitHub by smart-open. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇