Stream an Agent Executor Cron Job

Stream an Agent Executor Cron Job

pythonCopy codeimport agentorbit

agentorbit.api_key = "YOUR_API_KEY"

# Retrieve a specific cron job by ID
cron_job = agentorbit.AgentExecutorCronJob.retrieve(id="15d19ca3-26f1-4adb-9cea-3955b73d9b4e")

# Stream and process executions in real-time
for execution in cron_job.stream():
    print(execution)

Note: The stream() method yields an Execution object whenever a new execution is created by the cron job, enabling real-time processing of executions.

Last updated