Progress API
Getting the Request Context
First, get access to the request context in your function:Method: progress.update()
Stream progress updates to monitoring systems and frontends.
| Parameter | Type | Required | Description |
|---|---|---|---|
current | int | float | ✅ Yes | Current step or percentage complete |
total | int | float | ✅ Yes | Total steps or 100 for percentage |
message | str | None | ❌ No | Human-readable progress message |
attributes | dict[str, str] | None | ❌ No | Additional metadata (key-value pairs) |
Basic Usage
Simple progress tracking:Using Percentages
You can use percentages instead of step counts:Common Use Cases & Examples
Now let’s see how to use progress tracking in real-world scenarios:1. Multi-Step Agent Workflows
Show which step the agent is currently executing:2. Batch Data Processing
Track progress through large datasets:3. Iterative AI Agent Loops
Monitor agent iterations and tool calls:4. Data Pipeline Status
Show progress through multi-stage pipelines:Progress updates also reset function timeouts automatically. See Timeouts for details.