[Integration]: Time Budget Hook

Abierto
#833 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 9 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
ai

Línea de trabajo

The issue describes a published integration in a separate repository and provides no files, tests, or entry points in this repository to start from. Read the linked integration and the referenced Haystack request to understand its status; there is no specific change or completion criterion stated for this issue.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Stage

Ready: integration exists and works, proposing to list it

Integration or project name

Time Budget Hook

Integration type

Other

Published package or repo (if it exists)

https://pypi.org/project/time-budget-hook-haystack/ and https://github.com/aryamangodara/time-budget-hook-haystack

Need or proof of use

Requested in deepset-ai/haystack#13623. A Haystack maintainer asked for it to be built as a hook modeled on TokenBudgetHook, published as a separate integration rather than added to core (comment).

Use case: Agents behind an API with a request timeout, or Agents that call slow tools, need a limit on how long a run takes. max_agent_steps caps steps and TokenBudgetHook caps tokens, but neither caps time.

The package is published on PyPI and tested in CI on Python 3.10 and 3.14 against haystack-ai 3.2.0 and 3.5.0. It has full sync and async Agent runs in its test suite and an offline example script.

Short description

An Agent hook that stops a run once it has been running for a set number of seconds, ending with exit_reason == "time_budget_exceeded". It complements max_agent_steps and TokenBudgetHook for Agents that need to finish within a time limit, such as those behind an API with a request timeout or calling slow tools.

Lenguaje dominante
Python
Estrellas
114
Forks
332
Merge medio
5 d 1 h
PR fusionados (30 d)
13

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de deepset-ai/haystack-integrations

Todos los issues de deepset-ai/haystack-integrations

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.