メインコンテンツへスキップ

Documentation Index

Fetch the complete documentation index at: https://docs.qoder.com/llms.txt

Use this file to discover all available pages before exploring further.

ツールは Agent が何をできるかを決定します。Agent の作成・更新時に tools フィールドを構成することで、Agent の能力境界を正確にコントロールできます。

ツールの役割

Agent はタスク実行時に、tools 構成に基づいて呼び出せる機能を判断します。
  • computer — 仮想デスクトップを制御し、GUI 操作を実行
  • bash — 安全なサンドボックス内で shell コマンドを実行
  • text_editor — ファイルの読み書きと編集
構成されていないツールは、Agent が呼び出そうとしません。

ツールタイプの版本サフィックス

API でのツールタイプには日付の版本サフィックス(例: _20250124)を必ず付ける必要があります。これにより API の挙動が固定され、最新のサフィックスを使用してください。
ツールAPI タイプ説明典型的な用途
computercomputer_20250124仮想デスクトップ制御ブラウザ操作、GUI 自動化
bashbash_20250124Shell コマンド実行依存関係インストール、スクリプト実行、システム管理
text_editortext_editor_20250124ファイル編集コード開発、設定変更

現行フォーマット: JSON 配列

ツール構成はフラットな JSON 配列で、各要素は 1 つのツールオブジェクトです。
{
  "tools": [
    {"type": "computer_20250124"},
    {"type": "bash_20250124"},
    {"type": "text_editor_20250124"}
  ]
}
Agent 作成時に設定:
curl -X POST https://openapi.qoder.sh/api/v1/cloud/agents \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "dev-agent",
    "model": "qoder-best",
    "instructions": "あなたは開発アシスタントです",
    "tools": [
      {"type": "computer_20250124"},
      {"type": "bash_20250124"},
      {"type": "text_editor_20250124"}
    ]
  }'

ツール構成の例

最小構成 (CLI のみ)

{
  "tools": [
    {"type": "bash_20250124"}
  ]
}

完全な開発環境

{
  "tools": [
    {"type": "computer_20250124"},
    {"type": "bash_20250124"},
    {"type": "text_editor_20250124"}
  ]
}

権限ポリシーを伴う構成

ツールオブジェクトには実行ポリシーを制御する permission フィールドを含められます (詳細は権限ポリシー)。
{
  "tools": [
    {"type": "bash_20250124", "permission": "allow"},
    {"type": "text_editor_20250124", "permission": "allow"},
    {"type": "computer_20250124", "permission": "ask"}
  ]
}

ツール構成の更新

PATCH で Agent のツールリストを更新します。
curl -X PATCH https://openapi.qoder.sh/api/v1/cloud/agents/agt_abc123 \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "tools": [
      {"type": "bash_20250124", "permission": "allow"},
      {"type": "text_editor_20250124", "permission": "allow"}
    ]
  }'
tools の更新は完全置換です。配列全体を渡してください。既存の Session には影響せず、新しい Session が更新後の構成を使用します。

curl で現在のツール構成を確認

curl https://openapi.qoder.sh/api/v1/cloud/agents/agt_abc123 \
  -H "Authorization: Bearer $QODER_PAT" | jq '.tools'
出力例:
[
  {"type": "computer_20250124"},
  {"type": "bash_20250124"},
  {"type": "text_editor_20250124"}
]

よくある質問

Q: tools を構成しないとどうなりますか? A: Agent は利用可能なツールを持たず、純粋なテキスト対話のみ可能です。 Q: Session レベルでツール構成を上書きできますか? A: 現在はサポートされていません。ツール構成は Agent にバインドされ、同じ Agent のすべての Session が同じツールセットを共有します。 Q: tools 配列の順序は重要ですか? A: 重要ではありません。Agent はタスクのコンテキストに基づき、自律的にどのツールを呼び出すかを判断します。 Q: 版本サフィックスは時間とともに変わりますか? A: 変わります。新しいバージョンのツールがリリースされると、新しい日付サフィックスが追加されます。Changelog をご確認の上、最新のサフィックスをご利用ください。