Basic progress emission
Intent emission
Emit high-level intents for significant state changes:With Tool Context
Associate progress with specific tools:Real Example: Multi-Phase Agent
When to Emit
Emit progress when:- Starting a distinct phase of work
- Before expensive operations (LLM calls, HTTP requests)
- After completing significant milestones
- When handling fallback scenarios (“Retrying with different model…”)
- In tight loops (debounce or batch instead)
- For trivial operations (< 100ms)
- Excessively verbose detail (“Step 1 of 50”, “Step 2 of 50”…)
Emission during LLM calls
Emit progress before expensive operations -ctx.stream.progress() is fire-and-forget over NATS and does not block the handler:
Raw Event Emission
For custom event types, useemit():
data parameter accepts either a dict (JSON-serialized) or string.
API Reference: ctx.stream
Full stream capability API reference
How Friday Agents Work
The subprocess model and host capabilities

