The Fabric data agent API is now public. Developers can now automate how Fabric data agents are created, configured, updated, and published from their own tools, pipelines, and backend services. The primary purpose of the management-plane public API is lifecycle management: managing and updating data agent configuration in a supported, repeatable way. With new public API support, the Fabric data agent SDK can run outside Fabric, giving teams a consistent way to manage data agents programmatically while keeping the in-product experience unchanged.
What changed?
Until now, most of what you did with a Fabric data agent happened inside Microsoft Fabric. You created a data agent in the Fabric portal, wired up your data sources, configured the agent, and tested it. You could also use the data agent SDK, but only from within a Fabric notebook. Either way, the work stayed in one place.
With this update the Fabric data agent SDK now runs on the Fabric public API. After authenticating to Fabric, you can now programmatically:
- Create and manage data agent artifacts.
- Add, remove, and configure data sources.
- Configure agent instructions, data source instructions, and example queries.
- Update and publish data agents from your own code.
- Integrate data agent management into local development, CI/CD pipelines, internal portals, containers, Azure Functions, and backend services.
- Manage and update data agent configurations for lifecycle management.
Why this matters
If you’re only working in the Fabric portal, this update won’t change your day-to-day. The impact mostly shows up once you need to automate or scale — when managing data agents across environments, tools, or pipelines becomes part of your workflow. A few examples follow:
- You manage many workspaces and want to provision the same data agent shape across all of them without clicking through each one.
- You are building an internal tool or portal where your team manages data agents without ever opening Fabric.
- You want to plug data agent provisioning into your existing CI/CD pipeline.
- You are an ISV building on Fabric and you want data agents to be part of your product, not a side trip for your customers.
That is what a public API is for. It turns a clickable feature into a building block.
How this fits with the rest of Fabric
The SDK is built on the Fabric public API, the same REST surface you already use for workspaces and items. It uses the same authentication and the same patterns, so it fits naturally next to the rest of your Fabric automation.
It is useful to separate management from runtime consumption. The public API and SDK are the management-plane surface for creating, configuring, updating, and publishing data agents. After a data agent is published, the MCP endpoint is the main runtime and consumption endpoint for querying it from tools, applications, and agent experiences.
This complements Fabric Git integration and deployment pipelines. Git and deployment pipelines help teams track data agent configuration as files and promote changes across development, test, and production environments. That is set up at the workspace level. The public API adds a programmatic management layer so teams can create, update, configure, and publish data agents directly from their own code.
1. Authenticate to Fabric (from your local machine, outside Fabric)
from azure.identity import AzureCliCredential
from fabric.analytics.environment.credentials import (
SetFabricAnalyticsDefaultTokenCredentialsGlobally,
)
SetFabricAnalyticsDefaultTokenCredentialsGlobally(AzureCliCredential())2. Create a data agent in your workspace
from fabric.dataagent.client import create_data_agent
# WORKSPACE_ID: the Fabric workspace that will own the new data agent
WORKSPACE_ID = "<your-workspace-id>"
agent = create_data_agent(
data_agent_name="Quickstart Data Agent",
workspace_id=WORKSPACE_ID,
)3. Configure the data agent and add a data source
# AGENT_INSTRUCTIONS: the agent's system prompt (what it is for, tone, formatting rules)
AGENT_INSTRUCTIONS = "<your agent instructions>"
# DATASOURCE_ID: the artifact ID of an existing lakehouse, warehouse, semantic model, or KQL database
DATASOURCE_ID = "<your-datasource-id>"
agent.update_settings(ai_instructions=AGENT_INSTRUCTIONS)
agent.add_staging_datasource(
artifact_name_or_id=DATASOURCE_ID,
workspace_id_or_name=WORKSPACE_ID,
)4. Publish the data agent
agent.publish_staging(description="Initial publish")Figure: The data agent SDK running in VS Code on a local machine, authenticated to Fabric.
Getting started
To get started, authenticate to Fabric using user or service principal token, select a workspace, and use the data agent SDK to create your first data agent from a script. You can find the Fabric data agent SDK and the Fabric REST API reference in the documentation, including the Data Agent Items APIs for managing the agent lifecycle and the Staging APIs for editing data sources and example queries. Start small: add one data source, configure instructions and example queries, publish the agent, and then use the MCP endpoint as the main consumption endpoint for querying the published data agent from your tools or applications.
Enabling Fabric data agents to be programmable outside Fabric is a foundational step. It gives developers and teams a supported and consistent way to build data agents into their own tools, pipelines, and products. We look forward to seeing what you build with it.