Skip to content

スタートガイド

Agentic Starterのテンプレートリポジトリは、マルチエージェントフレームワーク、FastAPIバックエンドサーバー、Reactフロントエンド、およびMCPサーバーを使用してエージェントワークフローを構築およびデプロイするための、すぐに使用可能なアプリケーションテンプレートを提供します。 このテンプレートは、最小限の設定要件で新しいエージェントアプリケーションをセットアップするプロセスを合理化し、ローカルでの開発とテストに加えて、DataRobot内の本番環境へのワンコマンドデプロイをサポートします。

This guide covers installing the prerequisite tools and configuring your environment, then creating, deploying, and testing an agentic application using DataRobot's pre-built templates.

システム要件

ご利用のシステムがAgentic Starterのテンプレートを実行するための最小要件を満たしていることを確認します。

  • Operating system: macOS, Linux, or Windows
  • Python: Version 3.10 or higher
  • Memory: At least 4 GB of RAM

Windowsでの開発

Windowsでは、リポジトリのクローンを作成したり、dr startを実行したりする前に、Windowsでの前提条件を完了させてください。 インストールおよびクイックスタートの残りの手順は、macOSおよびLinuxの場合と同様です。

Windows上でLinux環境を利用したい場合は、DataRobot CodespaceWindows Subsystem for Linux (WSL)、開発コンテナ、または仮想マシンを使用することもできます。

Restricted network environments

If you're working from an environment with no direct internet access (for example, an air-gapped environment), see Restricted network setup before you install, initialize, or deploy.

必須ツールのインストール

開始する前に、以下のツールをインストールしておく必要があります。 これらのツールがすでにインストールされている場合は、下の表に示されている必要なバージョン(またはそれ以降)であることを確認してください。 ツールをインストールするコマンドの例については、詳細なインストールコマンドセクションを参照してください。

ツールをシステム全体にインストールする

ツールは、仮想環境ではなく、ターミナルセッションで利用できるように、必ずシステム全体にインストールしてください。

ツール バージョン 説明 Installation guide
dr-cli >= 0.2.77 DataRobot CLI。 DataRobot CLIの開始方法(インストールと設定)。GitHub dr-cli(別の方法)
git >= 2.30.0 バージョン管理システム。 gitインストールガイド
uv >= 0.10.0 Pythonパッケージマネージャー。 uvインストールガイド
Pulumi >= 3.163.0 インフラストラクチャ・アズ・コードツール。 Pulumiインストールガイド
Taskfile >= 3.43.3 タスクランナー。 Taskfileインストールガイド
NodeJS >= 24 フロントエンド開発用のJavaScriptランタイム。 NodeJSインストールガイド
C++ビルドツール N/A A C++ compiler and build tools, required to compile some Python packages. macOS: Xcode Command Line Tools (xcode-select --install); Linux: build-essential (sudo apt-get install build-essential); Windows: Visual Studio Build Tools with the Desktop development with C++ workload

Windowsでの前提条件

リポジトリのクローンを作成する前に、Windowsで以下の手順を完了してください。 これらの手順を省略すると、シンボリックリンクがプレーンテキストファイルとしてチェックアウトされ、作業ツリーが破損した状態になります。

  1. Gitでシンボリックリンクのサポートを有効にします。
git config --global core.symlinks true 
  1. 以下のいずれかの方法を使用して、シンボリックリンクを作成する権限を付与します。

  2. Developer Mode (recommended): On Windows 11, open Settings → System → Advanced → Developer Mode and turn Developer Mode on. 詳細については、デバイスを開発用に有効にするを参照してください。

  3. Administrator terminal: Launch PowerShell or Windows Terminal with Run as administrator and run every repo operation from that elevated session. 少なくとも、git clonedr startdr run deploy、およびシンボリックリンクされたパスに関わるgit checkoutgit pullについては、管理者権限のあるセッションを使用してください。 このテンプレートでは、.claude/skillsfastapi_server/coreinfra/infra/llm.py、およびinfra/infra/oauth.pyでGitのシンボリックリンクが使用されています。

  4. Gitのインストールが完了したら、システムのPATHに次のディレクトリが含まれていることを確認します:[Gitのインストールパス]\usr\bin。 たとえば、GitがC:\Program Files\Gitにインストールされている場合は、次のコマンドを使用して、C:\Program Files\Git\usr\binをPATHに追加します。

