Forum Discussion
How to Invoke Fabric Data Agent from a Notebook Programmatically?
Hi everyone,
I’m currently working with Microsoft Fabric notebooks and exploring the capabilities of Fabric Data Agents.
I wanted to ask whether there is currently any supported way to invoke or interact with a Data Agent directly from within a Fabric Notebook (PySpark/Python), similar to an API or SDK-based call.
My goal is to:
- Send prompts/questions from the notebook
- Receive agent-generated responses programmatically
- Potentially integrate this into a larger AI/analytics workflow
I’ve explored semantic models, Copilot experiences, and REST APIs, but I could not find a clear implementation path for notebook-level integration.
Has anyone successfully implemented this?
- Is there any preview API, SDK, or workaround available?
- Are Data Agents currently limited to the Fabric UI experience only?
- Any roadmap updates from Microsoft regarding notebook integration?
Would appreciate any guidance, examples, or architecture recommendations.
Thanks!
Hello ruhail_ali_khan
The Fabric Data Agent Python library does allow you to interact programmatically with Data Agents from within a notebook, but it is currently in Preview.
Additionally, Microsoft has noted the following about the SDK:
"This SDK is designed to work exclusively within Microsoft Fabric notebooks. It isn't supported for local execution."
Fabric data agent Python SDK (preview) - Microsoft Fabric | Microsoft Learn
1 Reply
- deborshi_nagSuper User
Hello ruhail_ali_khan
The Fabric Data Agent Python library does allow you to interact programmatically with Data Agents from within a notebook, but it is currently in Preview.
Additionally, Microsoft has noted the following about the SDK:
"This SDK is designed to work exclusively within Microsoft Fabric notebooks. It isn't supported for local execution."
Fabric data agent Python SDK (preview) - Microsoft Fabric | Microsoft Learn