0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OpenAIのAgent Builderを動かしました

Posted at

image.png

OpenAI の Agent Builder を動かす

OpenAI が発表した Agent Builder を実際に動かしてみた記録をまとめるよ。

概要

Agent Builder を使う流れは大まかに以下:

  1. Agent Builder の UI 上でワークフローを作成する
  2. GitHub からサンプルアプリをクローン
  3. 環境変数設定 → 起動 → 動作確認

1. Agent Builder の UI で設定する

  1. Agent Builder の画面を開く
    https://platform.openai.com/agent-builder

  2. Create ボタンを押す
    → 新しいワークフロー画面へ遷移

  3. Agent を選択し、instructions にプロンプトを書く
    例:

    You are an agent who teaches local weather.
    
  4. Tools をクリックして「Web Search」を追加

  5. Publish を押して、ワークフローに名前を付ける

  6. Code をクリックして、生成された Workflow ID を控える


2. サンプルアプリを準備する(GitHub から)

OpenAI の ChatKit 関連のサンプルアプリを次のように扱う:

git clone https://github.com/openai/openai-chatkit-starter-app.git
cd openai-chatkit-starter-app
npm install

その後、環境変数の設定:

cp .env.example .env.local

.env.local をエディタで開いて、以下を設定:

OPENAI_API_KEY=sk-...
NEXT_PUBLIC_CHATKIT_WORKFLOW_ID=wf-...

3. 起動 & 動作確認

npm run dev

ブラウザで http://localhost:3000/ にアクセスして表示を確認。
たとえば、「Tell me the weather in Hiroshima」と入力して、応答が返ってくれば成功。


感想・所感

UI 上での設定と GitHub のサンプルを使う流れがスムーズで、Agent Builder を試すハードルは低いと感じた。
ただ、本格的な用途に使うには、プロンプト設計・エラー処理・セキュリティ面など細かいチューニングが必須になると思う。

noteにも書いてるので読んでもらえると嬉しいです。
https://note.com/hantani/n/n03256906d03a?app_launch=false

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?