RITSU v0.1 — Agentic Workflow Instruction Syntax
Copelf のすべてのワークフローは RITSU v0.1 形式で保存されます。これは入力、ステップ、実行方法を表現する構造化 YAML マニフェストです。RITSU ファイルは動画記録から自動生成され、ビジュアルワークフローエディタで完全に編集できます。
ritsu: '0.1'
name: 'Workflow Name'
inputs:
variableName:
type: string
label: 'Display Label'
description: 'Helper text'
required: true
steps:
- id: step-1
name: 'Open page'
action: navigate
with:
url: 'https://example.com'
- id: step-2
name: 'Enter email'
action: fill
mode: auto
with:
target:
description: 'Email input field'
vision:
hint: "Text field with placeholder 'Enter email'"
value: '${email}'ステップ種別
Copelf は 5 種類のアクションをサポートしています。各ステップではこのうち 1 つだけを使います。
navigate
ブラウザで URL を開きます。
- id: step-1
action: navigate
name: 'Open registration form'
with:
url: 'https://example.com/form'
waitUntil: load # load | domcontentloaded | networkidleclick
説明文と vision ヒントで特定した UI 要素をクリックします。
- id: step-2
action: click
name: 'Click submit button'
mode: auto
approval: false
with:
target:
description: 'Submit button at the bottom of the form'
vision:
hint: "Blue button labeled 'Submit'"fill
入力欄にテキストを入力します。テンプレート変数も使えます。
- id: step-3
action: fill
name: 'Enter email'
mode: auto
with:
target:
description: 'Email input field'
vision:
hint: "Text field with placeholder 'Enter email'"
value: '${email}'select
ドロップダウンから値を選択します。
- id: step-4
action: select
name: 'Select country'
mode: auto
with:
target:
description: 'Country dropdown'
vision:
hint: "Dropdown labeled 'Country'"
value: '${country}'agent
AI による自律的な複数ステップ実行です。ブラウザエージェントは自然言語のプロンプトを受け取り、最大 maxSteps 回まで自分で判断しながら操作します。
- id: step-5
action: agent
name: 'Fill complex form'
with:
prompt: 'Fill in all required fields on this registration form'
maxSteps: 10 # 1–100agent アクションは mode と approval をサポートしません。常により高性能な
AI モデルで自律実行されます。
実行モード
各ステップ(navigate と agent を除く)には実行モードを設定できます。
| Mode | 挙動 |
|---|---|
| auto | AI が要素検出と vision を使ってブラウザを操作します。完全自動です。 |
| manual | ユーザーがブラウザを直接操作します。Copelf は完了するまで待機します。 |
| approval | 基本は auto と同じですが、AI が進む前に人の確認を待ちます。auto モードのステップに approval: true を設定します。 |
- id: step-6
action: click
name: 'Confirm payment'
mode: auto
approval: true # AI will pause and wait for your approval
with:
target:
description: 'Confirm payment button'
vision:
hint: "Green button labeled 'Pay Now'"条件付きステップ
すべてのステップは if 式を使って条件付きで実行できます。
- id: step-7
action: click
name: 'Accept optional terms'
mode: auto
if: 'acceptTerms == true'
with:
target:
description: 'Terms checkbox'
vision:
hint: "Checkbox labeled 'I accept the terms'"ワークフローエディタ
ビジュアルワークフローエディタには、ワークフローを構築・調整するための機能が揃っています。
エディタの主な機能
- ドラッグ&ドロップ並び替え — ステップをドラッグして順番を変更できます(dnd-kit を利用)
- ステップカード — 各ステップがアクション種別、名前、設定を持つカードとして表示されます
- 展開と折りたたみ — ステップカードをクリックすると詳細設定を表示または非表示にできます
- ステップの追加と削除 — 新しいステップを挿入したり不要なステップを削除できます
- 元動画の確認 — 元の録画をワークフローと並べて再生できます
- YAML ダウンロード — ワークフローを RITSU YAML としてエクスポートできます
- バリデーション — 保存前に必須項目や設定不備を検証します
- 実行履歴 — 過去の実行履歴をエディタから直接確認できます
- 未保存変更の表示 — 変更が保存されていないことを視覚的に把握できます
AI が動画からワークフローを生成した後は、必ずエディタで内容を見直してください。必要に応じて target の説明や vision ヒントを調整すると、実行の安定性が上がります。