webwhen docsBuild with the agent that waits.
Tell webwhen what to watch for. It will sit with the question and tell you when the answer arrives.
Tell webwhen what to watch for. It will sit with the question and tell you when the answer arrives.
webwhen runs scheduled grounded-search executions, evaluates the results against a trigger condition, and stores the history. Grounded search combines live web search with LLM evaluation, so each answer is backed by sources.
from webwhen import Webwhen
client = Webwhen()
# Create a watch
task = client.tasks.create(
search_query="When is the iPhone 17 being released?",
condition_description="Apple has announced a specific release date",
schedule="0 9 * * *" # Daily at 9 AM
)
# Check results
executions = client.tasks.get_executions(task.id)
if executions[0].notification:
print(executions[0].result["answer"])