Forum Discussion

Shiyao's avatar
Shiyao
Microsoft Employee
1 year ago
Solved

Fabric data agent

I created a Fabric data agent and connected it as a knowledge source via Azure AI Foundry agent. I also developed a custom python application and run the Azure AI Foundry agent. But the run info of t...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Shiyao ,

    You're absolutely right currently, the Fabric Data Agent SDK is indeed limited to the Fabric runtime (like notebooks) and doesn’t support integration directly within a custom Python backend running outside Fabric. And unfortunately, even when running inside Fabric, it doesn’t expose the raw SQL queries the data agent generates during inference or interaction with the Azure AI Foundry agent.

    At this point, Microsoft hasn’t provided a built-in way to log or intercept the translated SQL queries within an agent run via the Azure AI Projects Python SDK. The obfuscated references (like ) are more about traceability than transparency.

    If your goal is to manually or automatically validate what SQL was generated, a workaround could be:

    • Injecting a custom critic or reasoning prompt into your Foundry agent pipeline that forces the agent to explain what SQL it would run not perfect, but it helps with transparency.
    • Raising feedback to Microsoft, since SQL traceability during inference is a critical need for auditing and enterprise-grade validation. This is still a gap in the current agent ecosystem.

    Thanks,
    Akhil.