[Bug] pprint_run_response TypeError on streaming dict content
Author: MohammadHijjawi97Created Sep 17, 2026Updated Sep 17, 2026
Description
pprint_run_response concatenates streaming resp.content onto a string. Structured-output chunks that are dicts (or other non-strings) raise TypeError. The non-streaming path already JSON-encodes non-string content.
Steps to Reproduce
from agno.run.agent import RunContentEvent
from agno.utils.pprint import pprint_run_response
pprint_run_response([RunContentEvent(content={"city": "Paris"})])Expected Behavior
The dict is printed as JSON, matching the non-streaming path. No exception.
Actual Behavior
TypeError: can only concatenate str (not "dict") to str
Environment
- OS: Windows 11
- Agno Version: v3.0.10 (current main)
- Additional Environment Details: Python 3.13
Possible Solutions (optional)
Stringify non-str chunks with json.dumps before concatenating. Apply the same in apprint_run_response.
Source: agno-agi/agno