AIFCC
記事一覧へ
AIエージェントアーキテクチャ設計長期エージェントharness-design

ハーネスだけでは不十分——長期エージェントシステムには「環境エンジニアリング」が必要だ

Li Jeffrey@JeliPenguin
226
## ハーネスだけでは不十分 シンプルな主張をしたいと思います:長期エージェントシステムには、ハーネスエンジニアリングと同時に、環境エンジニアリングも必要です。 多くのエージェントシステムでは、「ハーネス」という言葉が広く使われています。これはエージェントを囲む実行・制御レイヤー全体を指すことが多いです:ツール・権限・コンテキスト処理・リトライ・承認・ストリーミング・停止ルールなど。 そのレイヤーは重要です。しかしここでのより強い主張は、それらの責任の一部は、一つの交換可能な実行ランタイムの内部に暗黙的に残すのではなく、耐久的な環境コントラクトに引き出すべきだということです。 重要な区別は、簡単なタスクと難しいタスクの間にあるのではありません。強力なハーネスは非常に高度なタスク実行を支援できます。より重要な区別は、**タスク**と**役割**の間にあります。タスクはローカルな目標と停止点を持つ、境界のある作業です。役割は多くのタスク・実行・変化するコンテキストにまたがる継続的な運用責任です。したがって役割は本質的に長期的です:システムは一貫性を保ち、学習したことを保持し、時間をかけて改善する必要があります。ハーネスはエージェントが一つのタスクをうまく実行するのを助けられます。環境はシステムが複数の実行にわたって役割を維持するのを助けます。だからこそ、長期エージェントシステムには環境エンジニアリングが必要なのです。 --- ## 1. 境界:ハーネスと環境 ここでは、ハーネスとは一つの実行(run)のための実行サブシステムです。その仕事の大部分はコンテキスト管理です:どの状態が特定のステップでアクティブになるか・何がプロンプトから外れるか・どのツールが見えるか・ループがどのように続くかを決定します。環境はそのサブシステムを囲む耐久的な運用コンテキストです。 この分割こそがこの記事の要点です: - **ハーネスエンジニアリング**は実行を操作可能にする - **環境エンジニアリング**は運用コンテキストを耐久的・検査可能・ポータブル・実行間で安定したものにする 目標はハーネスを最小化することではありません。目標は、重要なシステム不変条件が一つの実行エクゼキューターのプライベートな動作に閉じ込められないようにすることです。 --- ## 2. ハーネス交換テスト アーキテクチャが本当に役割をサポートしているかどうかをテストするシンプルな方法があります: **明日ハーネスを交換したとしたら、何が残るべきか?** 真剣な長期システムでは、少なくとも以下のものが生き残るべきです: - **ワークスペースコントラクトと著作構造**:ファイル・指示・アプリ・スキル・その他の著作意図の場所と構造を含む、作業環境の耐久的な形状 - **メモリと継続性サーフェス**:システムが有用な知識を前に進め、中断後に一貫して再開できるようにする状態 - **ケイパビリティのプロジェクションと可視性ルール**:特定の実行が何を見て呼び出すことが許可されているかを決定する耐久的なルール - **アプリとインテグレーションの配線**:外部ツール・サービス・ドメイン固有のケイパビリティが役割に接続される耐久的な方法 - **出力アーティファクトと運用者の可観測性**:実行にわたって作業を検査可能・再開可能にする、永続的な結果・トレース・運用者向けの可視性 これらの不変条件がハーネス交換後も生き残らなければならないなら、環境は付随的なものではありません。それはハーネスを囲む第一級のコントラクトです。 コンテキストを例に取ると。ステップの正確なプロンプトはハーネスが変わると変わるかもしれませんが、それがコンパイルされるより広い状態は変わるべきではありません。すべての関連する状態がすべてのステップのプロンプトにあるべきではありません。ある状態は現在の呼び出しでアクティブで、別の状態は近くのランタイム継続性であり、もっと多くの状態は耐久的だが取得可能です。 これが、メモリをコンテキストと同義として扱うべきではない理由です。ほとんどのメモリはプロンプトの外に存在し、システムが特定のステップに関連すると判断した場合にのみホットコンテキストになります。 これはハーネスも明確にします。大部分において、ハーネスは大きな環境に対して動作するコンテキストコンパイラーです:ウォームとコールドの状態から選択し、現在のステップのホットコンテキストをビルドし、許可されたアクションサーフェスを公開し、そのステップを囲む制御ループを管理します。 他のサーフェスについては、フォローアップ記事で詳しく説明する予定ですので、お楽しみに! --- ## 4. 環境コントラクト 環境は一つのフラットな機能の集まりではありません。ハーネス境界を囲むいくつかの状態レイヤーを定義します。 **耐久的著作状態**は、アプリマニフェスト・スキル・コマンド・常時指示を含む著作構造とそのワークスペースルートを包括します。また、環境と反復にわたって再現可能な開始形状を確立するテンプレートとパッケージング境界も定義し、一貫性と明確さを確保します。 **耐久的適応状態**は実行にわたって進化・永続する情報を指します。これには時間をかけて生き残るメモリ・耐久的な出力・再利用可能なアーティファクト・評価トレースが含まれます。また、運用者のフィードバック・承認・その他の報酬ライクなシグナル、および将来のパフォーマンスを向上させる昇格されたメモリや再利用可能なスキルなどのレビュー済み改善も含みます。 **ランタイム継続性状態**は実行間のコヒーレンスを支援する、一時的だが構造化されたデータで構成されています。ターン結果・スナップショット・チェックポイント・セッションスコープの継続性レコードが含まれます。このランタイム所有の状態により、将来の実行がコンテキストを効果的に復元でき、後続のステップや実行が耐久メモリへの完全なプロモーションを必要とせず効率的に再開できるウォームコンテキストを維持します。 **プロジェクトされた実行状態**は、特定の実行に対して実行ハーネスに提供される可視・呼び出し可能なサーフェスを表します。選択されたモデルルーティング・アタッチメント・MCPの可視性・権限・実行メタデータ、および正確で効率的な実行をサポートするためにウォームとコールドの状態の両方からコンパイルされたステップ固有のホットコンテキストパッケージが含まれます。 これらのサーフェスの一部は、今日構築されているシステムで既に具体的なものがあります。他は建築的な方向性の一部です。論文は、システム境界についてです:これらの懸念事項は、エクゼキューター固有の動作に散在するのではなく、一つの環境コントラクトとしてモデル化されるべきです。 その方向性は、セキュリティ・耐久性・スケールのためにハーネスとコンピューティングを分離すべきだと主張する、新しいOpenAI Agents SDK のアップデートとも一致しています。そのフレーミングでは、耐久的な実行は一つのライブ実行コンテナーがシステム全体であると仮定するのではなく、外部化された状態とスナップショット・再水和から来ています。 --- ## 5. ポータビリティは設計の一部 長期システムには永続性以上のものが必要です。担うべき役割の運用形状を失わずに検査・パッケージング・移動・再水和できる耐久的な単位が必要です。 つまり、著作ワークスペースコンテンツ・適応状態・ランタイム所有の残留物を、パッケージングルールが異なる異なるカテゴリとして扱うことを意味します。目標は、ランタイム状態のすべての部分がどこへでも移動するということではありません。目標は、ポータブル単位に何が属し、何が一時的なままであるかの明確な境界を持って、耐久的な環境を意図的に再現できることです。 ポータビリティは事後に追加されるのではなく、環境コントラクトに設計から組み込まれるべきです。 --- ## 6. 改善には耐久的な境界が必要 長期的な作業は、実行にわたって作業を前進させることだけではありません。時間をかけてその作業が上手くなることでもあります。ここで重要な意味では、長期的な作業は多くの実行と変化する条件にわたって役割を担うシステムとして現れることが多いです。 メモリの進化・反省・継続的学習・強化は、その改善のための重要なメカニズムです。しかし、それらは環境が以下の耐久的な記録を保持できる場合にのみシステムのケイパビリティになります: - 行動した際のホットコンテキスト、およびそれが引き出されたウォームまたはコールドの状態 - 使用が許可されたアクションサーフェス - 実行を判定した成果・評価・運用者のフィードバック - 耐久メモリ・スキル・ポリシー・ケイパビリティになり得るものを決定するレビュー境界 これらのシグナルが一つの一時的なエクゼキューターループに閉じ込められると、そのループを助けるかもしれませんが、時間をかけて長期的な作業を処理するシステムの能力を確実に改善しません。要点は、役割に耐久的な運用境界を与えることで、有用なエビデンスが時間をかけてより良いメモリ・より強いスキル・より安全なポリシー・その他のレビュー済みケイパビリティに蓄積できるようにすることです。今日、最も明確な着地点は耐久メモリ・evolvフロー・候補スキルですが、より広い方向性はそれ以上のものです:繰り返される良い作業は、一時的な実行ループに閉じ込められたままではなく、検査可能なシステムのケイパビリティになるべきです。 --- ## 7. 次に向けて 長期的な作業は単なる長いチャットではありません。システムが役割を担うことが期待されるときに起きることです:複数の実行にわたって一貫して継続し、中断に耐え、運用者にもシステムにも検査可能なままでいる必要があります。 だからこそ、ハーネスで止まることはできず、環境コントラクトに基づいて構築する必要があります: - 耐久的なワークスペース構造としてのアプリとスキル - 明示的なストレージとガバナンスルールを持つメモリ - 一貫した再開をサポートするランタイム継続性 - 実行ごとの明示的なケイパビリティプロジェクション - 運用単位全体を囲むポータビリティとパッケージング境界 これが、エージェントシステムを検査・パッケージング・再開・拡張しやすくする転換です。 これはまた、私のオープンソースプロジェクト **holaOS** の背後にある核心的な技術的論拠でもあります。別のハーネスではなく、長期的な作業・継続性・自己改善のために設計されたエージェント環境です。 次の記事では、holaOS を直接紹介し、環境エンジニアリングが具体的なランタイムアーキテクチャ・メモリモデル・ワークスペースコントラクトにどのようになるかを示します。 耐久的で進化可能なエージェントシステムを構築することに興味がありますか?フォローしてさらなる洞察を得てください——そして私のリポジトリに参加してください!
原文を表示 / Show original
Li Jeffrey @JeliPenguin Agent Harness Is Not Enough. 11 23 45 62K I would like to argue a simple point: long-horizon agent systems need environment engineering as well as harness engineering. In many agent systems, the word "harness" is used broadly. It often refers to the whole execution and control layer around an agent: tools, permissions, context handling, retries, approvals, streaming, and stop rules. That layer matters. The stronger claim here is that some of those responsibilities should be pulled into a durable environment contract rather than left implicit inside one swappable execution runtime. The key distinction is not between easy tasks and hard tasks. A strong harness can support very capable task execution. The more important distinction is between a task and a role. A task is bounded work with a local objective and a stopping point. A role is an ongoing operating responsibility across many tasks, runs, and changing context. Roles are therefore inherently long-horizon: the system has to remain coherent, retain what it learns, and improve over time. A harness can help an agent execute a task well. An environment helps a system sustain a role across runs. That is why long-horizon agent systems need environment engineering. 1. The Boundary: Harness vs Environment Here, the harness is the execution subsystem for a run. A large part of its job is context management: deciding what state becomes active for a given step, what stays out of the prompt, what tools are visible, and how the loop continues. The environment is the durable operating context around that subsystem. That split is the point of this piece: Harness engineering makes a run operable Environment engineering makes the operating context durable, inspectable, portable, and stable across runs The goal is not to minimize the harness. The goal is to keep key system invariants from being trapped inside one executor's private behavior. 2. The Harness-Swap Test There is a simple way to test whether your architecture really supports a role: If you replaced the harness tomorrow, what should still remain true? In a serious long-horizon system, at least these things should survive: The workspace contract and authored structure: the durable shape of the working environment, including location and structure of files, instructions, apps, skills, and other authored intent. Memory and continuity surfaces: The state that lets the system carry useful knowledge forward and resume coherently after interruption. Capability projection and visibility rules: The durable rules that determine what a given run is allowed to see and call. App and integration wiring: The durable way external tools, services, and domain-specific capabilities are connected into the role. Output artifacts and operator observability: The persistent results, traces, and operator-facing visibility that make the work inspectable and resumable across runs. If those invariants must survive a harness swap, then the environment is not incidental. It is a first-class contract around the harness. Taking context as an example. The exact prompt for a step may change when the harness changes, but the broader state it is compiled from should not. Not all relevant state should be in the prompt for every step. Some state is active in the current call, some is nearby runtime continuity, and much more is durable but retrievable. This is why memory should not be treated as synonymous with context. Most memory lives outside the prompt and only becomes hot context when the system decides it is relevant for a particular step. This also clarifies the harness. In large part, the harness is a context compiler operating against a larger environment: it selects from warm and cold state, builds the hot context for the current step, exposes the allowed action surface, and manages the control loop around that step. As for other surfaces, I wish to expand on them in follow up articles, so stay tuned! 4. The Environment Contract The environment is not one flat bag of features. It defines several layers of state around the harness boundary. The durable authored state encompasses the workspace root and its authored structure, including app manifests, skills, commands, and standing instructions. It also defines the template and packaging boundaries that establish a reproducible starting shape, ensuring consistency and clarity across environments and iterations. The durable adaptive state refers to information that evolves and persists across runs. This includes memory that survives over time, durable outputs, reusable artifacts, and evaluation traces. It also captures operator feedback, approvals, and other reward-like signals, along with reviewed improvements such as promoted memory or reusable skills that enhance future performance. Runtime continuity state consists of transient yet structured data that supports coherence between executions. It includes turn results, snapshots, checkpoints, and session-scoped continuity records. This runtime-owned state enables future runs to restore context effectively, maintaining warm context that allows subsequent steps or runs to resume efficiently without requiring all information to be promoted into durable memory. The projected execution state represents the visible and callable surface provided to the execution harness for a given run. It includes selected model routing, attachments, MCP visibility, permissions, and run metadata, along with the step-specific hot context package compiled from both warm and cold state to support precise and efficient execution. Some of these surfaces are already concrete in systems being built today. Others are part of the architectural direction. The thesis is about the system boundary: these concerns should be modeled as one environment contract rather than scattered across executor-specific behavior. That direction also lines up with the newer OpenAI Agents SDK update, which argues for separating harness from compute for security, durability, and scale. In that framing, durable execution comes from externalized state plus snapshotting and rehydration, rather than assuming that one live execution container is the whole system. 5. Portability Is Part of the Design Long-horizon systems need more than persistence. They need a durable unit that can be inspected, packaged, moved, and rehydrated without losing the operating shape of the role they are meant to carry. That means treating authored workspace content, adaptive state, and runtime-owned residue as different categories with different packaging rules. The goal is not that every piece of runtime state travels everywhere. The goal is that the durable environment can be reproduced deliberately, with clear boundaries around what belongs in the portable unit and what remains transient. Portability should be designed into the environment contract, not retrofitted after the fact. 6. Improvement Needs a Durable Boundary Long-horizon work is not just about carrying work forward across runs. It is also about getting better at that work over time. In the sense that matters here, long-horizon work often appears as a system holding a role across many runs and changing conditions. Memory evolution, reflection, continual learning, and reinforcement are important mechanisms for that improvement. But they only become system capability when the environment can hold durable records of: The hot context it acted under, and the warm or cold state it was drawn from The action surface it was allowed to use The outcomes, evaluations, and operator feedback that judged the run The review boundary that decides what may become durable memory, skill, policy, or capability If those signals are trapped inside one transient executor loop, they may help that loop, but they do not reliably improve the system's ability to handle long-horizon work across time. The point is to give roles a durable operating boundary where useful evidence can accumulate into better memory, stronger skills, safer policy, and other reviewed capability over time. Today, the clearest landing zones are durable memory, evolve flows, and candidate skills, but the broader direction is larger than that: repeated good work should become inspectable system capability rather than staying trapped inside a transient execution loop. 7. What's Next Long-horizon work is not just a longer chat. It is what happens when a system is expected to inhabit a role: it has to continue coherently across runs, survive interruptions, and stay inspectable to both the operator and the system. That is why we cannot stop at harnesses and we need to build against an environment contract: Apps and skills as durable workspace structure Memory with explicit storage and governance rules Runtime continuity that supports coherent resumption Explicit capability projection per run Portability and packaging boundaries around the whole operating unit This is the shift that makes agent systems easier to inspect, package, resume, and extend. It is also the core technical argument behind my open-source project holaOS. It is not another harness, it's an agent environment designed for long-horizon work, continuity, and self-improvement. In the next piece, I will introduce holaOS directly and show how environment engineering becomes concrete runtime architecture, memory models, and workspace contracts. Interested in building durable, evolvable agent systems? Follow for more insights —and join me on my repo! 👇 Want to publish your own Article? Upgrade to Premium 1:49 AM · Apr 22, 2026 · 62.9K Views 11 23 45 76 Read 11 replies

AIFCC — AI Fluent CxO Club

読み書きそろばん、AI。経営者が AI を自分で動かせるようになるコミュニティ。

ハーネスだけでは不十分——長期エージェントシステムには「環境エンジニアリング」が必要だ | AIFCC