🎉 ai-infra v1.0 is here — Production-ready AI/LLM infrastructure
What's new
nfrax logonfrax

Infrastructure that just works. Ship products, not boilerplate.

Frameworks

  • svc-infra
  • ai-infra
  • fin-infra
  • robo-infra

Resources

  • Getting Started
  • What's New
  • Contributing

Community

  • GitHub

© 2026 nfrax. All rights reserved.

nfrax logonfrax
Start HereWhat's New
GitHub
ai-infra / API Reference

ProgressStream

from ai_infra.tools import ProgressStream
View source
ai_infra.tools

Stream for sending progress updates from tools. This class is injected into progress-enabled tools as the `stream` parameter. Tools can call `await stream.update()` to send progress updates.

python
@progress
    async def my_tool(input: str, stream) -> str:
        await stream.update("Starting...", percent=0)
        # ... do work ...
        await stream.update("Halfway there!", percent=50)
        # ... more work ...
        await stream.update("Done!", percent=100)
        return "result"
Constructor
ProgressStream(tool_name: str, callback: Callable[[ProgressEvent], Any] | None = None)
ParameterTypeDefaultDescription
tool_namerequiredstr—Name of the tool this stream belongs to
callbackCallable[[ProgressEvent], Any] |NoneNoneFunction to call with progress events. Can be sync or async.

Methods

On This Page

Constructorupdateasync