# Environment and commands reference

> Environment and commands reference - 環境変数、LLMモデルの選択、ファイルとディレクトリ、`list models`コマンド、およびDataRobot Agent
> Assistのスラッシュコマンド。

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-08-05T06:11:28.807338+00:00` (UTC).

## Primary page

- [Environment and commands reference](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md): Full documentation for this topic (Markdown sidecar).

## Sections on this page

- [環境変数](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md#environment-variables): In-page section heading.
- [Files and directories](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md#files-and-directories): In-page section heading.
- [list modelsコマンド](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md#list-models-command): In-page section heading.
- [Slash commands](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md#slash-commands): In-page section heading.
- [Agent Assist LLMの変更](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md#change-the-agent-assist-llm): In-page section heading.
- [Assist session](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md#assist-session-llm): In-page section heading.
- [Coded agent](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md#llm-gateway-models-for-coded-agents): In-page section heading.

## Documentation content

このページでは、環境変数、 [アシストLLMの選択方法](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md#change-the-agent-assist-llm) 、重要なファイルとディレクトリ、 `list models` プロンプトコマンド、およびスラッシュコマンドについて、概要をまとめています。

`dr assist` ではなくサードパーティのコーディングエージェントを通じてAgent Assistを使用する場合は、以下のコマンドでスキルをインストールします。

```
npx ai-agent-skills install datarobot-oss/datarobot-agent-skills 
```

インストール、設定、および使用のガイドラインについては、 [Agent Assistのスキルに関するページ](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/agent-assist-skill.html.md) を参照してください。

## 環境変数

The variables that can be set in the environment or in `.env`.

| 特徴量 | 必須 | 説明 | Default / notes |
| --- | --- | --- | --- |
| DATAROBOT_API_TOKEN | Yes (unless provided by DR CLI configuration) | LLM Gateway（デフォルトプロバイダー）用DataRobot APIキー。 | — |
| DATAROBOT_ENDPOINT | いいえ | DataRobot API endpoint. | https://app.datarobot.com/api/v2 |
| AGENT_ASSIST_LLM_BASE_URL | いいえ | Base URL for the assist session Completions API. See Change the Agent Assist LLM. | Derived from DATAROBOT_ENDPOINT (for example, …/genai/llmgw) |
| AGENT_ASSIST_LLM_MODEL_NAME | いいえ | Model for the assist session. See Change the Agent Assist LLM. | anthropic/claude-sonnet-4-5-20250929 |
| AGENT_ASSIST_LLM_API_KEY | いいえ | API key for an external Completions API provider. | Falls back to DATAROBOT_API_TOKEN |
| AGENT_ASSIST_DISABLE_LLM_GATEWAY | いいえ | Skip the LLM gateway catalog fetch and route the assist session directly to the model named by AGENT_ASSIST_LLM_MODEL_NAME (for example, a DataRobot deployment). Requires AGENT_ASSIST_LLM_BASE_URL and a non-default AGENT_ASSIST_LLM_MODEL_NAME to also be set. | Unset (LLM gateway catalog used) |
| LOGFIRE_TOKEN | いいえ | Logfire token for tracing. | — |
| DATAROBOT_CLI_CONFIG | いいえ | Override path to DR CLI configuration file. | Default: ~/.config/datarobot/drconfig.yaml |
| AGENT_ASSIST_CONFIG | いいえ | Override path to Agent Assist configuration file. | Default: ~/.config/datarobot/agent_assist_config.yaml |

> [!TIP] OpenCodeプラグインでも読み込まれます
> 上記の `AGENT_ASSIST_LLM_*` および `AGENT_ASSIST_DISABLE_LLM_GATEWAY` 変数は、 [DataRobot OpenCodeプラグイン](https://docs.datarobot.com/ja/docs/agentic-ai/cli/opencode-plugin.html.md) （ `dr opencode` ）によっても読み込まれます。 Agent Assistの設定ですでにこれらの変数が設定されている場合、OpenCodeは自動的にその同じ外部モデルへルーティングします。再設定は必要ありません。

## Files and directories

The paths and files used or created by DataRobot Agent Assist. All paths are relative to the current working directory when you start `dr assist`.

> [!WARNING] 空のディレクトリでdr assistを実行する
> `dr assist` は、 専用の空のディレクトリ からのみ実行します。 コードやその他のファイルが含まれるディレクトリでこのコマンドを実行するのは安全ではありません。 エージェントアシストのコーディングワークフローを使用すると、アシスタントはDataRobot Agent Application Templateのクローンを現在のディレクトリに作成します。 この操作によって既存のファイルが上書きされたり競合が発生したりする可能性があり、既存のプロジェクトが損なわれ、アシスタントの出力精度が低下する恐れがあります。 `dr assist` を実行する前に、専用のディレクトリがない場合は、ディレクトリを作成してそこでターミナルを開きます（たとえば、 `mkdir my-agent && cd my-agent` を実行してから、 `dr assist` を実行します）。

| パス | 説明 |
| --- | --- |
| agent_spec.md | 現在の作業ディレクトリ内のエージェント仕様ファイル（YAMLコンテンツ）。設計中にアシスタントによって作成されます。 フィールドの定義や使用例については、エージェント仕様リファレンスを参照してください。 |
| .env | Optional environment file in the current directory; same variable names as above. |
| .datarobot/cli/versions.yaml | Used by dependency check; defines minimum tool versions. |
| ~/.config/datarobot/drconfig.yaml | DR CLI configuration (token, endpoint). This path can be overridden with DATAROBOT_CLI_CONFIG. |
| ~/.config/datarobot/agent_assist_config.yaml | Agent Assist configuration (optional LLM base URL, model name, API key). This path can be overridden with AGENT_ASSIST_CONFIG. |
| ~/.config/datarobot/agent_assist/settings.yaml | DataRobot CLI / Agent Assistのグローバル設定（言語など）。 アシストLLMモデルは設定されません。環境または.envでAGENT_ASSIST_LLM_MODEL_NAMEを使用してください。 詳細については、Agent Assist LLMの変更を参照してください。 |
| config.yaml | Optional repository-level configuration; can set repository (url, branch, target_dir, tag) for the template clone. |

## list modelsコマンド

`$` プロンプトで、 `list models` （2つの単語で、先頭のスラッシュは不要）と入力すると、 [DataRobot LLM Gateway](https://docs.datarobot.com/ja/docs/agentic-ai/genai-code/dr-llm-gateway.html.md) から 使用可能なLLM Gatewayモデル の一覧が表示されます。 Agent Assistは、行インデックス、 モデル名 （例： `azure/gpt-5-1-2025-11-13` または `bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0` ）、 プロバイダー （Anthropic、Azure OpenAI、Amazon Bedrock、Google Vertex AI、Together AIなど）、および簡単な 説明 が記載されたテーブルを表示します。 表の後に、リストされているモデルの数、そのセッションで使用するように設定されているモデルの確認、モデルを変更するか会話を続けるかの選択を求めるプロンプトなどが出力されます。

具体的なモデルやプロバイダーは、組織のGateway設定や利用権限によって異なります。 Which model the session uses is determined as described in [Change the Agent Assist LLM](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md#change-the-agent-assist-llm).

`list models` や以下の [スラッシュコマンド](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md#slash-commands) 以外にも、 `$` プロンプトで自然言語を使用して、設計、コーディング、デプロイのタスクを行ってください。

## Slash commands

`$` プロンプトにおいて `/` で始まる組み込みセッションコマンド。 単に / と入力するだけで、これらのコマンドの一覧が表示され、詳細については `/help` と入力するよう提案されます。

| Command | エイリアス | 説明 |
| --- | --- | --- |
| /help | /? | List commands or show help for a command: /help [command]. |
| /quit | /exit | Exit the session (with confirmation). |
| /reset | /new | Clear session state and start fresh (removes agent_spec.md and template directory, clears conversation). |
| /checkpoint | - | セッションのチェックポイントを一覧表示または復元します。 |
| /compact | - | 会話履歴を圧縮してトークンの使用量を減らします。 |
| /resume | - | 現在のセッションに挿入された再開コンテキストを表示します。 |
| /save | - | セッションの状態をディスクに保存します。 |

## Agent Assist LLMの変更

Agent Assist uses two LLMs:

- Assist session : For design, simulation, and coding conversations. Set AGENT_ASSIST_LLM_* variables to use the DataRobot LLM gateway or an external Completions API.
- Coded agent : For the application Agent Assist generates. Set the model field in agent_spec.md to an LLM gateway model ID on your deployment. External AGENT_ASSIST_LLM_* settings do not apply to the coded agent.

### Assist session

Set `AGENT_ASSIST_LLM_MODEL_NAME` in the environment or in a `.env` file in the directory where you run `dr assist`. When more than one value is set, Agent Assist uses the first match in this order:

1. Environment variable in the shell.
2. .env in the current working directory.
3. Built-in default: anthropic/claude-sonnet-4-5-20250929 .

LLM gateway (default).Leave `AGENT_ASSIST_LLM_BASE_URL` unset. Set `AGENT_ASSIST_LLM_MODEL_NAME` to a model ID from [list models](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md#list-models-command) (for example `anthropic/claude-sonnet-4-5-20250929`).

**If the default model isn't in your gateway catalog**

The built-in default ( `anthropic/claude-sonnet-4-5-20250929`) may not be enabled for your organization's [LLM gateway](https://docs.datarobot.com/ja/docs/agentic-ai/genai-code/dr-llm-gateway.html.md). If `dr assist` can't reach that model, check which models your organization has enabled from a terminal—no running session required—using the DataRobot CLI:

```
dr llm list 
```

Copy a value from the MODEL column (for example `azure/gpt-5-1-2025-11-13`), then set it before you start `dr assist`:

```
export AGENT_ASSIST_LLM_MODEL_NAME=azure/gpt-5-1-2025-11-13 
```

`dr llm list` is a shorthand alias for `dr llm-gateway list`. It lists the same active gateway catalog as the in-session [list models](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/env-and-commands-reference.html.md#list-models-command) command, plus any DataRobot-deployed LLMs available to your account. See the [llm-gatewaycommand reference](https://docs.datarobot.com/ja/docs/agentic-ai/cli/commands/llm-gateway.html.md) for the full flag and output reference.

If a model isn't in the catalog at all, an org admin must enable it; see [LLM availability](https://docs.datarobot.com/ja/docs/reference/gen-ai-ref/llm-availability.html.md#llm-availability).

**Use an external LLM for Agent Assist**

Set `AGENT_ASSIST_LLM_BASE_URL`, `AGENT_ASSIST_LLM_MODEL_NAME`, and `AGENT_ASSIST_LLM_API_KEY` for any provider that exposes an OpenAI-compatible chat completions endpoint. Add the variables to `.env` or export them before you run `dr assist`:

```
# Example: Anthropic
AGENT_ASSIST_LLM_MODEL_NAME=claude-sonnet-4-5
AGENT_ASSIST_LLM_BASE_URL=https://api.anthropic.com/v1
AGENT_ASSIST_LLM_API_KEY=YOUR_ANTHROPIC_API_KEY 
```

Use model names and URLs from the provider documentation. The `list models` command lists gateway models only.

### Coded agent

The `model` field in `agent_spec.md` must be an LLM gateway model ID. Gateway models must be available in your organization's LLM gateway before you run the [Code an AI agent](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/workflows-and-prompting.html.md#code-an-ai-agent) workflow. See the [Agent specification reference](https://docs.datarobot.com/ja/docs/agentic-ai/agent-assist/agent-spec-reference.html.md#specification-fields).

**Model settings**

Consider the following when changing agent assist LLM settings:

- ~/.config/datarobot/agent_assist/settings.yaml stores CLI preferences (for example language). It does not set AGENT_ASSIST_LLM_MODEL_NAME .
- Restart dr assist after you change AGENT_ASSIST_LLM_* variables. There is no in-session /model command.
- Credential precedence is described in Set configuration variables .
