Forum Discussion
Automatically exporting conversations in Data Agent to a Lakehouse .pdf file using Notebook
- 11 months ago
Hi margaretaak,
Thank you for reaching out to the Microsoft Fabric Community Forum. Also, thanks to ibarrau, for his inputs on this thread.
I understand you would like to automatically export the conversations (user inputs, Data Agent responses, and visualizations) into a PDF file and store it in a Lakehouse once a session ends.
Now, Data Agent is still in preview, there isn’t a built-in option to directly export or publish conversations externally. That said, you can achieve this using Microsoft Fabric Notebooks together with your Lakehouse.Capture the conversation: Log user questions and agent responses inside a Notebook as a simple table (for example, a pandas DataFrame).
Generate a PDF: Use Python libraries such as reportlab within the Notebook to write the conversation text (and optionally any regenerated visualizations) into a PDF file.
Save to Lakehouse: By writing the PDF into /Lakehouse/default/Files/, it is automatically stored in your connected Lakehouse. Automate if needed: You can schedule the Notebook to run after sessions, using Fabric’s orchestration features.Refer these links:
1. https://learn.microsoft.com/en-us/fabric/data-science/concept-data-agent
2. https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-notebook-explore
3. https://learn.microsoft.com/en-us/fabric/data-engineering/how-to-use-notebook
4. https://learn.microsoft.com/en-us/fabric/data-science/how-to-create-data-agentImportant note: Visuals generated inside Data Agent don’t currently export automatically, but you can recreate them in the Notebook (e.g., matplotlib/seaborn) before writing them to PDF.
Hope this clears it up. Let us know if you have any doubts regarding this. We will be happy to help.
Thank you for using the Microsoft Fabric Community Forum.
Hi margaretaak,
Just checking in to see if the issue has been resolved on your end. If the earlier suggestions helped, that’s great to hear! And if you’re still facing challenges, feel free to share more details happy to assist further.
Thank you.
Hi margaretaak,
Hope you had a chance to try out the solution shared earlier. Let us know if anything needs further clarification or if there's an update from your side always here to help.
Thank you.