feat: Expose the current hook point in Agent State

オープン
#14,032 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
15/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
ai, backend

調査の方向性

The issue asks for Agent to expose the current hook point in State before hooks run, but it names no source files or tests. Read the Agent hook execution and State implementation to find where hook points are dispatched and how State values are exposed. Done means hooks can read the current point, such as before_llm or after_tool, and tests cover that behavior. This issue is marked for internal handling and is not open to external contributions.

索引モデルが issue の本文から書いたものです。

説明

handled internally

Is your feature request related to a problem? Please describe.
A hook can't tell which hook point it is running at. A hook registered at several points has no way to change its behavior per point.

Example: PresidioPIIHook appended a system reminder after blocked messages. At after_tool, if the blocked result came from an exit-condition tool, the reminder became the Agent's last_message. The hook couldn't detect that it was running at after_tool, so it couldn't skip the reminder. We worked around it in deepset-ai/haystack-core-integrations#4360.

Describe the solution you'd like
Have the Agent write the current hook point (e.g. before_llm, after_tool) to State before running hooks, so a hook can read it if it needs to.

Additional context
Discussion: https://github.com/deepset-ai/haystack-core-integrations/pull/4360#issuecomment-7275496964


👋 Hello there! This issue will be handled internally and isn't open for external contributions. If you'd like to contribute, please take a look at issues labeled contributions welcome or good first issue. We'd really appreciate it!

主要言語
Python
スター
27.2k
フォーク
3.5k
平均マージ
1日 18時間
マージ済み PR(30日)
254

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

deepset-ai/haystack のほかの issue

deepset-ai/haystack の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。