HN 日本語サマリー

← 一覧へ戻る
AI・機械学習

Strands Harnessの紹介

Strands Harness (strandsagents.com)

77 pointsby zuckerborg010147 コメント

要約

Strands Harnessは、ローカルまたはクラウドで簡単に実行できる、汎用的なAIエージェントのための最先端のハーネス(開発フレームワーク)です。既存のハーネスと比較して、コスト効率が高く、同等以上の精度を維持しながら、プロンプトキャッシュやコンテキスト管理などの機能を提供します。PythonまたはTypeScriptで数行のコードから利用でき、様々なモデルプロバイダーやデプロイメント環境に対応しています。

全文翻訳

私たちは、ビルダーがローカル環境でエージェントのアイデアが「うまく動いた」Claude CodeやCodexのセットアップをクラウドで実行できればとよく願っていることに気づきました。しかし、自分でエージェントを構築する瞬間から、あなたは一人です。「うまく動いた」という感覚に匹敵するほど十分な適切なプリミティブを配線するのは難しいです。本日、私たちはStrands Harnessをリリースします。これは、ローカルで簡単に実行したり、お好みのプロバイダーにデプロイしたりできる、完全に組み立てられた最先端のエージェントハーネスです。これは、コーディングエージェントではなく、汎用エージェントとして構築されています。モデルの選択肢とともに動作させるには、PythonまたはTypeScriptの1行で十分です。Strands Harnessは、同等以上の精度を維持しながら、コスト効率において他のエージェントハーネスを上回ります。Apache 2.0ライセンスで提供されています。Strands Harnessは、6つのベンチマーク全体で同じClaudeまたはGPTモデルを使用した場合、28%安価です。Claude Code、Codex、およびその他の一般的なハーネスと比較して、Strands Harnessはトークン効率が高く、ベンチマークスコアがほぼ同等であることがわかりました。これは、コスト削減のために精度を犠牲にしたくないため重要です。Deepseek Harnessは全体として最もトークン効率が高いことが証明されましたが、通常は最も低い精度スコアを報告しました。私たちのテストセットアップは、Harborを使用したEC2での分散ベンチマークでした。Fable 5では、Strands HarnessはClaude Codeよりも77%安価で、Terminal Bench 2.1でより高いスコアを記録しました。また、他の2つのオープンソースハーネスがClaude Codeに対してコスト/精度で同様に良好なパフォーマンスを示したことも嬉しく思います。Strands Harness SDK上に構築されたStrands Harnessには、プロンプトキャッシュとコンテキスト管理のデフォルトが含まれています。私たちのデフォルトのコンテキスト管理は、トークン効率と精度の大部分を推進しました。ツール結果は約1500トークンを超えると切り捨てられ、コンテキストウィンドウが85%を超えると要約(圧縮)がトリガーされ、オーバーフローが発生した場合はループ内でコンテキストリカバリが実行されます。これらのベンチマークに関する研究者からのフォローアップ論文に注目してください。それまでの間、私たちは誰もがStrands Harnessでこれらのデフォルトを使用できることに興奮しています。簡単に始められるStrands Harnessは、Amazon Bedrock、Anthropic、OpenAI、Googleなどの最新モデルで実行できます。名前で選択するか、ローカルのOllamaモデルを指してください。 Python TypeScript from strands_harness import create_harness agent = create_harness(model="bedrock/global.anthropic.claude-opus-5") agent("Research the top three vector databases, compare pricing and limits, and write it up in comparison.md") import { createHarness } from "@strands-agents/harness"; const agent = await createHarness({ model: "bedrock/global.anthropic.claude-opus-5" }); await agent("Research the top three vector databases, compare pricing and limits, and write it up in comparison.md"); Python TypeScript from strands_harness import create_harness agent = create_harness(model="anthropic/claude-opus-5") agent("Research the top three vector databases, compare pricing and limits, and write it up in comparison.md") import { createHarness } from "@strands-agents/harness"; const agent = await createHarness({ model: "anthropic/claude-opus-5" }); await agent("Research the top three vector databases, compare pricing and limits, and write it up in comparison.md"); Python TypeScript from strands_harness import create_harness agent = create_harness(model="openai/gpt-5.6-sol") agent("Research the top three vector databases, compare pricing and limits, and write it up in comparison.md") import { createHarness } from "@strands-agents/harness"; const agent = await createHarness({ model: "openai/gpt-5.6-sol" }); await agent("Research the top three vector databases, compare pricing and limits, and write it up in comparison.md"); Python TypeScript from strands_harness import create_harness agent = create_harness(model="google/gemini-3.5-flash") agent("Research the top three vector databases, compare pricing and limits, and write it up in comparison.md") import { createHarness } from "@strands-agents/harness"; const agent = await createHarness({ model: "google/gemini-3.5-flash" }); await agent("Research the top three vector databases, compare pricing and limits, and write it up in comparison.md"); Python TypeScript from strands_harness import create_harness from strands.models.ollama import OllamaModel model = OllamaModel(host="http://localhost:11434", model_id="llama3.1") agent = create_harness(model=model) agent("Research the top three vector databases, compare pricing and limits, and write it up in comparison.md") import { createHarness } from "@strands-agents/harness"; const agent = await createHarness({ model: "ollama/llama3.1" }); await agent("Research the top three vector databases, compare pricing and limits, and write it up in comparison.md"); Python TypeScript from strands_harness import create_harness agent = create_harness(model="litellm/openai/gpt-5.6-sol") agent("Research the top three vector databases, compare pricing and limits, and write it up in comparison.md") import { createHarness } from "@strands-agents/harness"; const agent = await createHarness({ model: "litellm/openai/gpt-5.6-sol" }); await agent("Research the top three vector databases, compare pricing and limits, and write it up in comparison.md"); create_harness() はデフォルトで以下の機能を持つエージェントを返します。 Amazon Bedrock、Anthropic、OpenAI、Google、Ollama、またはLiteLLMで実行される最新の推論モデルを使用します。 シェル、ファイル(読み取り/書き込み/編集)、およびWebツールが付属しています。これらは、モデルがすでに使用方法を知っているプリミティブであり、タスクごとのカスタムツールではありません。 コンテキストウィンドウを自分で管理します。 バルキーなツール結果をファイルにオフロードし、各リクエストの再利用部分をキャッシュして時間とコストを節約します。 実行間で長期記憶を保持し、セッションIDを与えると以前の会話を再開します。 組み込みヘルパーエージェントにオープンエンドのサブタスクを委任し、チェックリストでマルチステップの作業を追跡します。 スキルが存在する場合はロードします。 Strands Harnessは、Modal、Cloudflare Containers、Azure Container Apps、Google Cloud Run、Amazon ECS、Amazon Bedrock AgentCoreなど、Linuxコンテナを備えた任意のプロバイダーにデプロイできます。また、Strands CLIもあり、プレーンな英語でエージェントをプロトタイプできます。モデルプロバイダーを選択し、プロンプトとツールを追加すると、エージェントが生き生きと動き出すのを見ることができます。その後、Strands CLIで /export を実行すると、TypeScriptまたはPythonのコードコピーを取得できます。これは、コーディングエージェントでStrands Harnessを繰り返し使用したり、デプロイ設定を追加したりするのに非常に便利な方法です。 お使いのブラウザは動画タグをサポートしていません。 ここで、Strands Harnessエージェントに「Playwright MCPを追加する」ように依頼し、ブログ記事に動画をロードする際のレイテンシを測定します。Playwright MCPツールが正確に機能するのを確認した後、/export を実行してStrands Harnessコードを取得するだけです。Playwright MCPがボイラープレートに追加され、コーディングエージェントでのイテレーションやデプロイ設定の追加が容易になったことがわかります。 Strands Harnessで構築できるものStrands CLIは、実際にはStrands Harnessの上に構築されています。エージェントを簡単にプロトタイプできるようになったことで、多くの野心的なアイデアが実現しました。最近、私たちのエンジニアであるGautam Sirdeshmukhは、GrokbotやMuseのようなエージェントプラットフォームに触発されて、Strands Harnessをリモートで起動するデスクトップアプリを構築しました。 お使いのブラウザは動画タグをサポートしていません。 より深く掘り下げたい場合は、Strands Harnessは完全にカスタマイズ可能です。デフォルトを簡単にオーバーライドしたり、モデルをスワップしたり、ツールを追加したり、Strands Harness SDKまでコンポーネントを段階的に置き換えたりできます。コードはあなたのものです。私たちは、Strands Harnessで生まれるあらゆる種類のエージェントに興奮しています。今日試してみてください。 pip install strands-harness でPython、npm install @strands-agents/harness でTypeScriptでStrands Harnessを簡単にインストールできます。インタラクティブな体験のために、Strands CLIをダウンロードしてください:npm install -g @strands-agents/cli。私たちは、すぐに使えるハーネスで迅速にプロトタイピングすることが、より多くの有用なエージェントを作成すると信じています。私たちのチームはDiscordにもいますので、ぜひ挨拶に来てください、または質問をしてください。