[agno] Support streaming responses on invoke_agent and invoke_workflow

Closed
#556 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
observability

Research direction

Start with the streaming paths for Agent.run/arun, Team.run/arun, and Workflow.run/arun, then trace how spans are created and closed when stream=True. Use stream wrappers so spans remain open through iterator consumption and verify that output messages and telemetry are finalized after iteration completes.

Written by the indexing model from the issue text.

Description

openinference-migration

[!NOTE]
This issue was generated with AI assistance and requires investigation and confirmation prior to being worked on.

Part of #555.

When streaming is enabled (stream=True) on Agent.run/arun, Team.run/arun, or Workflow.run/arun, the methods return an iterator or async iterator. Spans currently close immediately upon returning the iterator before chunks are consumed, missing output content and telemetry finalization. Use stream wrappers to keep spans open until iteration finishes and capture accumulated output messages.

  • Semconv mapping: gen_ai.output.messages on invoke_agent and invoke_workflow
Dominant language
Python
Stars
47
Forks
102
Avg merge
2d 10h
Merged PRs (30d)
110

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from open-telemetry/opentelemetry-python-genai

All issues in open-telemetry/opentelemetry-python-genai

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.