airflow.providers.anthropic.triggers.agent¶
Classes¶
Poll a Managed Agents session until it reaches a terminal status. |
Module Contents¶
- class airflow.providers.anthropic.triggers.agent.AnthropicAgentSessionTrigger(conn_id, session_id, poll_interval, end_time, expect_outcome=False, kickoff_event_id=None)[source]¶
Bases:
airflow.triggers.base.BaseTriggerPoll a Managed Agents session until it reaches a terminal status.
- Parameters:
conn_id (str) – The Anthropic connection ID.
session_id (str) – The session to poll.
poll_interval (float) – Seconds to sleep between polls.
end_time (float) – Wall-clock deadline (
time.time()epoch seconds). Wall-clock is used deliberately: the trigger is serialized and may resume in a different triggerer process, where a per-processtime.monotonic()value is meaningless.expect_outcome (bool) – Whether the session is running a
user.define_outcomeloop (completion is then judged fromoutcome_evaluations, not fromidlealone).kickoff_event_id (str | None) – ID of the kickoff event, used to correlate the terminal idle event on a
messagerun (defeats the start race).