$dir = 'C:\Program Files\Git\usr\bin'  # Change if Git is installed elsewhere.
$p = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable('PATH', "$p;$dir", 'User') 

This location provides Linux helper commands required for the Agentic Starter to work correctly. Close and reopen the terminal (or IDE) after running the command so new processes pick up the change.

詳細なインストールコマンド

以下のセクションでは、macOS、Linux(Debian/Ubuntu/DataRobot Codespace)、およびWindows(PowerShell)におけるインストールコマンドの例をご紹介します。 ご使用のオペレーティングシステムに対応する下のタブをクリックしてください。

macOSユーザーは、Homebrewを使用して必須ツールをインストールできます。 Homebrewをまだインストールしていない場合は、まずインストールしてください。

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # If homebrew is not already installed 

次に、それを使用して必須ツールをインストールします。

brew install datarobot-oss/taps/dr-cli uv pulumi/tap/pulumi go-task node git 

You also need the Xcode Command Line Tools to compile some Python packages:

xcode-select --install 

Linuxユーザーは、ディストリビューションのパッケージマネージャーを使用して、必須ツールをインストールできます。

curl https://cli.datarobot.com/install | sh
sudo apt-get update
sudo apt-get install -y python3 python3-pip python3-venv
sudo apt-get install -y build-essential
sudo apt-get install -y git
curl -LsSf https://astral.sh/uv/install.sh | sh
curl -fsSL https://get.pulumi.com | sh
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d
sudo apt-get install -y nodejs npm 

dr startを実行する前に、Windowsでの前提条件を完了させてください。

Windowsユーザーは、PowerShellを使用して必要なツールをインストールできます。

irm https://cli.datarobot.com/winstall | iex
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
winget install Git.Git
winget install Pulumi.Pulumi
winget install Task.Task
winget install OpenJS.NodeJS
winget install Microsoft.VisualStudio.2022.BuildTools --force --override "--wait --passive --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.22621" 

After installing the tools

  • uv: Run uv tool update-shell once so your shell picks up the updated PATH before using uv tool run or invoking tools installed via uv tool install.
  • Pulumi: If you don't have a Pulumi account, use pulumi login --local for local login, or create a free account at the Pulumi website.

Initialize your application

インストールプロセス

Before starting, complete all installation and setup steps above. このプロセスをスキップすると、エラーが発生したり、エージェントアプリケーションが正常に動作しなくなったりする可能性があります。

次のコマンドを実行して、ローカル開発環境を起動します。

dr start 

このコマンドは、DataRobot CLIの対話型ウィザード(CLIコマンドリファレンスdr start)を開始します。 It automatically clones the application repository and creates a .env file in the root directory populated with environment variables you specify. The wizard provides guidance and context for each step; expand the reference below for the complete list of steps.

