Skip to content
beam-agents
GitHub

dataclass

HitlPolicy

beam_agents.hitl.HitlPolicy

HitlPolicy(timeout_ms: 'int' = 86400000, intent_ttl_ms: 'int' = 3600000, approval_channel: 'str' = 'approval', max_escalations: 'int' = 0, on_timeout: 'Callable[[FallbackContext], Route]' = <function deny>) -> None

Docstring

Configuration for suspensions, approvals, and what a timeout does.

on_timeout must be **pure and synchronous** (see the module docstring) and picklable — the DoFn holds the policy and serializes for the runner, so it must be a module-level function or another picklable callable, never a lambda or a closure.

src/beam_agents/hitl.py:151

Members

6 declared on HitlPolicy

Introspected from the class itself. A member with no docstring is shown as having none rather than described from its name.

  • approval_channel: str

    No docstring.

  • intent_ttl_ms: int

    No docstring.

  • max_escalations: int

    No docstring.

  • on_timeout: Callable[[FallbackContext], Route]

    No docstring.

  • timeout_ms: int

    No docstring.

  • validate

    method

    validate(self) -> 'None'

    Raise ValueError naming the offending field, before any pipeline.