{"id":692457,"date":"2026-03-25T10:23:56","date_gmt":"2026-03-25T09:23:56","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=ai&#038;p=692457"},"modified":"2026-03-25T10:24:00","modified_gmt":"2026-03-25T09:24:00","slug":"building-ai-agents-in-kotlin-part-5-teaching-agents-to-forget","status":"publish","type":"ai","link":"https:\/\/blog.jetbrains.com\/ja\/ai\/2026\/03\/building-ai-agents-in-kotlin-part-5-teaching-agents-to-forget\/","title":{"rendered":"AI \u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092 Kotlin \u3067\u69cb\u7bc9\u3059\u308b \u2013 \u7b2c 5 \u56de\uff1a\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u60c5\u5831\u3092\u5fd8\u308c\u308b\u4ed5\u7d44\u307f\u306e\u5b9f\u88c5"},"content":{"rendered":"<p>\u3053\u306e\u9023\u8f09\u306e\u904e\u53bb\u8a18\u4e8b:<\/p>\n<ul>\n<li><a href=\"https:\/\/blog.jetbrains.com\/ai\/2025\/11\/building-ai-agents-in-kotlin-part-1-a-minimal-coding-agent\/\" target=\"_blank\" rel=\"noreferrer noopener\">AI \u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092 Kotlin \u3067\u69cb\u7bc9\u3059\u308b \uff0d \u7b2c 1 \u56de\uff1a\u30df\u30cb\u30de\u30eb\u306a\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u5b9f\u88c5 <\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/ai\/2025\/11\/building-ai-agents-in-kotlin-part-2-a-deeper-dive-into-tools\/\" target=\"_blank\" rel=\"noreferrer noopener\">AI \u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092 Kotlin \u3067\u69cb\u7bc9\u3059\u308b \uff0d \u7b2c 2 \u56de\uff1a\u30c4\u30fc\u30eb\u306e\u6df1\u6398\u308a<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/ai\/2025\/12\/building-ai-agents-in-kotlin-part-3-under-observation\/\" target=\"_blank\" rel=\"noreferrer noopener\">AI \u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092 Kotlin \u3067\u69cb\u7bc9\u3059\u308b \uff0d \u7b2c 3 \u56de\uff1a\u89b3\u6e2c<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/ai\/2026\/01\/building-ai-agents-in-kotlin-part-4-delegation-and-sub-agents\/\" target=\"_blank\" rel=\"noreferrer noopener\">AI \u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092 Kotlin \u3067\u69cb\u7bc9\u3059\u308b \uff0d \u7b2c 4 \u56de\uff1a\u59d4\u8b72\u3068\u30b5\u30d6\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8<\/a><\/li>\n<\/ul>\n<p><strong>\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306f\u6700\u7d42\u7684\u306b\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3092\u4f7f\u3044\u679c\u305f\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u305d\u3046\u306a\u308b\u3068\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306f\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u3001\u51e6\u7406\u4e2d\u306e\u30bf\u30b9\u30af\u304c\u3059\u3079\u3066\u5931\u308f\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/strong><\/p>\n<p><a href=\"https:\/\/blog.jetbrains.com\/ai\/2025\/11\/building-ai-agents-in-kotlin-part-1-a-minimal-coding-agent\/\">\u30d1\u30fc\u30c8 1<\/a> \u304b\u3089 GPT-5 Codex \u3092\u305a\u3063\u3068\u5b9f\u884c\u3057\u3066\u304d\u307e\u3057\u305f\u304c\u3001 \u3053\u306e\u30e2\u30c7\u30eb\u306f SWE-bench Verified \u3067\u306f 0.58 \u3068\u3044\u3046\u30b9\u30b3\u30a2\u3092\u51fa\u3057\u307e\u3057\u305f\u3002\u6b21\u306b\u8a66\u3057\u305f Claude Sonnet 4.5 \u306f 0.6 \u306e\u30b9\u30b3\u30a2\u3092\u51fa\u3057\u3001\u307b\u3068\u3093\u3069\u306e\u30bf\u30b9\u30af\u3067\u5b9f\u884c\u901f\u5ea6\u304c\u5411\u4e0a\u3057\u307e\u3057\u305f\u304c\u3001 \u8907\u96d1\u306a\u554f\u984c\u306b\u3088\u308a\u3001Claude \u306e 200,000 \u3068\u3044\u3046\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u6bd4\u8f03\u7684\u65e9\u304f\u5230\u9054\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\u00a0<\/p>\n<p>\u7686\u3055\u3093\u3082\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6539\u5584\u3001\u4f4e\u30b3\u30b9\u30c8\u5316\u3001\u3042\u308b\u3044\u306f\u30ed\u30fc\u30ab\u30eb\u3067\u306e\u5b9f\u884c\u3092\u76ee\u7684\u306b\u30e2\u30c7\u30eb\u3092\u5207\u308a\u66ff\u3048\u308b\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u304c\u3001 \u305d\u308c\u306b\u3088\u3063\u3066\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u5c0f\u3055\u304f\u306a\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u7279\u306b\u9ad8\u4fa1\u306a\u30e1\u30e2\u30ea\u306b\u5236\u7d04\u3055\u308c\u308b\u30ed\u30fc\u30ab\u30eb\u30e2\u30c7\u30eb\u3067\u306f\u7279\u306b\u9855\u8457\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u3069\u3093\u306a\u306b\u5927\u304d\u304f\u3066\u3082\u3001\u8907\u96d1\u3067\u9577\u6642\u9593\u306b\u308f\u305f\u308b\u30bf\u30b9\u30af\u3067\u306f\u5931\u6557\u3057\u307e\u3059\u3002\u3055\u3089\u306b\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306b\u8cbb\u7528\u3092\u304b\u3051\u7d9a\u3051\u308b\u308f\u3051\u306b\u306f\u3044\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u554f\u984c\u306a\u306e\u306f\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u500b\u3005\u306e\u30d5\u30a1\u30a4\u30eb\u3001\u30b3\u30de\u30f3\u30c9\u51fa\u529b\u3001\u691c\u7d22\u7d50\u679c\u3001\u30e6\u30fc\u30b6\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3068\u3044\u3063\u305f\u3059\u3079\u3066\u306e\u60c5\u5831\u3092\u4fdd\u6301\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u6700\u7d42\u7684\u306b\u306f\u3053\u308c\u3089\u3092\u4fdd\u6301\u3059\u308b\u5bb9\u91cf\u304c\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u51fa\u756a\u3068\u306a\u308b\u306e\u304c\u5727\u7e2e\u3067\u3059\u3002\u305f\u3060\u3057\u3001\u5bb9\u91cf\u5207\u308c\u306b\u306a\u3063\u305f\u3068\u304d\u306b\u5358\u306b\u53e4\u3044\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u524a\u9664\u3059\u308b\u3068\u3044\u3046\u5f8c\u8ffd\u3044\u306e\u3084\u308a\u65b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3042\u308b\u30bf\u30b9\u30af\u3092\u4ed6\u306e\u958b\u767a\u8005\u306b\u5f15\u304d\u7d99\u3050\u72b6\u6cc1\u3092\u60f3\u50cf\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u81ea\u5206\u304c\u3084\u3063\u305f\u3053\u3068\u3092\u3059\u3079\u3066\u8a18\u3057\u305f\u6587\u66f8\u3092\u6e21\u3059\u3053\u3068\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u3002\u76ee\u6a19\u3001\u5909\u66f4\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3001\u4f5c\u696d\u5185\u5bb9\u3001\u305d\u3057\u3066\u3084\u3089\u306a\u304b\u3063\u305f\u3053\u3068\u3092\u4f1d\u3048\u308b\u306f\u305a\u3067\u3059\u3002\u305d\u308c\u304c\u307e\u3055\u306b\u30b9\u30de\u30fc\u30c8\u5727\u7e2e\u3067\u3042\u308a\u3001\u51e6\u7406\u3092\u7d99\u7d9a\u3055\u305b\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3092\u7dad\u6301\u3057\u3001\u7121\u99c4\u306a\u5c65\u6b74\u3092\u524a\u9664\u3059\u308b\u624b\u6cd5\u306a\u306e\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u3092 <a href=\"https:\/\/github.com\/JetBrains\/koog\" target=\"_blank\" rel=\"noopener\">Koog<\/a> \u3067\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u3092\u8003\u3048\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u307e\u305a\u3001<a href=\"https:\/\/blog.jetbrains.com\/ai\/2025\/11\/building-ai-agents-in-kotlin-part-1-a-minimal-coding-agent\/\">\u30d1\u30fc\u30c8 1<\/a> \u304b\u3089 <code>strategy = singleRunStrategy()<\/code> \u304c\u884c\u3063\u3066\u304d\u305f\u3053\u3068\u3092\u7406\u89e3\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u308c\u306b\u3088\u308a\u3001\u6226\u7565\u3092\u901a\u3058\u3066\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u30eb\u30fc\u30d7\u3092\u3069\u306e\u3088\u3046\u306b\u5236\u5fa1\u3057\u3001\u958b\u767a\u8005\u304c\u3069\u306e\u3088\u3046\u306b\u305d\u306e\u30eb\u30fc\u30d7\u3092\u5909\u66f4\u3057\u3066\u72ec\u81ea\u306e\u30d5\u30ed\u30fc\u3092\u4f5c\u6210\u3067\u304d\u308b\u306e\u308b\u304b\u304c\u898b\u3048\u3066\u304d\u307e\u3059\u3002\u307e\u305a\u306f <code>singleRunStrategy()<\/code> \u3092\u78ba\u8a8d\u3057\u3001\u305d\u306e\u5f8c\u3067\u81ea\u52d5\u7684\u306b\u5727\u7e2e\u3059\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30d3\u30eb\u30c9\u3057\u307e\u3057\u3087\u3046\u3002\u00a0<\/p>\n<h2 class=\"wp-block-heading\">strategy \u884c\u306e\u51e6\u7406\u5185\u5bb9<\/h2>\n<p>\u3053\u308c\u307e\u3067\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092\u30d3\u30eb\u30c9\u3057\u307e\u3057\u305f\u3002\u305d\u306e\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306b\u30c4\u30fc\u30eb\u3092\u4e0e\u3048\u3001\u4ee5\u4e0b\u306e\u884c\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"kotlin\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">strategy = singleRunStrategy()<\/pre>\n<p>\u3053\u306e strategy\uff08\u6226\u7565\uff09\u306f\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30eb\u30fc\u30d7\u3092\u5b9f\u884c\u3059\u308b\u30b3\u30fc\u30c9\u3067\u3059\u3002\u3059\u3079\u3066\u306e\u6226\u7565\u306f LLM \u306e\u547c\u3073\u51fa\u3057\u3001\u30c4\u30fc\u30eb\u306e\u5b9f\u884c\u3001\u7d50\u679c\u306e\u9001\u308a\u8fd4\u3057\u3001\u305d\u306e\u7e70\u308a\u8fd4\u3057\u3068\u3044\u3046\u540c\u3058\u57fa\u672c\u8981\u7d20\u3092\u5171\u6709\u3057\u3066\u3044\u307e\u3059\u304c\u3001 <strong>\u505c\u6b62\u306e\u30bf\u30a4\u30df\u30f3\u30b0<\/strong>\u3068<strong>\u53cd\u5fa9\u51e6\u7406\u306e\u9593\u306b\u5b9f\u884c\u3059\u308b\u5185\u5bb9<\/strong>\u306f\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><code>singleRunStrategy()<\/code> \u306f\u6700\u5927\u9650\u306b\u5358\u7d14\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3059\u3002LLM \u304c\u30c4\u30fc\u30eb\u306e\u547c\u3073\u51fa\u3057\u3092\u8fd4\u3059\u9650\u308a\u3001\u53cd\u5fa9\u51e6\u7406\u3092\u7d9a\u3051\u307e\u3059\u3002\u8a00\u3044\u63db\u3048\u308b\u3068\u3001LLM \u306e\u547c\u3073\u51fa\u3057 \u2192 \u30c4\u30fc\u30eb\u306e\u547c\u3073\u51fa\u3057\u304c\u8fd4\u3055\u308c\u305f\u304b\uff1f \u2192 \u5b9f\u884c \u2192 \u518d\u547c\u3073\u51fa\u3057 \u2192 \u30c6\u30ad\u30b9\u30c8\u304c\u8fd4\u3055\u308c\u305f\u304b\uff1f \u2192 \u5b8c\u4e86\u3001\u3068\u3044\u3046\u4e00\u9023\u306e\u51e6\u7406\u3067\u3059\u3002<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-676937\" style=\"aspect-ratio: 0.9209809264305178; width: 338px; height: auto;\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2026\/01\/image-63.png\" alt=\"\" width=\"676\" height=\"734\" \/><\/figure>\n<p>\u5358\u7d14\u306a\u30bf\u30b9\u30af\u3067\u306f\u3053\u308c\u3067\u3082\u5341\u5206\u306b\u6a5f\u80fd\u3057\u307e\u3059\u304c\u3001 \u8907\u96d1\u306a\u554f\u984c\u3067\u306f\u5c65\u6b74\u304c\u5897\u5927\u3057\u7d9a\u3051\u307e\u3059\u3002\u500b\u3005\u306e\u30b3\u30de\u30f3\u30c9\u51fa\u529b\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u53d6\u308a\u3001\u691c\u7d22\u7d50\u679c\u304c\u3059\u3079\u3066\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306b\u7559\u307e\u308b\u305f\u3081\u3067\u3059\u3002\u6700\u7d42\u7684\u306b\u306f\u4e0a\u9650\u306b\u9054\u3057\u3001\u30bf\u30b9\u30af\u306e\u51e6\u7406\u306e\u9014\u4e2d\u3067\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u4ee3\u308f\u308a\u306b\u5fc5\u8981\u306a\u306e\u306f\u3001\u540c\u3058\u30eb\u30fc\u30d7\u3092\u5b9f\u884c\u3059\u308b\u3068\u540c\u6642\u306b\u3001<strong>\u5c65\u6b74\u306e\u30b5\u30a4\u30ba\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001\u904e\u5ea6\u306b\u5897\u5927\u3057\u3066\u3044\u308b\u5834\u5408\u306b\u5727\u7e2e\u3059\u308b<\/strong>\u6226\u7565\u3067\u3059\u3002<\/p>\n<h2 class=\"wp-block-heading\"><strong>\u5727\u7e2e\u3092\u8ffd\u52a0\u3059\u308b<\/strong><\/h2>\n<p>\u4ee5\u4e0b\u306e\u884c\u3092<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"kotlin\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">strategy = singleRunStrategy()<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u7f6e\u304d\u63db\u3048\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"kotlin\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">strategy = singleRunStrategyWithHistoryCompression()<\/pre>\n<p>\u30eb\u30fc\u30d7\u306f\u540c\u3058\u3067\u3059\u304c\u3001<code>Execute Tool<\/code> \u3068 <code>Send Tool<\/code> \u306e\u7d50\u679c\u306e\u9593\u306b\u30c1\u30a7\u30c3\u30af\u30dd\u30a4\u30f3\u30c8\u304c\u8ffd\u52a0\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u6226\u7565\u3067\u306f\u30c4\u30fc\u30eb\u3092\u5b9f\u884c\u3057\u305f\u5f8c\u3001\u5e38\u306b\u4ee5\u4e0b\u306e\u78ba\u8a8d\u304c\u884c\u308f\u308c\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30c1\u30a7\u30c3\u30af: \u5c65\u6b74\u306e\u30b5\u30a4\u30ba\u306f\u3057\u304d\u3044\u5024\u3092\u4e0a\u56de\u3063\u3066\u3044\u308b\u304b\uff1f<\/li>\n<li>\u4e0a\u56de\u3063\u3066\u3044\u308b\u5834\u5408\u306f\uff1f \u5727\u7e2e\u3059\u308b: \u91cd\u8981\u306a\u60c5\u5831\u3092\u62bd\u51fa\u3057\u3001 \u6b8b\u308a\u306f\u524a\u9664\u3059\u308b\u3002<\/li>\n<li>\u4e0a\u56de\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u306f\uff1f \u901a\u5e38\u901a\u308a\u7d9a\u884c\u3059\u308b\u3002<\/li>\n<\/ul>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-676948\" style=\"aspect-ratio: 0.5842696629213483; width: 351px; height: auto;\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2026\/01\/image-64.png\" alt=\"\" width=\"780\" height=\"1335\" \/><\/figure>\n<p>\u3053\u306e\u30c1\u30a7\u30c3\u30af\u30dd\u30a4\u30f3\u30c8\u304c\u3042\u308b\u3053\u3068\u3067\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306b\u5b9f\u884c\u6642\u9593\u306e\u9577\u3044\u30bf\u30b9\u30af\u3092\u3088\u308a\u53b3\u3057\u3044\u30c8\u30fc\u30af\u30f3\u4e88\u7b97\u5185\u3067\u5b8c\u4e86\u3055\u305b\u3001\u300c\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u8d85\u904e\u3057\u307e\u3057\u305f\u300d\u3068\u3044\u3046\u30a8\u30e9\u30fc\u3092\u56de\u907f\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u30c1\u30a7\u30c3\u30af\u30dd\u30a4\u30f3\u30c8\u306e\u69cb\u6210\u306f\u5fc5\u8981\u3067\u3059\u3002\u3053\u306e\u6226\u7565\u3067\u306f\u5c65\u6b74\u304c\u80a5\u5927\u5316\u3059\u308b\u6642\u671f\u3084\u3001\u3069\u306e\u3088\u3046\u306a\u60c5\u5831\u304c\u30bf\u30b9\u30af\u306b\u91cd\u8981\u3067\u3042\u308b\u304b\u3092\u63a8\u6e2c\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u6226\u7565\u306b\u306f\u5727\u7e2e\u306e<strong>\u30bf\u30a4\u30df\u30f3\u30b0<\/strong>\u3068\u4fdd\u6301\u3059\u308b<strong>\u60c5\u5831<\/strong>\u306e 2 \u3064\u3092\u6307\u793a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2 class=\"wp-block-heading\"><strong>\u5727\u7e2e\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u00a0<\/strong><\/h2>\n<p>\u307e\u305a\u3001\u5727\u7e2e\u304c\u958b\u59cb\u3055\u308c\u308b\u307e\u3067\u306b\u8a31\u5bb9\u3059\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u6570\u304b\u6587\u5b57\u6570\u3092\u3057\u304d\u3044\u5024\u3068\u3057\u3066\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"kotlin\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">val CODE_AGENT_HISTORY_TOO_BIG = { prompt -&gt;\n   prompt.messages.size &gt; 200 || prompt.messages.sumOf { it.content.length } &gt; 200_000}<\/pre>\n<p>\u306a\u305c\u3053\u308c\u3089\u306e\u6570\u5024\u304c\u9078\u3070\u308c\u305f\u306e\u3067\u3057\u3087\u3046\u304b\uff1f \u30a8\u30e9\u30fc\u767a\u751f\u7b87\u6240\u3092\u78ba\u8a8d\u3057\u305f\u5f8c\u3001\u3055\u307e\u3056\u307e\u306a\u3057\u304d\u3044\u5024\u3067\u5b9f\u9a13\u3092\u884c\u3044\u307e\u3057\u305f\u3002<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-676959\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2026\/01\/image-65.png\" alt=\"\" width=\"1600\" height=\"234\" \/><\/figure>\n<p>\u3053\u306e\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306f 220,000 \u30c8\u30fc\u30af\u30f3\u306b\u9054\u3057\u305f\u6642\u70b9\u3067\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u307e\u3057\u305f\u3002Claude \u306e\u4e0a\u9650\u306f 200,000 \u30c8\u30fc\u30af\u30f3\u3067\u3059\u3002\u305d\u3053\u306b\u9054\u3059\u308b\u524d\u306b\u5727\u7e2e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u30e1\u30c3\u30bb\u30fc\u30b8 200 \u4ef6\u304b 200,000 \u6587\u5b57\u306e\u3044\u305a\u308c\u304b\u306b\u9054\u3057\u305f\u5834\u5408\u306b\u5727\u7e2e\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u3053\u306e\u30b3\u30fc\u30c9\u306f\u30c8\u30fc\u30af\u30f3\u6570\u3067\u306f\u306a\u304f\u3001\u6587\u5b57\u6570\u3092\u8a08\u6e2c\u3059\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u3089\u306e\u6570\u5024\u306f\u7570\u306a\u3063\u3066\u306f\u3044\u308b\u3082\u306e\u306e\u3001\u3053\u306e\u3057\u304d\u3044\u5024\u306b\u3088\u3063\u3066\u30c8\u30fc\u30af\u30f3\u306e\u4e0a\u9650\u5185\u306b\u7dad\u6301\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u904e\u5ea6\u306e\u5727\u7e2e\u3092\u56de\u907f\u3059\u308b\u306e\u306b\u5341\u5206\u306b\u9ad8\u3044\u5024\u3067\u3042\u308a\u3001\u4e0a\u9650\u306b\u9054\u3055\u306a\u3044\u7a0b\u5ea6\u306b\u4f4e\u3044\u5024\u3067\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u6570\u5024\u306f\u56fa\u5b9a\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u4e0a\u9650\u306b\u9054\u3059\u308b\u306e\u304c\u65e9\u3051\u308c\u3070\u3001\u3057\u304d\u3044\u5024\u3092\u4f4e\u304f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u308c\u3067\u3082\u30bf\u30b9\u30af\u306e\u5b8c\u4e86\u307e\u3067\u306b\u3057\u304d\u3044\u5024\u3092\u8d85\u3048\u3066\u3057\u307e\u3046\u5834\u5408\u306f\u3001 \u3057\u304d\u3044\u5024\u3092\u4e0a\u3052\u307e\u3057\u3087\u3046\u3002\u3069\u306e\u3088\u3046\u306a\u9078\u629e\u3092\u3059\u308b\u304b\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u9577\u3055\u3001\u30c4\u30fc\u30eb\u306e\u51fa\u529b\u306e\u8a73\u7d30\u5ea6\u3001\u30bf\u30b9\u30af\u306e\u8907\u96d1\u5ea6\u306a\u3069\u3001\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306b\u3088\u3063\u3066\u7570\u306a\u308a\u307e\u3059\u3002\u8a66\u884c\u932f\u8aa4\u3092\u7e70\u308a\u8fd4\u3057\u3066\u9069\u5207\u306a\u5024\u3092\u898b\u3064\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u4fdd\u6301\u3059\u308b\u60c5\u5831<\/h2>\n<p>\u5727\u7e2e\u304c\u767a\u52d5\u3059\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u3092\u8a2d\u5b9a\u3057\u307e\u3057\u305f\u3002\u6b21\u306b\u3001\u4fdd\u6301\u3059\u308b\u60c5\u5831\u3092\u9078\u629e\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3053\u308c\u306b\u306f\u3001<strong>\u91cd\u8981\u306a\u60c5\u5831\u306e\u5224\u65ad\u3092 LLM \u306b\u4efb\u305b\u308b<\/strong>\u65b9\u6cd5\u3068<strong>\u62bd\u51fa\u3059\u3079\u304d\u60c5\u5831\u3092 LLM \u306b\u6b63\u78ba\u306b\u6307\u793a\u3059\u308b<\/strong>\u65b9\u6cd5\u306e 2 \u3064\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3 class=\"wp-block-heading\"><strong>\u30aa\u30d7\u30b7\u30e7\u30f3 1: LLM \u306b\u8981\u7d04\u3092\u4efb\u305b\u308b<\/strong><\/h3>\n<p>LLM \u306f <a href=\"https:\/\/api.koog.ai\/agents\/agents-core\/ai.koog.agents.core.dsl.extension\/-history-compression-strategy\/-whole-history\/index.html\" target=\"_blank\" rel=\"noopener\">WholeHistory<\/a> \u3092\u4f7f\u7528\u3057\u3066\u3069\u306e\u60c5\u5831\u304c\u91cd\u8981\u304b\u3092\u5224\u65ad\u3057\u307e\u3059\u3002<\/p>\n<p>compressionStrategy = WholeHistory<\/p>\n<p>\u5727\u7e2e\u304c\u767a\u52d5\u3059\u308b\u3068\u3001Koog \u306f LLM \u306b\u4f1a\u8a71\u5c65\u6b74\u5168\u4f53\u306e\u8981\u7d04\u3092\u4f5c\u6210\u3059\u308b\u3088\u3046\u306b\u8981\u6c42\u3057\u307e\u3059\u3002<\/p>\n<p><strong>\u5727\u7e2e\u524d:<\/strong><\/p>\n<ul>\n<li>\u3057\u304d\u3044\u5024\u306b\u81f3\u308b\u307e\u3067\u306e\u3059\u3079\u3066\u306e\u30e1\u30c3\u30bb\u30fc\u30b8: \u30b7\u30b9\u30c6\u30e0\u30d7\u30ed\u30f3\u30d7\u30c8\u3001\u30e6\u30fc\u30b6\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3001\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u306e\u5fdc\u7b54\u3001\u30c4\u30fc\u30eb\u306e\u547c\u3073\u51fa\u3057\u3001\u30c4\u30fc\u30eb\u306e\u7d50\u679c<\/li>\n<\/ul>\n<p><strong>\u5727\u7e2e\u5f8c:<\/strong><\/p>\n<ul>\n<li>\u30b7\u30b9\u30c6\u30e0\u30d7\u30ed\u30f3\u30d7\u30c8\uff08\u7dad\u6301\u3055\u308c\u308b\uff09<\/li>\n<li>\u6700\u521d\u306e\u30e6\u30fc\u30b6\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\uff08\u7dad\u6301\u3055\u308c\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u672c\u6765\u306e\u76ee\u6a19\u3092\u8a18\u61b6\u3057\u3066\u3044\u308b\uff09\u00a0<\/li>\n<li>1 \u3064\u306e\u6982\u8981\u30e1\u30c3\u30bb\u30fc\u30b8\uff08LLM \u306b\u3088\u3063\u3066\u4f5c\u6210\u3055\u308c\u308b\uff09<\/li>\n<\/ul>\n<p><strong>\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5:<\/strong> \u3053\u308c\u306f\u30b7\u30f3\u30d7\u30eb\u3067\u624b\u3063\u53d6\u308a\u65e9\u3044\u3082\u306e\u306e\u3001\u4f55\u304c\u91cd\u8981\u306a\u60c5\u5831\u306a\u306e\u304b\u306e\u5224\u65ad\u3092 LLM \u306b\u4efb\u305b\u308b\u65b9\u6cd5\u3067\u3059\u3002\u9069\u5207\u306a\u60c5\u5831\u304c\u6b63\u78ba\u306b\u7dad\u6301\u3055\u308c\u308b\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u304c\u3001 \u91cd\u8981\u306a\u5185\u5bb9\u304c\u7701\u7565\u3055\u308c\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3 class=\"wp-block-heading\"><strong>\u30aa\u30d7\u30b7\u30e7\u30f3 2: \u62bd\u51fa\u3059\u3079\u304d\u60c5\u5831\u3092 LLM \u306b\u6b63\u78ba\u306b\u6307\u793a\u3059\u308b<\/strong><\/h3>\n<p>\u30e2\u30c7\u30eb\u306b\u3059\u3079\u3066\u3092\u8981\u7d04\u3059\u308b\u3088\u3046\u306b\u6307\u793a\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001<a href=\"https:\/\/api.koog.ai\/agents\/agents-features\/agents-features-memory\/ai.koog.agents.memory.feature.history\/-retrieve-facts-from-history\/index.html\" target=\"_blank\" rel=\"noopener\"><code>RetrieveFactsFromHistory<\/code><\/a> \u3092\u4f7f\u7528\u3057\u3066\u3069\u306e\u60c5\u5831\u3092\u62bd\u51fa\u3059\u3079\u304d\u304b\u3092\u6b63\u78ba\u306b\u6307\u793a\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"kotlin\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">compressionStrategy = RetrieveFactsFromHistory(\n   Concept(...),\n   Concept(...),\n   ...\n)<\/pre>\n<p><strong>\u4eca\u5f8c\u306e\u6d41\u308c:<\/strong><\/p>\n<p><code>Concept<\/code> \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u7528\u3057\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u8a18\u61b6\u3059\u3079\u304d\u30bf\u30b9\u30af\u306b\u95a2\u3059\u308b\u5177\u4f53\u7684\u306a\u8cea\u554f\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u5727\u7e2e\u304c\u767a\u52d5\u3059\u308b\u3068\u3001Koog \u306f Concept \u3054\u3068\u306b 1 \u3064\u306e LLM \u547c\u3073\u51fa\u3057\u3092\u884c\u3044\u307e\u3059\u304c\u3001\u4f1a\u8a71\u5c65\u6b74\u5168\u4f53\u3092\u6bce\u56de\u9001\u4fe1\u3057\u3001\u305d\u306e 1 \u3064\u306e\u8cea\u554f\u3060\u3051\u3092\u5c0b\u306d\u3066\u3044\u307e\u3059\u3002<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-676970\" style=\"aspect-ratio: 1.7713498622589532; width: 579px; height: auto;\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2026\/01\/image-66.png\" alt=\"\" width=\"1286\" height=\"726\" \/><\/figure>\n<p>\u547c\u3073\u51fa\u3057\u3092\u5206\u96e2\u3059\u308b\u306e\u306f\u306a\u305c\u3067\u3057\u3087\u3046\u304b\uff1f LLM \u306f\u4e00\u5ea6\u306b\u8907\u6570\u306e\u8cea\u554f\u3092\u884c\u3063\u305f\u5834\u5408\u3001\u3046\u307e\u304f\u7b54\u3048\u3089\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u306f 8 \u500b\u306e Concept \u3092 1 \u500b\u306e\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u307e\u3068\u3081\u305f\u30c6\u30b9\u30c8\u3067\u78ba\u8a8d\u3055\u308c\u305f\u3053\u3068\u3067\u3059\u304c\u3001\u4e00\u90e8\u306e\u56de\u7b54\u304c\u3042\u3044\u307e\u3044\u306a\u72b6\u614b\u304b\u4e0d\u5b8c\u5168\u306a\u72b6\u614b\u3067\u8fd4\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\u4e00\u5ea6\u306b 1 \u3064\u305a\u3064\u8cea\u554f\u3059\u308c\u3070\u3001\u500b\u3005\u306e\u5fdc\u7b54\u306e\u4fe1\u983c\u6027\u304c\u9ad8\u307e\u308a\u307e\u3059\u3002<\/p>\n<p><strong>Concept \u306e\u5b9a\u7fa9<\/strong><\/p>\n<p>\u5404 <code>Concept<\/code> \u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u306f\u4ee5\u4e0b\u306e 3 \u3064\u306e\u8981\u7d20\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li><code>keyword<\/code>: \u30ed\u30b0\u306e\u30e9\u30d9\u30eb\u00a0<\/li>\n<li><code>description<\/code>: LLM \u304c\u56de\u7b54\u3059\u308b\u5fc5\u8981\u306e\u3042\u308b\u5b9f\u969b\u306e\u8cea\u554f\u307e\u305f\u306f\u6307\u793a\u00a0<\/li>\n<li><code>factType<\/code>: \u671f\u5f85\u3055\u308c\u308b\u56de\u7b54\u306e\u5f62\u5f0f\n<ul>\n<li>\u30ea\u30b9\u30c8\u306e\u5834\u5408\u306f <code>MULTIPLE<\/code><\/li>\n<li>\u5358\u4e00\u5024\u306e\u5834\u5408\u306f <code>SINGLE<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"kotlin\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Concept(\n    keyword = \"project-structure\",\n    description = \"What is the project structure?\",\n    factType = FactType.MULTIPLE\n)<\/pre>\n<h4 class=\"wp-block-heading\"><strong>\u9069\u5207\u306a Concept \u306e\u9078\u629e<\/strong><\/h4>\n<p>\u3053\u306e\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u5834\u5408\u3001\u4e3b\u306a\u7591\u554f\u306f\u300c\u3069\u3093\u306a\u60c5\u5831\u304c\u5931\u308f\u308c\u305f\u5834\u5408\u306b\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306f\u51e6\u7406\u3092\u6700\u521d\u304b\u3089\u3084\u308a\u76f4\u3059\u306e\u304b\uff1f\u300d\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\u00a0<\/p>\n<p>\u5727\u7e2e\u306b\u3088\u3063\u3066\u91cd\u8981\u306a\u60c5\u5831\u304c\u524a\u9664\u3055\u308c\u305f\u5834\u5408\u3001\u4ee5\u4e0b\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u540c\u3058\u30d5\u30a1\u30a4\u30eb\u3092\u4ee5\u524d\u306b\u8aad\u307f\u53d6\u3089\u308c\u305f\u3053\u3068\u304c\u306a\u3044\u304b\u306e\u3088\u3046\u306b\u4e8c\u5ea6\u958b\u3044\u3066\u3057\u307e\u3046\u3002<\/li>\n<li>\u3059\u3067\u306b\u5b58\u5728\u3059\u308b\u30c6\u30b9\u30c8\u3092\u66f8\u304d\u76f4\u3057\u3066\u3057\u307e\u3046\u3002<\/li>\n<li>\u5f53\u521d\u6307\u793a\u3057\u3066\u3044\u305f\u30bf\u30b9\u30af\u304b\u3089\u9038\u8131\u3057\u3066\u3057\u307e\u3046\u3002<\/li>\n<\/ul>\n<p>\u5931\u6557\u3059\u308b\u305f\u3073\u306b\u3001\u5727\u7e2e\u904e\u7a0b\u3067\u4fdd\u6301\u3055\u308c\u308b\u3079\u304d\u60c5\u5831\u304c\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30d5\u30a1\u30a4\u30eb\u304c\u7e70\u308a\u8fd4\u3057\u8abf\u67fb\u3055\u308c\u3066\u3044\u308b \u2192 <code>project-structure<\/code> Concept \u304c\u5fc5\u8981\u3067\u3059\u3002<\/li>\n<li>\u5b8c\u4e86\u3057\u305f\u4f5c\u696d\u3092\u3084\u308a\u76f4\u3057\u3066\u3044\u308b \u2192 <code>important-achievements<\/code> Concept \u304c\u5fc5\u8981\u3067\u3059\u3002<\/li>\n<li>\u65b9\u5411\u6027\u3092\u898b\u5931\u3063\u3066\u3044\u308b \u2192 <code>agent-goal<\/code> Concept \u304c\u5fc5\u8981\u3067\u3059\u3002<\/li>\n<\/ul>\n<h4 class=\"wp-block-heading\"><strong>\u3053\u306e\u8a18\u4e8b\u306e\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e Concept<\/strong><\/h4>\n<p>SWE-bench-Verified \u3067\u30c6\u30b9\u30c8\u3057\u305f\u969b\u306b\u306f 8 \u500b\u306e Concept \u304c\u5f97\u3089\u308c\u307e\u3057\u305f\u3002\u4ee5\u4e0b\u306f\u305d\u306e\u3046\u3061\u306e 3 \u500b\u3067\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"kotlin\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">val CODE_AGENT_COMPRESSION_STRATEGY = RetrieveFactsFromHistory(\n    Concept(\n        \"project-structure\",\n        \"What is the structure of this project?\",\n        FactType.MULTIPLE\n    ),\n    Concept(\n        \"important-achievements\",\n        \"What has been achieved during the execution of this current agent?\",\n        FactType.MULTIPLE\n    ),\n    Concept(\n        \"agent-goal\",\n        \"What is the primary goal or task the agent is trying to accomplish in this session?\",\n        FactType.SINGLE\n    ),\n    ...<\/pre>\n<p>\u4f5c\u6210\u3059\u308b\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306b\u3088\u3063\u3066\u306f\u3001\u7570\u306a\u308b Concept \u304c\u5fc5\u8981\u3068\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u76ee\u6a19\u306f\u3053\u306e\u30ea\u30b9\u30c8\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3053\u3068\u3067\u306f\u306a\u304f\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u52d5\u4f5c\u3092\u7d99\u7d9a\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u72b6\u614b\u3092\u7279\u5b9a\u3057\u3001\u305d\u306e\u60c5\u5831\u3092\u4fdd\u6301\u3059\u308b Concept \u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/JetBrains\/koog\/blob\/ea6cc04a8d989ae3d4656dfea0cbc2a1b89c9bdc\/examples\/code-agent\/step-05-history\/src\/main\/kotlin\/CodeAgentHistoryCompressionConfig.kt#L19\" target=\"_blank\" rel=\"noopener\">GitHub \u306b\u3042\u308b 8 \u500b\u306e Concept \u306e\u5b9f\u88c5\u5168\u4f53<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002\u00a0<\/p>\n<h2 class=\"wp-block-heading\">\u4f7f\u7528\u3059\u308b\u30e2\u30c7\u30eb\u00a0<\/h2>\n<p>\u30b5\u30d6\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3068\u540c\u69d8\u306b\uff08<a href=\"https:\/\/blog.jetbrains.com\/ai\/2026\/01\/building-ai-agents-in-kotlin-part-4-delegation-and-sub-agents\/\">\u30d1\u30fc\u30c8 4<\/a>\uff09\u3001\u30d7\u30ed\u30bb\u30b9\u306e\u5225\u3005\u306e\u7b87\u6240\u3067\u7570\u306a\u308b\u30e2\u30c7\u30eb\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<code>retrievalModel<\/code> \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u5c65\u6b74\u5727\u7e2e\u3092\u51e6\u7406\u3059\u308b LLM \u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306f\u5fc5\u9808\u3067\u306f\u306a\u304f\u3001\u6307\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u30e1\u30a4\u30f3\u306e\u30e2\u30c7\u30eb\u304c\u5727\u7e2e\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"kotlin\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">retrievalModel = OpenAIModels.Chat.GPT4_1Mini<\/pre>\n<p>\u4ee5\u4e0b\u306f\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u6226\u7565\u7528\u306e\u5b8c\u6210\u306a\u69cb\u6210\u3067\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"kotlin\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">strategy = singleRunStrategyWithHistoryCompression(\n   config = HistoryCompressionConfig(\n       isHistoryTooBig = CODE_AGENT_HISTORY_TOO_BIG,\n       compressionStrategy = CODE_AGENT_COMPRESSION_STRATEGY,\n       retrievalModel = OpenAIModels.Chat.GPT4_1Mini\n   )\n)<\/pre>\n<p>\u5727\u7e2e\u306e\u30bf\u30a4\u30df\u30f3\u30b0\uff08<code>isHistoryTooBig<\/code>\uff09\u3001\u4fdd\u6301\u3059\u308b\u60c5\u5831\uff08<code>compressionStrategy<\/code>\uff09\u3001\u4f7f\u7528\u3055\u308c\u308b\u30e2\u30c7\u30eb\uff08<code>retrievalModel<\/code>\uff09\u306e 3 \u3064\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n<p>\u3053\u306e\u6642\u70b9\u3067\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306e\u4e0a\u9650\u306b\u9054\u3059\u308b\u3053\u3068\u306a\u304f\u3001\u3088\u308a\u9577\u3044\u30bf\u30b9\u30af\u3092\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u5727\u7e2e\u306e\u554f\u984c\u304c\u89e3\u6c7a\u3057\u307e\u3057\u305f\u3002\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u5bb9\u91cf\u5207\u308c\u306b\u306a\u3063\u305f\u3068\u304d\u306b\u30af\u30e9\u30c3\u30b7\u30e5\u305b\u305a\u3001\u5224\u65ad\u3068\u7d50\u679c\u3092\u4fdd\u6301\u3057\u3066\u7121\u99c4\u306a\u51fa\u529b\u3092\u524a\u9664\u3059\u308b\u3053\u3068\u3067\u5c65\u6b74\u3092\u5727\u7e2e\u3057\u3001\u5272\u308a\u5f53\u3066\u3089\u308c\u305f\u30c8\u30fc\u30af\u30f3\u4e88\u7b97\u5185\u3067\u51e6\u7406\u3092\u7d99\u7d9a\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u9023\u8f09\u306e<a href=\"https:\/\/blog.jetbrains.com\/ai\/2025\/11\/building-ai-agents-in-kotlin-part-1-a-minimal-coding-agent\/\">\u30d1\u30fc\u30c8 1<\/a> \u3067\u306f\u3001\u57fa\u672c\u7684\u306a\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304b\u3089\u7740\u624b\u3057\u307e\u3057\u305f\u3002\u305d\u306e\u5f8c\u3001\u30c4\u30fc\u30eb\u3001\u53ef\u89b3\u6e2c\u6027\u3001\u30b5\u30d6\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3001\u305d\u3057\u3066\u5c65\u6b74\u5727\u7e2e\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u3089\u306e 5 \u3064\u306e\u8981\u7d20\u306b\u3088\u308a\u3001\u5b9f\u969b\u306e\u30e2\u30c7\u30eb\u306e\u5236\u7d04\u5185\u3067\u904b\u7528\u3067\u304d\u308b\u5b9f\u7528\u7684\u306a AI \u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092 Kotlin \u3067\u30d3\u30eb\u30c9\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u3082\u306e\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u30d1\u30bf\u30fc\u30f3\u306e\u30d3\u30eb\u30c9\u3068\u5b9f\u8df5\u3092\u7d9a\u3051\u308b\u5834\u5408\u306f\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u8907\u6570\u30bf\u30fc\u30f3\u3067\u4f55\u3092\u3059\u3079\u304d\u304b\u3092\u3069\u306e\u3088\u3046\u306b\u5224\u65ad\u3059\u308b\u306e\u304b\u3001\u8907\u96d1\u306a\u554f\u984c\u3092\u3069\u306e\u3088\u3046\u306b\u7d30\u5206\u5316\u3059\u308b\u306e\u304b\u3068\u3044\u3063\u305f\u8a08\u753b\u3068\u63a8\u8ad6\u306e\u9818\u57df\u3092\u8a73\u3057\u304f\u8abf\u3079\u308b\u3068\u9762\u767d\u3044\u3067\u3057\u3087\u3046\u3002\u305d\u308c\u3089\u306f\u3053\u3053\u3067\u306f\u53d6\u308a\u4e0a\u3052\u307e\u305b\u3093\u3067\u3057\u305f\u304c\u3001\u4e0a\u8a18\u306e\u8981\u7d20\u304c\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3089\u5b9f\u8df5\u3057\u3066\u307f\u308b\u3068\u3088\u3044\u3067\u3057\u3087\u3046\u3002\u00a0<\/p>\n<p><a href=\"https:\/\/github.com\/JetBrains\/koog\/blob\/ea6cc04a8d989ae3d4656dfea0cbc2a1b89c9bdc\/examples\/code-agent\/step-05-history\/src\/main\/kotlin\/Main.kt\" target=\"_blank\" rel=\"noopener\">\u5b8c\u5168\u306a\u30b3\u30fc\u30c9\u306f GitHub \u306b\u3042\u308a\u307e\u3059<\/a>\u3002\u554f\u984c\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306f\u3001\u30b3\u30e1\u30f3\u30c8\u6b04\u3067\u304a\u77e5\u3089\u305b\u304f\u3060\u3055\u3044\u3002\u559c\u3093\u3067\u304a\u624b\u4f1d\u3044\u3044\u305f\u3057\u307e\u3059 \ud83d\ude0a<\/p>\n\n\n<p><strong>\u30aa\u30ea\u30b8\u30ca\u30eb\uff08\u82f1\u8a9e\uff09\u30d6\u30ed\u30b0\u6295\u7a3f\u8a18\u4e8b\u306e\u4f5c\u8005\uff1a<\/strong><\/p>\n\n\n    <div class=\"about-author \">\n        <div class=\"about-author__box\">\n            <div class=\"row\">\n                <div class=\"about-author__box-img\">\n                    <img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/11\/IMG_2717-1_1_50.jpg\" width=\"200\" height=\"200\" alt=\"Fatimazahra El Akkary\" loading=\"lazy\"  class=\"avatar avatar-200 wp-user-avatar wp-user-avatar-200 photo avatar-default\">\n                <\/div>\n                <div class=\"about-author__box-text\">\n                                            <h4>Fatimazahra El Akkary<\/h4>\n                                        <p>Machine Learning Engineer<\/p>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n","protected":false},"author":1394,"featured_media":692459,"comment_status":"closed","ping_status":"closed","template":"","categories":[4113,2347],"tags":[6847,8724],"cross-post-tag":[6355],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/ai\/692457"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/ai"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/types\/ai"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/users\/1394"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/comments?post=692457"}],"version-history":[{"count":3,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/ai\/692457\/revisions"}],"predecessor-version":[{"id":692483,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/ai\/692457\/revisions\/692483"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/media\/692459"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/media?parent=692457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/categories?post=692457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/tags?post=692457"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/cross-post-tag?post=692457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}