# エージェント仕様リファレンス

> エージェント仕様リファレンス - agent_spec.mdの構造と例：Agent Assistが設計時に作成するYAMLの仕様。

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-07-19T06:00:52.977453+00:00` (UTC).

## Primary page

- [エージェント仕様リファレンス](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/agent-spec-reference.html.md): Full documentation for this topic (Markdown sidecar).

## Sections on this page

- [仕様フィールド](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/agent-spec-reference.html.md#specification-fields): In-page section heading.
- [ツールの定義](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/agent-spec-reference.html.md#tool-definition): In-page section heading.
- [仕様での認証](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/agent-spec-reference.html.md#authentication-in-specs): In-page section heading.
- [フロントエンドオプション](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/agent-spec-reference.html.md#frontend-options): In-page section heading.
- [例](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/agent-spec-reference.html.md#examples): In-page section heading.
- [ツールが1つだけのシンプルなエージェント](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/agent-spec-reference.html.md#example-simple-agent): In-page section heading.
- [認証付き複数ツールエージェント](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/agent-spec-reference.html.md#example-multi-tool-agent): In-page section heading.
- [複数ページのダッシュボードエージェント](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/agent-spec-reference.html.md#example-multi-page-agent): In-page section heading.

## Documentation content

[AIエージェントの設計](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/workflows-and-prompting.html.md#design-an-ai-agent) ワークフローの実行中、Agent Assistは作業ディレクトリに `agent_spec.md` ファイルを作成します。 このファイルはYAML形式で、実装コードがまだ存在しない段階でエージェントがどのような動作を行うべきかを定義するものです。 このファイルは、関係者と確認したり、手動で編集したり、 [AIエージェントのコーディング](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/workflows-and-prompting.html.md#code-an-ai-agent) ワークフローで読み込んだりすることができます。

このページでは、各フィールドについて説明します。 仕様がまだ確定していない間は、すべてのフィールドが任意です。設計を具体化していくにつれて、Agent Assistが自動的に入力していきます。

## 仕様フィールド

| フィールド | 説明 |
| --- | --- |
| model | DataRobot LLM GatewayモデルのID（例：anthropic/claude-sonnet-4-5-20250929） 利用可能なモデルを見つけるには、セッションでlist modelsコマンドを使用するか、Agent Assist LLMの変更を参照してください。 |
| system_prompt | エージェントの役割、口調、および制約を定義する指示。 |
| tools | エージェントが呼び出せるツールのリスト。 各ツールにはfunction_name、inputs、out、およびオプションでauth_specがあります。 |
| examples | 意図された動作を示す、ユーザークエリー例。 |
| frontend | Agentic StarterテンプレートのUIに関する要件（フロントエンドオプションを参照してください）。 |

### ツールの定義

`tools` の下の各エントリーは、1つの呼び出し可能な関数を定義します。

| サブフィールド | 説明 |
| --- | --- |
| function_name | ツールのリクエスト時にモデルが使用する名前。 |
| inputs | ツールが受け付ける引数。 各入力には、arg_name、type、および構造化されたlistやdict値の場合にオプションでobject_schemaが含まれます。 |
| out | ツールが返す値。 inputsと同じ構造。 |
| auth_spec | オプションです。 ツールが使用する外部サービスとその認証方法を説明します（仕様での認証を参照してください）。 |

サポートされている `type` の値： `str` 、 `int` 、 `float` 、 `bool` 、 `list` 、 `dict` 。

### 仕様での認証

ツールが外部APIを呼び出す場合、その連携を設計に記録するため、 `auth_spec` を含めます。

```
auth_spec:
  service_name: "External API Service"
  auth_method: api_key 
```

| auth_method | 通常の使用方法 |
| --- | --- |
| api_key | ヘッダーまたはクエリーパラメーター内の静的キー（例：OpenAI、Perplexity）。 |
| oauth2 | トークンの更新を伴うユーザー委任アクセス（例：Salesforce、Google）。 |
| basic_auth | ユーザー名とパスワード。 |
| bearer_token | 静的ベアラートークン（内部サービスなど）。 |
| service_account | キーファイルまたはIAMロールを使用した、マシンアイデンティティ（GCP、AWSなど）。 |
| other | カスタムまたは一般的ではない認証。 |

仕様書には、 どのような 認証が必要なのかが記載されています。 エージェントを実装したら、Agentic Starterテンプレートのインフラストラクチャコードで実際の資格情報を ランタイムパラメーター として設定します。 パターンについては、テンプレートの `AGENTS.md` を参照してください。

### フロントエンドオプション

シミュレーションやコーディングを行う前に、Agent Assistは、デフォルトのチャットUIで十分か、それともカスタムインターフェイスが必要かを尋ねます。 この選択は `frontend` の下に保存されます。

| frontend.type | 使用するタイミング |
| --- | --- |
| chat | デフォルトの単一チャットウィンドウ（ほとんどのエージェント）。 |
| multi-page | ダッシュボード、タブ、管理者ビューなど、個別のページ。 |
| custom | 指定のページ以外の、独自のレイアウト。 |

`multi-page` または `custom` には、以下を追加できます。

- pages - 各ページまたはビューの簡単な説明。
- requirements - 任意の自由記述形式のUI要件（テーマ、チャート、フィルターなど）。

## 例

### ツールが1つだけのシンプルなエージェント

```
model: anthropic/claude-sonnet-4-5-20250929
system_prompt: You are a helpful weather assistant. When a user asks about weather,
  search for current conditions and present them clearly.
tools:
  - function_name: search_weather
    inputs:
      - arg_name: location
        type: str
    out:
      - arg_name: search_results
        type: str
    auth_spec:
      service_name: Weather API
      auth_method: api_key
examples:
  - What's the weather like in New York?
  - Current conditions in London
frontend:
  type: chat 
```

### 認証付き複数ツールエージェント

```
model: anthropic/claude-sonnet-4-5-20250929
system_prompt: You are a research assistant. Find and summarize information from
  internal documents and the web. Always cite your sources.
tools:
  - function_name: search_internal_docs
    inputs:
      - arg_name: query
        type: str
    out:
      - arg_name: documents
        type: list
        object_schema: "list of {title: str, content: str, url: str}"
    auth_spec:
      service_name: Internal Knowledge Base API
      auth_method: bearer_token
  - function_name: web_search
    inputs:
      - arg_name: query
        type: str
    out:
      - arg_name: results
        type: str
examples:
  - Find recent papers on LLM hallucination
  - What does our internal policy say about data retention?
frontend:
  type: chat 
```

### 複数ページのダッシュボードエージェント

```
model: google/gemini-2.5-pro-preview-05-06
system_prompt: You are a sales analytics assistant. Help users understand pipeline,
  forecast revenue, and identify at-risk deals. Ground answers in tool data.
tools:
  - function_name: get_pipeline_data
    inputs:
      - arg_name: date_range
        type: str
    out:
      - arg_name: deals
        type: list
    auth_spec:
      service_name: Salesforce CRM
      auth_method: oauth2
examples:
  - What's our Q2 pipeline look like?
  - Which deals are at risk of slipping?
frontend:
  type: multi-page
  pages:
    - "Pipeline Overview - deals by stage with filtering"
    - "Revenue Forecast - expected vs actual with confidence bands"
  requirements: "Dark theme charts. Pipeline table sortable by owner and stage." 
```
