| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…t in workflow templates
…ty trace (#465) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Streamed lifecycle/text events carried only a task_id, so events from multiple agents sharing one task stream (e.g. child-workflow sub-agents emitting into the orchestrator's stream) were indistinguishable. Thread an optional agent_path (str | list[str]) end to end: - TaskMessage envelope carries it, so every start/delta/full/done event is attributable via parent_task_message. - ContextInterceptor propagates it workflow->activity via a new ContextVar + header, so the model activity tags live text/reasoning deltas. - TemporalStreamingHooks + stream_lifecycle_content + streaming service stamp it on tool/lifecycle events. Backward compatible: agent_path defaults to None (untagged) everywhere. NOTE: task_message.py is Stainless-generated; the agent_path field is a manual stopgap and must be mirrored in the upstream OpenAPI spec (.stats.yml openapi_spec_url) or the next regen will drop it.
| Back | FazBrowse Home | New Git URL |
Why
Streamed lifecycle and text events carry only a task_id. When multiple agents share one task stream (for example, child-workflow sub-agents emitting into a parent orchestrator's stream), their events are indistinguishable at the consumer. The only identity-ish field is author (Literal["user","agent"]), a role, not a source.
What
Thread an optional agent_path (str | list[str]), a single agent id or a root-to-emitter path like ["researcher", "subagent-abc"], end to end:
Backward compatible
agent_path defaults to None (untagged) everywhere. Existing callers, including subclasses that call super().__init__(task_id=..., timeout=...), are unaffected.
Depends on scaleapi/scale-agentex#381 (do not merge standalone)
The TaskMessage.agent_path wire field is authored upstream in the backend OpenAPI spec (scaleapi/scale-agentex#381). The edit to src/agentex/types/task_message.py in this PR is a temporary manual patch so the branch is functional and testable now; merging a hand-edited generated type would be wiped on the next Stainless regen.
Merge order:
Verification
Follow-ups (not in this PR)
Generated with Claude Code