{"id":206,"date":"2025-03-13T22:39:38","date_gmt":"2025-03-13T13:39:38","guid":{"rendered":"https:\/\/itexplore.org\/jp\/?p=206"},"modified":"2025-03-16T12:47:23","modified_gmt":"2025-03-16T03:47:23","slug":"openai-responses-agents-sdk","status":"publish","type":"post","link":"https:\/\/itexplore.org\/jp\/columns\/openai-responses-agents-sdk\/","title":{"rendered":"OpenAI\u306e\u6700\u65b0\u30c4\u30fc\u30eb\u3067\u4fe1\u983c\u6027\u306e\u9ad8\u3044AI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092\u69cb\u7bc9"},"content":{"rendered":"\n<p>2025\u5e743\u670811\u65e5\u3001OpenAI\u306f\u958b\u767a\u8005\u5411\u3051\u306b\u3001\u4fe1\u983c\u6027\u306e\u9ad8\u3044AI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306e\u300cResponses API\u300d\u3068\u300cAgents SDK\u300d\u3068\u3044\u30462\u3064\u306e\u9769\u65b0\u7684\u306a\u30c4\u30fc\u30eb\u3092\u767a\u8868\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u3089\u306e\u30c4\u30fc\u30eb\u306f\u3001AI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u69cb\u7bc9\u3068\u5c55\u958b\u65b9\u6cd5\u3092\u4e00\u65b0\u3057\u3001\u65b0\u3057\u3044\u6a5f\u80fd\u3068\u8907\u96d1\u306a\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306e\u7c21\u7d20\u5316\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Responses API<\/h2>\n\n\n\n<p>Responses API\u306f\u3001\u5f93\u6765\u306e\u300cChat Completions API\u300d\u3068\u300cAssistants API\u300d\u306e\u6a5f\u80fd\u3092\u7d71\u5408\u3057\u305fAPI\u3067\u3059\u3002\u3053\u306e\u7d71\u5408\u306b\u3088\u308a\u3001\u3088\u308a\u52b9\u7387\u7684\u306b\u8907\u96d1\u306a\u30bf\u30b9\u30af\u3092\u51e6\u7406\u3067\u304d\u308bAI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u958b\u767a\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u4e3b\u306a\u6a5f\u80fd\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Web\u691c\u7d22\uff08Web search\uff09<\/strong>\uff1a\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306e\u6700\u65b0\u60c5\u5831\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30d5\u30a1\u30a4\u30eb\u691c\u7d22\uff08File search\uff09<\/strong>\uff1a\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u30bb\u30de\u30f3\u30c6\u30a3\u30c3\u30af\u306b\u691c\u7d22\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u5229\u7528\uff08Computer use\uff09<\/strong>\uff1a\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u81ea\u52d5\u5316\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Web\u691c\u7d22\uff08Web search\uff09<\/strong><\/h3>\n\n\n\n<p>AI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306e\u6700\u65b0\u60c5\u5831\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u5bfe\u3057\u3066\u3088\u308a\u6b63\u78ba\u3067\u6700\u65b0\u306e\u5fdc\u7b54\u3092\u63d0\u4f9b\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306f\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u304b\u3089\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u8fbc\u307f\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u60c5\u5831\u3092\u57fa\u306b\u3057\u305f\u56de\u7b54\u3092\u751f\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4f7f\u7528\u4f8b<\/h4>\n\n\n\n<p>\u30e6\u30fc\u30b6\u30fc\u304c\u6700\u65b0\u306eAI\u7814\u7a76\u8ad6\u6587\u3092\u63a2\u3057\u3066\u8981\u7d04\u3057\u3066\u307b\u3057\u3044\u3068\u4f9d\u983c\u3059\u308b\u30b7\u30ca\u30ea\u30aa\u3092\u60f3\u50cf\u3057\u3066\u304f\u3060\u3055\u3044\u3002Responses API\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001AI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306f\u30a6\u30a7\u30d6\u691c\u7d22\u6a5f\u80fd\u3092\u5229\u7528\u3057\u3066\u95a2\u9023\u3059\u308b\u8ad6\u6587\u3092\u691c\u7d22\u3057\u3001\u305d\u306e\u5185\u5bb9\u3092\u8981\u7d04\u3057\u3066\u30e6\u30fc\u30b6\u30fc\u306b\u63d0\u793a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"input-field-container source-code-container\">\n<pre class=\"wp-block-code\"><code>from openai import OpenAI\nclient = OpenAI()\n\nresponse = client.responses.create(\n    model=\"gpt-4o\",\n    tools=[{\"type\": \"web_search_preview\"}],\n    input=\"What was a positive news story from today?\"\n)\n\nprint(response.output_text)\n<\/code><\/pre>\n<\/div>\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5b9f\u7528\u7684\u306a\u5fdc\u7528<\/h4>\n\n\n\n<p><strong>\u30cb\u30e5\u30fc\u30b9\u306e\u8981\u7d04<\/strong>: \u6700\u65b0\u306e\u30cb\u30e5\u30fc\u30b9\u3092\u691c\u7d22\u3057\u3001\u305d\u306e\u5185\u5bb9\u3092\u8981\u7d04\u3057\u3066\u63d0\u4f9b\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u306f\u77ed\u6642\u9593\u3067\u91cd\u8981\u306a\u60c5\u5831\u3092\u628a\u63e1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u5b66\u8853\u7814\u7a76\u306e\u30b5\u30dd\u30fc\u30c8<\/strong>: \u5b66\u8853\u8ad6\u6587\u3084\u7814\u7a76\u8cc7\u6599\u3092\u691c\u7d22\u3057\u3001\u95a2\u9023\u3059\u308b\u7814\u7a76\u7d50\u679c\u3084\u30c7\u30fc\u30bf\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u7814\u7a76\u8005\u3084\u5b66\u751f\u306b\u3068\u3063\u3066\u3001\u6709\u76ca\u306a\u60c5\u5831\u6e90\u3068\u3057\u3066\u6d3b\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u5e02\u5834\u8abf\u67fb<\/strong>: \u5546\u54c1\u30ec\u30d3\u30e5\u30fc\u3084\u5e02\u5834\u30c8\u30ec\u30f3\u30c9\u3092\u691c\u7d22\u3057\u3001\u30d3\u30b8\u30cd\u30b9\u306b\u5f79\u7acb\u3064\u30a4\u30f3\u30b5\u30a4\u30c8\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u6226\u7565\u3084\u5546\u54c1\u958b\u767a\u306e\u53c2\u8003\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u89b3\u5149\u60c5\u5831\u306e\u63d0\u4f9b<\/strong>: \u89b3\u5149\u30b9\u30dd\u30c3\u30c8\u3084\u30a4\u30d9\u30f3\u30c8\u60c5\u5831\u3092\u691c\u7d22\u3057\u3001\u65c5\u884c\u8005\u306b\u6700\u65b0\u306e\u60c5\u5831\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u65c5\u884c\u8a08\u753b\u306e\u7acb\u6848\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u30d5\u30a1\u30a4\u30eb\u691c\u7d22\uff08File search\uff09<\/strong><\/h3>\n\n\n\n<p>\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3084\u57cb\u3081\u8fbc\u307f\u30d9\u30af\u30c8\u30eb\u30b9\u30c8\u30a2\u3092\u691c\u7d22\u3057\u3001\u5fc5\u8981\u306a\u5185\u5bb9\u3092\u62bd\u51fa\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u305f\u30c4\u30fc\u30eb\u3067\u3059\u3002\u3053\u306e\u30c4\u30fc\u30eb\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001AI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306f\u5927\u91cf\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304b\u3089\u5fc5\u8981\u306a\u60c5\u5831\u3092\u52b9\u7387\u7684\u306b\u898b\u3064\u3051\u51fa\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u63d0\u4f9b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4f7f\u7528\u4f8b<\/h4>\n\n\n\n<p>\u4f8b\u3048\u3070\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u300cOpenAI\u306e\u6df1\u5c64\u7814\u7a76\u3068\u306f\u4f55\u3067\u3059\u304b\uff1f\u300d\u3068\u5c0b\u306d\u305f\u5834\u5408\u3001\u30d5\u30a1\u30a4\u30eb\u691c\u7d22\u30c4\u30fc\u30eb\u3092\u5229\u7528\u3057\u3066\u95a2\u9023\u3059\u308b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304b\u3089\u5fc5\u8981\u306a\u60c5\u5831\u3092\u62bd\u51fa\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"input-field-container source-code-container\">\n<pre class=\"wp-block-code\"><code>from openai import OpenAI\nclient = OpenAI()\n\nresponse = client.responses.create(\n    model=\"gpt-4o-mini\",\n    input=\"What is deep research by OpenAI?\",\n    tools=[{\n        \"type\": \"file_search\",\n        \"vector_store_ids\": [\"&lt;vector_store_id&gt;\"]\n    }]\n)\nprint(response)\n<\/code><\/pre>\n<\/div>\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5b9f\u7528\u7684\u306a\u5fdc\u7528<\/h4>\n\n\n\n<p><strong>FAQ\u306e\u691c\u7d22<\/strong>: \u9867\u5ba2\u30b5\u30dd\u30fc\u30c8\u3084\u793e\u5185\u5411\u3051FAQ\u30b7\u30b9\u30c6\u30e0\u306b\u304a\u3044\u3066\u3001\u95a2\u9023\u3059\u308b\u8cea\u554f\u3068\u56de\u7b54\u3092\u8fc5\u901f\u306b\u691c\u7d22\u3057\u3001\u63d0\u4f9b\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u7591\u554f\u3092\u8fc5\u901f\u306b\u89e3\u6c7a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u30de\u30cb\u30e5\u30a2\u30eb\u306e\u691c\u7d22<\/strong>: \u88fd\u54c1\u3084\u30b5\u30fc\u30d3\u30b9\u306b\u95a2\u3059\u308b\u30de\u30cb\u30e5\u30a2\u30eb\u304b\u3089\u5fc5\u8981\u306a\u60c5\u5831\u3092\u62bd\u51fa\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u63d0\u4f9b\u3057\u307e\u3059\u3002\u6280\u8853\u8005\u3084\u30b5\u30dd\u30fc\u30c8\u30b9\u30bf\u30c3\u30d5\u306b\u3068\u3063\u3066\u6709\u76ca\u3067\u3059\u3002<\/p>\n\n\n\n<p><strong>\u6cd5\u52d9\u6587\u66f8\u306e\u691c\u7d22<\/strong>: \u6cd5\u52d9\u90e8\u9580\u3067\u306f\u3001\u5927\u91cf\u306e\u5951\u7d04\u66f8\u3084\u6cd5\u52d9\u6587\u66f8\u304b\u3089\u95a2\u9023\u3059\u308b\u6761\u9805\u3084\u5185\u5bb9\u3092\u691c\u7d22\u3057\u3001\u8fc5\u901f\u306b\u60c5\u5831\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u6cd5\u52d9\u90e8\u9580\u306e\u696d\u52d9\u52b9\u7387\u5316\u306b\u5bc4\u4e0e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u7814\u7a76\u8cc7\u6599\u306e\u691c\u7d22<\/strong>: \u5b66\u8853\u7814\u7a76\u3084\u30d3\u30b8\u30cd\u30b9\u30ea\u30b5\u30fc\u30c1\u306b\u304a\u3044\u3066\u3001\u95a2\u9023\u3059\u308b\u7814\u7a76\u8cc7\u6599\u3084\u30c7\u30fc\u30bf\u3092\u691c\u7d22\u3057\u3001\u7814\u7a76\u8005\u3084\u30a2\u30ca\u30ea\u30b9\u30c8\u306b\u63d0\u4f9b\u3057\u307e\u3059\u3002\u7814\u7a76\u306e\u8cea\u3068\u52b9\u7387\u3092\u5411\u4e0a\u3055\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u5229\u7528\uff08Computer use\uff09<\/strong><\/h3>\n\n\n\n<p>AI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3068\u5bfe\u8a71\u3057\u3001\u30af\u30ea\u30c3\u30af\u3084\u30bf\u30a4\u30d4\u30f3\u30b0\u3001\u30b9\u30af\u30ed\u30fc\u30eb\u306a\u3069\u306e\u30bf\u30b9\u30af\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u305f\u30c4\u30fc\u30eb\u3067\u3059\u3002\u3053\u306e\u30c4\u30fc\u30eb\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306f\u4eba\u9593\u306e\u64cd\u4f5c\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3057\u3001\u3055\u307e\u3056\u307e\u306a\u30bf\u30b9\u30af\u3092\u81ea\u52d5\u5316\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4f7f\u7528\u4f8b<\/h4>\n\n\n\n<p>\u4f8b\u3048\u3070\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u300cbing.com\u3067\u6700\u65b0\u306eOpenAI\u30cb\u30e5\u30fc\u30b9\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u300d\u3068\u4f9d\u983c\u3057\u305f\u5834\u5408\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u5229\u7528\u30c4\u30fc\u30eb\u3092\u5229\u7528\u3057\u3066\u30d6\u30e9\u30a6\u30b6\u3092\u64cd\u4f5c\u3057\u3001\u5fc5\u8981\u306a\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"input-field-container source-code-container\">\n<pre class=\"wp-block-code\"><code>from openai import OpenAI\nclient = OpenAI()\n\nresponse = client.responses.create(\n    model=\"computer-use-preview\",\n    tools=[{\n        \"type\": \"computer_use_preview\",\n        \"display_width\": 1024,\n        \"display_height\": 768,\n        \"environment\": \"browser\" # \u4ed6\u306e\u53ef\u80fd\u306a\u5024: \"mac\", \"windows\", \"ubuntu\"\n    }],\n    input=[\n        {\n            \"role\": \"user\",\n            \"content\": \"Check the latest OpenAI news on bing.com.\"\n        }\n    ],\n    reasoning={\n        \"generate_summary\": \"concise\",\n    },\n    truncation=\"auto\"\n)\n\nprint(response.output)\n<\/code><\/pre>\n<\/div>\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5b9f\u7528\u7684\u306a\u5fdc\u7528<\/h4>\n\n\n\n<p><strong>\u30aa\u30f3\u30e9\u30a4\u30f3\u30b7\u30e7\u30c3\u30d4\u30f3\u30b0\u306e\u81ea\u52d5\u5316:<\/strong> \u30e6\u30fc\u30b6\u30fc\u304c\u7279\u5b9a\u306e\u5546\u54c1\u3092\u8cfc\u5165\u3057\u305f\u3044\u5834\u5408\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u30aa\u30f3\u30e9\u30a4\u30f3\u30b7\u30e7\u30c3\u30d4\u30f3\u30b0\u30b5\u30a4\u30c8\u3067\u5546\u54c1\u3092\u691c\u7d22\u3057\u3001\u6307\u5b9a\u3057\u305f\u6761\u4ef6\u306b\u5408\u3063\u305f\u5546\u54c1\u3092\u30ab\u30fc\u30c8\u306b\u8ffd\u52a0\u3057\u3001\u8cfc\u5165\u624b\u7d9a\u304d\u3092\u5b8c\u4e86\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u5b9a\u671f\u7684\u306a\u30bf\u30b9\u30af\u306e\u81ea\u52d5\u5316:<\/strong> \u6bce\u65e5\u3001\u9031\u6b21\u3001\u6708\u6b21\u306e\u5b9a\u671f\u7684\u306a\u30bf\u30b9\u30af\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u30d6\u30e9\u30a6\u30b6\u3084PC\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u64cd\u4f5c\u3057\u3066\u3001\u5b9a\u671f\u7684\u306a\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u3001\u30e1\u30fc\u30eb\u306e\u9001\u4fe1\u3001\u30c7\u30fc\u30bf\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u306a\u3069\u306e\u30bf\u30b9\u30af\u3092\u81ea\u52d5\u5316\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u30c7\u30fc\u30bf\u30a8\u30f3\u30c8\u30ea\u306e\u81ea\u52d5\u5316:<\/strong> \u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u5165\u529b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u6307\u5b9a\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u6b63\u78ba\u306b\u5165\u529b\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u4eba\u9593\u306b\u3088\u308b\u624b\u4f5c\u696d\u306e\u624b\u9593\u3068\u30a8\u30e9\u30fc\u304c\u524a\u6e1b\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Agents SDK<\/h2>\n\n\n\n<p>Agents SDK\u306f\u3001\u5b9f\u9a13\u7684\u306a\u300cSwarm\u300d\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u57fa\u306b\u69cb\u7bc9\u3055\u308c\u3066\u304a\u308a\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u30ad\u30c3\u30c8\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u8907\u6570\u306e\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u9023\u643a\u3057\u3001\u8907\u96d1\u306a\u30bf\u30b9\u30af\u3092\u5354\u529b\u3057\u3066\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u4e3b\u306a\u6a5f\u80fd\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30cf\u30f3\u30c9\u30aa\u30d5\uff08Handoff\uff09<\/strong>\uff1a\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u9593\u3067\u30bf\u30b9\u30af\u3092\u30b7\u30fc\u30e0\u30ec\u30b9\u306b\u5207\u308a\u66ff\u3048\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30ac\u30fc\u30c9\u30ec\u30fc\u30eb\uff08Guardrail\uff09<\/strong>\uff1a\u5b89\u5168\u3067\u4fe1\u983c\u6027\u306e\u3042\u308b\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u52d5\u4f5c\u3092\u4fdd\u8a3c\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30c8\u30ec\u30fc\u30b9\uff08Trace\uff09<\/strong>\uff1a\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u76e3\u8996\u3057\u3001\u554f\u984c\u3092\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u30cf\u30f3\u30c9\u30aa\u30d5\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u7279\u5b9a\u306e\u30bf\u30b9\u30af\u3092\u6700\u9069\u306a\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306b\u5f15\u304d\u7d99\u3050\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5404\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u5f97\u610f\u3068\u3059\u308b\u5206\u91ce\u3067\u52b9\u7387\u7684\u306b\u30bf\u30b9\u30af\u3092\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>Agents SDK\u306b\u306f\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u52d5\u4f5c\u3092\u76e3\u8996\u3057\u3001\u5b89\u5168\u6027\u3092\u78ba\u4fdd\u3059\u308b\u305f\u3081\u306e\u30ac\u30fc\u30c9\u30ec\u30fc\u30eb\u6a5f\u80fd\u304c\u7d44\u307f\u8fbc\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u4e0d\u9069\u5207\u306a\u52d5\u4f5c\u3092\u884c\u308f\u306a\u3044\u3088\u3046\u306b\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3055\u3089\u306b\u3001\u30c8\u30ec\u30fc\u30b9\u6a5f\u80fd\u3092\u7528\u3044\u308b\u3053\u3068\u3067\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u5b9f\u884c\u5c65\u6b74\u3092\u8ffd\u8de1\u3057\u3001\u30c7\u30d0\u30c3\u30b0\u3084\u6700\u9069\u5316\u304c\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u52d5\u4f5c\u3092\u53ef\u8996\u5316\u3057\u3001\u554f\u984c\u306e\u7279\u5b9a\u3084\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u306b\u5f79\u7acb\u3066\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4f7f\u7528\u4f8b<\/h4>\n\n\n\n<p>\u30ab\u30b9\u30bf\u30de\u30fc\u30b5\u30dd\u30fc\u30c8\u306e\u30b7\u30ca\u30ea\u30aa\u3092\u8003\u3048\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u8907\u6570\u306e\u5c02\u9580\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u7570\u306a\u308b\u30bf\u30a4\u30d7\u306e\u554f\u3044\u5408\u308f\u305b\u306b\u5bfe\u5fdc\u3059\u308b\u5834\u5408\u3001Agents SDK\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u52b9\u7387\u7684\u306a\u30bf\u30b9\u30af\u306e\u59d4\u4efb\u304c\u53ef\u80fd\u306b\u306a\u308a\u3001\u5404\u554f\u3044\u5408\u308f\u305b\u304c\u6700\u9069\u306a\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306b\u3088\u3063\u3066\u51e6\u7406\u3055\u308c\u308b\u3053\u3068\u304c\u4fdd\u8a3c\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"input-field-container source-code-container\">\n<pre class=\"wp-block-code\"><code>from agents import Agent, Runner\nimport asyncio\n\nspanish_agent = Agent(\n    name=\"Spanish agent\",\n    instructions=\"You only speak Spanish.\",\n)\n\nenglish_agent = Agent(\n    name=\"English agent\",\n    instructions=\"You only speak English.\",\n)\n\ntriage_agent = Agent(\n    name=\"Triage agent\",\n    instructions=\"Handoff to the appropriate agent based on the language of the request.\",\n    handoffs=[spanish_agent, english_agent],\n)\n\nasync def main():\n    result = await Runner.run(triage_agent, input=\"Hola, \u00bfc\u00f3mo est\u00e1s?\")\n    print(result.final_output)\n    # Output: \u00a1Hola! Estoy bien, gracias por preguntar. \u00bfY t\u00fa, c\u00f3mo est\u00e1s?\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n\n<\/code><\/pre>\n<\/div>\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5b9f\u7528\u7684\u306a\u5fdc\u7528<\/h4>\n\n\n\n<p><strong>\u30ab\u30b9\u30bf\u30de\u30fc\u30b5\u30dd\u30fc\u30c8\u306e\u52b9\u7387\u5316:<\/strong> \u9867\u5ba2\u304b\u3089\u306e\u554f\u3044\u5408\u308f\u305b\u306b\u8fc5\u901f\u304b\u3064\u6b63\u78ba\u306b\u5bfe\u5fdc\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u3002Agents SDK\u306e\u30cf\u30f3\u30c9\u30aa\u30d5\u6a5f\u80fd\u3092\u5229\u7528\u3057\u3066\u3001\u9867\u5ba2\u306e\u554f\u3044\u5408\u308f\u305b\u3092\u6700\u9069\u306a\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306b\u5f15\u304d\u7d99\u304e\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u30d1\u30fc\u30bd\u30ca\u30e9\u30a4\u30ba\u30c9\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0:<\/strong> \u9867\u5ba2\u30c7\u30fc\u30bf\u3092\u5206\u6790\u3057\u3001\u500b\u3005\u306e\u9867\u5ba2\u306b\u6700\u9069\u306a\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u3092\u5b9f\u65bd\u3059\u308b\u5834\u5408\u3002Agents SDK\u3092\u4f7f\u7528\u3057\u3066\u3001\u9867\u5ba2\u306e\u884c\u52d5\u30c7\u30fc\u30bf\u3092\u5206\u6790\u3057\u3001\u30d1\u30fc\u30bd\u30ca\u30e9\u30a4\u30ba\u30c9\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u3092\u81ea\u52d5\u7684\u306b\u751f\u6210\u3059\u308b\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30de\u30cd\u30b8\u30e1\u30f3\u30c8:<\/strong> \u8907\u6570\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u540c\u6642\u306b\u7ba1\u7406\u3057\u3001\u52b9\u7387\u7684\u306b\u9032\u6357\u3092\u8ffd\u8de1\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u3002Agents SDK\u306e\u30c8\u30ec\u30fc\u30b9\u6a5f\u80fd\u3092\u5229\u7528\u3057\u3066\u3001\u5404\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u9032\u6357\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u8ffd\u8de1\u3057\u3001\u554f\u984c\u304c\u767a\u751f\u3057\u305f\u969b\u306b\u306f\u9069\u5207\u306a\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306b\u30bf\u30b9\u30af\u3092\u5f15\u304d\u7d99\u304e\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>IT\u30b7\u30b9\u30c6\u30e0\u306e\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3068\u7ba1\u7406:<\/strong> \u4f01\u696d\u306eIT\u30b7\u30b9\u30c6\u30e0\u309224\u6642\u9593\u4f53\u5236\u3067\u76e3\u8996\u3057\u3001\u554f\u984c\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306b\u8fc5\u901f\u306b\u5bfe\u5fdc\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u3002Agents SDK\u306e\u30ac\u30fc\u30c9\u30ec\u30fc\u30eb\u6a5f\u80fd\u3092\u6d3b\u7528\u3057\u3066\u3001\u30b7\u30b9\u30c6\u30e0\u76e3\u8996\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u30b7\u30b9\u30c6\u30e0\u306e\u72b6\u614b\u3092\u76e3\u8996\u3057\u3001\u7570\u5e38\u3092\u691c\u77e5\u3057\u305f\u969b\u306b\u306f\u30a2\u30e9\u30fc\u30c8\u3092\u767a\u751f\u3055\u305b\u3001\u9069\u5207\u306a\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306b\u5bfe\u5fdc\u3092\u4f9d\u983c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>OpenAI\u306e\u6700\u65b0\u30c4\u30fc\u30eb\u300cResponses API\u300d\u3068\u300cAgents SDK\u300d\u306f\u3001AI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u69cb\u7bc9\u3068\u904b\u7528\u306b\u9769\u547d\u3092\u3082\u305f\u3089\u3059\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u30c4\u30fc\u30eb\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u958b\u767a\u8005\u306f\u3088\u308a\u52b9\u7387\u7684\u304b\u3064\u67d4\u8edf\u306bAI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092\u958b\u767a\u3057\u3001\u8907\u96d1\u306a\u30bf\u30b9\u30af\u3092\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Responses API<\/strong>\u306f\u3001Web\u691c\u7d22\u3001\u30d5\u30a1\u30a4\u30eb\u691c\u7d22\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u5229\u7528\u306a\u3069\u306e\u6a5f\u80fd\u3092\u7d71\u5408\u3057\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u6700\u65b0\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3001\u6b63\u78ba\u306a\u5fdc\u7b54\u3092\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>Agents SDK<\/strong>\u306f\u3001\u8907\u6570\u306e\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092\u9023\u643a\u3055\u305b\u3001\u30cf\u30f3\u30c9\u30aa\u30d5\u6a5f\u80fd\u3092\u6d3b\u7528\u3057\u3066\u30bf\u30b9\u30af\u3092\u6700\u9069\u306a\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306b\u5f15\u304d\u7d99\u3050\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5404\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u5f97\u610f\u3068\u3059\u308b\u5206\u91ce\u3067\u52b9\u7387\u7684\u306b\u30bf\u30b9\u30af\u3092\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u6a5f\u80fd\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u9593\u306e\u9023\u643a\u304c\u5f37\u5316\u3055\u308c\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u5bfe\u3057\u3066\u9ad8\u54c1\u8cea\u306a\u30b5\u30fc\u30d3\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u304c\u671f\u5f85\u3055\u308c\u307e\u3059\u3002\u307e\u305f\u3001\u3055\u307e\u3056\u307e\u306a\u30d3\u30b8\u30cd\u30b9\u30b7\u30ca\u30ea\u30aa\u3067\u52b9\u7387\u7684\u304b\u3064\u52b9\u679c\u7684\u306a\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u4f01\u696d\u3084\u958b\u767a\u8005\u306f\u65b0\u305f\u306a\u30ec\u30d9\u30eb\u306e\u81ea\u52d5\u5316\u3068\u52b9\u7387\u5316\u3092\u5b9f\u73fe\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenAI\u306e\u300cResponses API\u300d\u3068\u300cAgents SDK\u300d\u306f\u3001AI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u69cb\u7bc9\u3068\u904b\u7528\u306b\u9769\u65b0\u3092\u3082\u305f\u3089\u3057\u307e\u3059\u3002\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u60c5\u5831\u691c\u7d22\u3092\u53ef\u80fd\u306b\u3057\u3001\u30bf\u30b9\u30af\u306e\u52b9\u7387\u7684\u306a\u5f15\u304d\u7d99\u304e\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5f37\u529b\u306aAI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u69cb\u7bc9\u304c\u5b9f\u73fe\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":216,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"vkexunit_cta_each_option":"","footnotes":""},"categories":[3],"tags":[8],"class_list":["post-206","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-columns","tag-ai"],"_links":{"self":[{"href":"https:\/\/itexplore.org\/jp\/wp-json\/wp\/v2\/posts\/206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itexplore.org\/jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itexplore.org\/jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itexplore.org\/jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itexplore.org\/jp\/wp-json\/wp\/v2\/comments?post=206"}],"version-history":[{"count":10,"href":"https:\/\/itexplore.org\/jp\/wp-json\/wp\/v2\/posts\/206\/revisions"}],"predecessor-version":[{"id":217,"href":"https:\/\/itexplore.org\/jp\/wp-json\/wp\/v2\/posts\/206\/revisions\/217"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itexplore.org\/jp\/wp-json\/wp\/v2\/media\/216"}],"wp:attachment":[{"href":"https:\/\/itexplore.org\/jp\/wp-json\/wp\/v2\/media?parent=206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itexplore.org\/jp\/wp-json\/wp\/v2\/categories?post=206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itexplore.org\/jp\/wp-json\/wp\/v2\/tags?post=206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}