Full wizard step reference
  1. 「ローコード」エージェントテンプレートを使用するかどうかを指定します。
    • Press Y to use the YAML-based NeMo Agent Toolkit template.
    • Press N to choose from a list of available agent templates.
  2. しばらくするとウィザードによってWebブラウザーウィンドウが開き、APIエンドポイントとキーが自動的に設定されます。 続行するをクリックして次に進みます。
    • Webブラウザーが自動的に開かない場合は、ターミナル出力のURLを探して手動で開いてください。
    • Webブラウザーで続行するをクリックして次に進みます。
    • 認証の問題が発生した場合は、WebブラウザーでDataRobotにログインしていることを確認してください。
  3. Specify the port for the local web application and press Enter. デフォルトは8842です。
  4. If desired, specify the default execution environment for your agent and press Enter. デフォルトは[DataRobot] Python 3.11 GenAI Agentsです。
  5. Provide a secret key to sign cookies for your session and press Enter. If you do not provide a value, a randomly generated one is used.
  6. Enter the URI for a database to use for the application and press Enter. デフォルトはsqlite+aiosqlite:///.data/database.sqliteです。
  7. Select your backend OAuth provider and press Enter.
  8. Specify your authorization server by selecting it from the list and pressing Space. Press Enter to confirm.
  9. Enter a passphrase (or leave blank if you don't want to use a passphrase) for your Pulumi stack and press Enter.
  10. Specify the ID of a DataRobot Use Case (for example, 69331fad5e07469e7c4f5c6f), if one is available, and press Enter.
    • Find your Use Case ID by navigating to the Use Case in the DataRobot UI and copying the ID from the URL.
    • If left blank, DataRobot creates a new Use Case automatically.
  11. Specify your LLM integration and press Enter.
    • DataRobotにデプロイされたLLMを選択した場合は、カスタムモデルLLMのデプロイID(LLM_DEPLOYMENT_ID)を指定します。 テンプレートはUSE_DATAROBOT_LLM_GATEWAY=0を設定し、リクエストがLLM Gatewayの代わりにそのデプロイを使用するようにします。
  12. Specify the port for the MCP server and press Enter. デフォルトは9000です。
  13. Review the .env configuration summary displayed and press Enter to confirm.
    • NOTE: This step takes several minutes to complete.
  14. Once the configuration finishes, choose a Pulumi stack to use for your application and press Enter. If you wish to create a new stack, press Enter and you are prompted to enter a name for it. 既存のスタック名と同じ名前は使用できません。

初回の初期化

初めて実行する場合、dr startコマンドは、アプリケーションの開発およびデプロイを行うための開発環境を準備します。 これには、環境設定とエージェントコンポーネント設定の両方が含まれます。 After this first initialization, future dr start operations only set up your local environment. For subsequent updates to the configuration of your agent component, run the dr component update command.

After dr start completes successfully, verify the following:

  • A .env file in your project root.
  • Your application directory created (typically named datarobot-agent-application or based on your application name).

アプリケーションの設定が完了したので、次のセクションに進んでください。

エージェントを実行する

エージェントの実行

前のセクションで詳しく説明したdr startを実行するまでは、このセクションに進まないでください。

dr startの実行中に作成されたアプリケーションディレクトリに移動します。

cd datarobot-agent-application # or the custom directory name you specified during the wizard, if different 

次に、以下のコマンドを実行して、アプリケーションのすべてのコンポーネントを起動します。

dr run dev 

備考

task devは、テンプレートがそのタスクを公開している場合、同じ開発スタックを実行します。

これにより、4つのプロセスが並行して起動します。

  • アプリケーションフロントエンド
  • アプリケーションバックエンド
  • エージェント
  • MCPサーバー

すべてのサービスが起動したら:

  1. Open your web browser and navigate to http://localhost:5173.
  2. Confirm that the agent application interface appears.
  3. Try sending a test message to verify everything is working.

From here, start customizing your agent by adding your own logic and functionality. 詳細については、エージェントの開発セクションを参照してください。

個別のサービスの起動

Start individual services in separate terminal windows; for example, task agent:dev starts only the agent.

エージェントの開発

エージェントの構築とテストが完了しました。独自のロジックや機能を追加してカスタマイズを開始できます。 詳細については、以下のドキュメントを参照してください。

エージェントのデプロイ

エージェントのテスト

デプロイする前に、エージェントをローカルでテストしたことを確認してください。

次に、エージェントをDataRobotにデプロイします。これにはPulumiへのログインが必要です。

次のコマンドを実行して、エージェントをデプロイします。

dr task run deploy 

taskコマンドとrunコマンドの詳細については、CLIのtaskコマンドおよびCLIのrunコマンドを参照してください。

デプロイプロセス

The deployment process takes several minutes to complete.

デプロイが完了すると、以下の例に示すように、スクリプトにデプロイの詳細が表示されます。 The deployment details vary based on your configuration.

Outputs:
    AGENT_DEPLOYMENT_ID                               : "69331fad5e07469e7c4f5c6f"
    Agent Custom Model Chat Endpoint [apptest] [agent]: "https://datarobot.com/api/v2/genai/agents/fromCustomModel/69331f816e1bf9f1890d5d1d/chat/"
    Agent Deployment Chat Endpoint [apptest] [agent]  : "https://datarobot.com/api/v2/deployments/69331fad5e07469e7c4f5c6f/chat/completions"
    Agent Execution Environment ID [apptest] [agent]  : "680fe4949604e9eba46b1775"
    Agent Playground URL [apptest] [agent]            : "https://datarobot.com/usecases/69331e4c3be0efe3b95a7be0/agentic-playgrounds/69331e4d1c036307186c9b16/comparison/chats"
    Agentic Starter [apptest]             : "https://datarobot.com/custom_applications/6933204a9e21e9b59b5a7bee/"
    DATABASE_URI                                      : "sqlite+aiosqlite:////tmp/agent_app/.data/agent_app.db"
    DATAROBOT_APPLICATION_ID                          : "6933204a9e21e9b59b5a7bee"
    DATAROBOT_OAUTH_PROVIDERS                         : (json) []

    LLM_DEFAULT_MODEL                                 : "azure/gpt-4o-2024-11-20"
    SESSION_SECRET_KEY                                : "secretkey123"
    USE_DATAROBOT_LLM_GATEWAY                         : "1"
    [apptest] [mcp_server] Custom Model Id            : "69331eebb49131d3d5430ac7"
    [apptest] [mcp_server] Deployment Id              : "69331f1f30548f83b668d9dc"
    [apptest] [mcp_server] MCP Server Base Endpoint   : "https://datarobot.com/api/v2/deployments/69331f1f30548f83b668d9dc/directAccess/"
    [apptest] [mcp_server] MCP Server MCP Endpoint    : "https://datarobot.com/api/v2/deployments/69331f1f30548f83b668d9dc/directAccess/mcp" 

備考

The sample output above reflects an agent using the LLM gateway (USE_DATAROBOT_LLM_GATEWAY is "1"). If you use the DataRobot Deployed LLM option instead, USE_DATAROBOT_LLM_GATEWAY is automatically set to 0.

制限のあるネットワークの設定

Complete this section only if you're installing, initializing, or deploying from an environment with no direct internet access (for example, an air-gapped environment); otherwise, skip it.

Configure Pulumi to install the DataRobot plugin from an internal proxy instead of GitHub. これらの環境変数を設定すると、すべてのPulumiプラグインのダウンロードが内部プロキシにリダイレクトされ、外部の更新チェックが無効になります。

以下の変数を.envファイルに追加します。

.env
PULUMI_SKIP_UPDATE_CHECK=1
PULUMI_DATAROBOT_DEFAULT_URL=http://internal-proxy-for-pulumi
# OPTIONAL
PULUMI_DATAROBOT_PLUGIN_VERSION=v0.10.27 
環境変数 必須 説明
PULUMI_SKIP_UPDATE_CHECK はい Enables air-gapped mode when set to 1, disabling external update checks and allowing use of a custom plugin server.
PULUMI_DATAROBOT_DEFAULT_URL はい DataRobot Pulumiプラグインをホストする内部プロキシサーバーのベースURL。 これにより、デフォルトのGitHubリリースソースが置き換えられます。
PULUMI_DATAROBOT_PLUGIN_VERSION いいえ インストールするDataRobot Pulumiプラグインの特定のバージョン。 指定しない場合、テンプレートにバンドルされているバージョンがデフォルトとなります。

仕組み

PULUMI_SKIP_UPDATE_CHECK=1が設定されている場合、デプロイタスクはpulumi plugin install resource datarobot <version> --server <url>を実行します。 これにより、プラグインのダウンロードが外部ソースではなく内部プロキシ経由でルーティングされるようになります。

内部プロキシの要件

内部プロキシは、Pulumiのプラグインインストールと互換性のある構造でDataRobot Pulumiプラグインファイルをホストする必要があります。 GitHubの公式リリースのディレクトリおよびファイルの構造を反映したものでなければなりません。

Pythonパッケージ

In restricted network environments, uv sync operations fail when attempting to reach the public PyPI. これを解決するには、uvが内部のPyPIプロキシを使うように設定します。

プロキシを設定するには、エージェントプロジェクトのagent/pyproject.tomlファイルを編集し、[tool.uv.pip]セクションのコメントを解除して、URLを内部PyPIプロキシに置き換えます。 例:

agent/pyproject.toml
[tool.uv.pip]
extra-index-url = ["https://your-internal-pypi-proxy.example.com/simple/"] 

設定による影響

この設定を行うと、すべてのPythonパッケージのインストールがプロキシ経由でルーティングされます。 対象となるのは以下の操作です。

  • ローカル開発(uv sync
  • Dockerイメージのビルド
  • カスタムモデルのデプロイ
  • プレイグラウンドの操作
  • インフラストラクチャのデプロイ

設定を見つける

[tool.uv.pip]セクションはpyproject.tomlファイルの最後にあります。 存在しない場合は、手動で追加します。