Skip to main content

Annotating Async Operations

Asynchronous operations produce results after a delay. Annotate them with postconditions and polling hints.

Async operation — report generation
<button
axag-intent="report.generate"
axag-entity="report"
axag-action-type="create"
axag-required-parameters='["report_type","date_range"]'
axag-risk-level="none"
axag-async="true"
axag-async-polling-endpoint="/api/reports/{report_id}/status"
axag-async-estimated-duration="30s"
axag-postconditions='["report_ready"]'
>Generate Report</button>

The agent runtime should poll the status endpoint rather than blocking on the initial invocation.