Skip to content

data-agent

Manage data agents (create, query, and interact with AI agents)

Authentication scope: fabric

List data agents in a workspace

Terminal window
fabio data-agent list --workspace <value>
Flag Type Required Description
--workspace string Yes Workspace ID

Read-only · Returns list

Show details of a data agent

Terminal window
fabio data-agent show --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID

Read-only · Returns object

Create a new data agent

Terminal window
fabio data-agent create --workspace <value> --name <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--name string Yes Data agent display name
--description string No Data agent description (max 256 characters)
--sensitivity-label string No Sensitivity label ID to apply on creation

Examples

Terminal window
fabio data-agent create --workspace $WS --name "SalesAssistant"

Mutates state · Returns object

Update a data agent (name and/or description)

Terminal window
fabio data-agent update --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--name string No New display name
--description string No New description (max 256 characters)

Mutates state · Returns object

Delete a data agent

Terminal window
fabio data-agent delete --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--hard-delete bool No Permanently delete (cannot be recovered)

Mutates state · Destructive · Returns void

Query (chat with) a published data agent using natural language

Terminal window
fabio data-agent query --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--prompt string No Natural language question (omit to read from stdin)
--published-url string No Published URL (from portal Settings page after publishing the agent)
--show-steps bool No Include execution details (SQL queries, tool calls, run steps)
--stage string No Agent stage to query: only production (published) is supported via the public API Default: production.
--thread-id string No Reuse an existing thread for a multi-turn follow-up (from a prior query’s threadId)
--keep-thread bool No Keep the thread after the query (returns its threadId for a follow-up turn)
--download-files string No Download files attached to the answer into this directory (e.g. generated CSVs/charts)
--visuals bool No Extract chart/visual specifications the agent generated (chart type, axes, title, sort, and the aggregated data) into a visuals array in the output
--timeout integer No Maximum wait time in seconds for the query to complete (default: 300) Default: 300.

Examples

Terminal window
fabio data-agent query --workspace $WS --id $DA --prompt "Who is the top customer by revenue?"
Terminal window
fabio data-agent query --workspace $WS --id $DA --prompt "Remember the number 7." --keep-thread
Terminal window
fabio data-agent query --workspace $WS --id $DA --prompt "What number did I mention?" --thread-id thread_abc123
Terminal window
fabio data-agent query --workspace $WS --id $DA --prompt "Chart monthly revenue as a CSV" --download-files ./out
Terminal window
fabio data-agent query --workspace $WS --id $DA --prompt "Complex query..." --timeout 600 --show-steps

Read-only · Returns object

Batch-run a set of questions against a published data agent (evaluation primitive)

Terminal window
fabio data-agent evaluate --workspace <value> --id <value> --questions <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--questions string Yes Questions file: JSON (array of strings, or [{“question”,“expected”}]) or CSV/TSV with a question column (optional expected)
--published-url string No Published URL (from portal Settings page after publishing the agent)
--repeats string No Number of times to run each question (default: 1)
--show-steps bool No Include execution details (SQL queries, tool calls, run steps) per run
--stage string No Agent stage to query: only production (published) is supported via the public API
--timeout string No Maximum wait time in seconds per question run (default: 300)
--llm-endpoint string No LLM judge endpoint to grade answers (Azure OpenAI resource URL or OpenAI-compatible base). Enables LLM grading
--llm-key string No LLM judge API key
--llm-model string No LLM judge model (Azure deployment name, or model id for OpenAI-compatible)
--llm-api-version string No Azure OpenAI API version (default: 2024-10-21)

Examples

Terminal window
fabio data-agent evaluate --workspace $WS --id $DA --questions questions.json
Terminal window
fabio data-agent evaluate --workspace $WS --id $DA --questions qs.csv --repeats 3 --show-steps
Terminal window
fabio data-agent evaluate --workspace $WS --id $DA --questions qs.json --llm-endpoint https://r.openai.azure.com --llm-key $KEY --llm-model gpt-4o

Read-only · Returns object

Validate a data source’s few-shot examples with an LLM (duplicates, conflicts, quality)

Terminal window
fabio data-agent validate-fewshots --workspace <value> --id <value> --datasource <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--datasource string Yes Data source name or ID
--stage string No Stage to read: staging (draft) or published (live). Default: staging
--llm-endpoint string No LLM judge endpoint (Azure OpenAI resource URL or OpenAI-compatible base). Required
--llm-key string No LLM judge API key. Required
--llm-model string No LLM judge model (Azure deployment name, or model id for OpenAI-compatible). Required
--llm-api-version string No Azure OpenAI API version (default: 2024-10-21)

Examples

Terminal window
fabio data-agent validate-fewshots --workspace $WS --id $DA --datasource MyLakehouse --llm-endpoint https://r.openai.azure.com --llm-key $KEY --llm-model gpt-4o
Terminal window
FABIO_LLM_ENDPOINT=https://r.openai.azure.com FABIO_LLM_KEY=$KEY FABIO_LLM_MODEL=gpt-4o fabio data-agent validate-fewshots --workspace $WS --id $DA --datasource MyLakehouse

Read-only · Returns object

Print the Model Context Protocol (MCP) endpoint URL for consuming a published data agent

Terminal window
fabio data-agent mcp-url --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID

Read-only · Returns object

Get the configuration of a data agent (instructions, data sources, preview runtime)

Terminal window
fabio data-agent get-config --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--stage string No Stage to read: staging (draft) or published (live). Default: staging

Examples

Terminal window
fabio data-agent get-config --workspace $WS --id $DA
Terminal window
fabio data-agent get-config -w $WS --id $AGENT --stage published

Read-only · Returns object

Update the configuration of a data agent (instructions, preview runtime)

Terminal window
fabio data-agent update-config --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--instructions string No AI instructions for the agent (guides data source selection and query generation)
--instructions-file string No Path to file containing AI instructions (alternative to –instructions)
--enable-preview-runtime bool No Enable preview runtime (multi-step reasoning: Advanced NL2SQL for SQL sources AND Advanced DAX generation for semantic models)
--disable-preview-runtime bool No Disable preview runtime (revert to the single-pass standard runtime: GA NL2SQL / standard DAX generation)

Examples

Terminal window
fabio data-agent update-config --workspace $WS --id $DA --instructions "Answer questions about sales data. Use SQL for lakehouse tables."
Terminal window
fabio data-agent update-config --workspace $WS --id $DA --instructions-file instructions.txt
Terminal window
fabio data-agent update-config --workspace $WS --id $DA --enable-preview-runtime

Mutates state · Returns object

List configured data sources for a data agent

Terminal window
fabio data-agent list-datasources --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--stage string No Stage to read: staging (draft) or published (live). Default: staging

Examples

Terminal window
fabio data-agent list-datasources --workspace $WS --id $DA

Read-only · Returns list

Show details of a configured data source

Terminal window
fabio data-agent show-datasource --workspace <value> --id <value> --datasource <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--datasource string Yes Data source name or ID
--stage string No Stage to read: staging (draft) or published (live). Default: staging

Examples

Terminal window
fabio data-agent show-datasource --workspace $WS --id $DA --datasource "SalesLakehouse"

Read-only · Returns object

Add a data source to the agent (auto-discovers schema from artifact)

Terminal window
fabio data-agent add-datasource --workspace <value> --id <value> --artifact <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--artifact string Yes Artifact name or ID (lakehouse, warehouse, KQL database, semantic model, etc.)
--artifact-workspace string No Workspace containing the artifact (defaults to same workspace as agent)
--artifact-type string No Artifact type (auto-detected if omitted). Values: Lakehouse, Warehouse, KQLDatabase, SemanticModel, Ontology, GraphModel, MirroredDatabase, SQLDatabase
--instructions string No Data source instructions (how the agent should use this source)

Examples

Terminal window
fabio data-agent add-datasource --workspace $WS --id $DA --artifact "SalesLakehouse"
Terminal window
fabio data-agent add-datasource --workspace $WS --id $DA --artifact $LAKEHOUSE_ID --artifact-type Lakehouse --instructions "Contains product catalog and order history"

Mutates state · Returns object

Remove a data source from the agent

Terminal window
fabio data-agent remove-datasource --workspace <value> --id <value> --datasource <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--datasource string Yes Data source name or ID to remove

Examples

Terminal window
fabio data-agent remove-datasource --workspace $WS --id $DA --datasource "SalesLakehouse"

Mutates state · Destructive · Returns object

Update a data source’s metadata (instructions, description)

Terminal window
fabio data-agent update-datasource --workspace <value> --id <value> --datasource <value>
Flag Type Required Description
--workspace uuid Yes Workspace ID
--id uuid Yes Data agent ID
--datasource string Yes Data source name or ID
--instructions string No New data source instructions (how the agent should use this source)
--description string No New description for the data source

Examples

Terminal window
fabio data-agent update-datasource -w $WS --id $AGENT --datasource "SalesLakehouse" --instructions "Contains order history and product catalog. Use for sales analytics queries."

Mutates state · Returns void

List few-shot examples for a data source

Terminal window
fabio data-agent list-fewshots --workspace <value> --id <value> --datasource <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--datasource string Yes Data source name or ID
--stage string No Stage to read: staging (draft) or published (live). Default: staging

Examples

Terminal window
fabio data-agent list-fewshots --workspace $WS --id $DA --datasource $LH_ID

Read-only · Returns list

Show a specific few-shot example by ID

Terminal window
fabio data-agent show-fewshot --workspace <value> --id <value> --datasource <value> --fewshot-id <value>
Flag Type Required Description
--workspace uuid Yes Workspace ID
--id uuid Yes Data agent ID
--datasource string Yes Data source name or ID
--fewshot-id uuid Yes Few-shot example ID
--stage string No Stage to read: staging (draft) or published (live). Default: staging

Examples

Terminal window
fabio data-agent show-fewshot -w $WS --id $AGENT --datasource "SalesLakehouse" --fewshot-id $FS_ID

Read-only · Returns object

Add a few-shot example (question/query pair) to a data source

Terminal window
fabio data-agent add-fewshot --workspace <value> --id <value> --datasource <value> --question <value> --answer <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--datasource string Yes Data source name or ID
--question string Yes Natural language question
--answer string Yes The example query that answers the question, in the data source’s language (SQL for lakehouse/warehouse, KQL for a KQL database, GQL for graph/ontology). Aliases: –sql/–kql/–dax/–gql

Examples

Terminal window
fabio data-agent add-fewshot --workspace $WS --id $DA --datasource $LH_ID --question "Who is the top customer by revenue?" --answer "SELECT TOP 1 customer_name, SUM(total_amount) as revenue FROM orders GROUP BY customer_name ORDER BY revenue DESC"

Mutates state · Returns object

Update an existing few-shot example (question and/or query)

Terminal window
fabio data-agent update-fewshot --workspace <value> --id <value> --datasource <value> --fewshot-id <value>
Flag Type Required Description
--workspace uuid Yes Workspace ID
--id uuid Yes Data agent ID
--datasource string Yes Data source name or ID
--fewshot-id uuid Yes Few-shot example ID to update
--question string No Updated natural language question
--answer string No Updated example query (aliases: –sql/–kql/–dax/–gql)

Examples

Terminal window
fabio data-agent update-fewshot -w $WS --id $AGENT --datasource "SalesLakehouse" --fewshot-id $FS_ID --answer "SELECT COUNT(DISTINCT customer_id) FROM orders"

Mutates state · Returns void

Remove a few-shot example by ID

Terminal window
fabio data-agent remove-fewshot --workspace <value> --id <value> --datasource <value> --fewshot-id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--datasource string Yes Data source name or ID
--fewshot-id string Yes Few-shot example ID to remove

Examples

Terminal window
fabio data-agent remove-fewshot --workspace $WS --id $DA --datasource $LH_ID --fewshot-id $FEWSHOT_ID

Mutates state · Destructive · Returns object

Delete all few-shot examples for a data source

Terminal window
fabio data-agent clear-fewshots --workspace <value> --id <value> --datasource <value>
Flag Type Required Description
--workspace uuid Yes Workspace ID
--id uuid Yes Data agent ID
--datasource string Yes Data source name or ID

Examples

Terminal window
fabio data-agent clear-fewshots -w $WS --id $AGENT --datasource "SalesLakehouse"

Mutates state · Destructive · Returns void

Bulk upload few-shot examples from a JSON or CSV file

Terminal window
fabio data-agent upload-fewshots --workspace <value> --id <value> --datasource <value> --file <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--datasource string Yes Data source name or ID
--file string Yes File with few-shots (JSON: [{“question”:“…”, “query”:“…”}] or CSV with question,query columns)

Examples

Terminal window
fabio data-agent upload-fewshots --workspace $WS --id $DA --datasource $LH_ID --file fewshots.json
Terminal window
fabio data-agent upload-fewshots --workspace $WS --id $DA --datasource $LH_ID --file fewshots.csv

Mutates state · Returns object

Select or unselect data-source elements (tables, or ontology/graph entity types)

Terminal window
fabio data-agent select-tables --workspace <value> --id <value> --datasource <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--datasource string Yes Data source name or ID
--tables string No Comma-separated table names to select (e.g. “orders,products,customers”)
--all-tables bool No Select all tables
--elements string No Comma-separated element names of any type to select (e.g. ontology entity types on an Ontology/GraphModel data source)
--all-elements bool No Select all elements regardless of type
--unselect bool No Unselect (instead of select)

Examples

Terminal window
fabio data-agent select-tables --workspace $WS --id $DA --datasource $LH_ID --tables "orders,products,customers"
Terminal window
fabio data-agent select-tables --workspace $WS --id $DA --datasource $LH_ID --all-tables
Terminal window
fabio data-agent select-tables --workspace $WS --id $DA --datasource $LH_ID --tables "staging_raw" --unselect

Mutates state · Returns object

List elements (tables, columns) in a data source with selection state and descriptions

Terminal window
fabio data-agent list-elements --workspace <value> --id <value> --datasource <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--datasource string Yes Data source name or ID
--stage string No Stage to read: staging (draft) or published (live). Default: staging

Examples

Terminal window
fabio data-agent list-elements --workspace $WS --id $DA --datasource $LH_ID

Read-only · Returns list

Set or clear a description on a table or column in a data source

Terminal window
fabio data-agent describe-element --workspace <value> --id <value> --datasource <value> --path <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--datasource string Yes Data source name or ID
--path string Yes Dot-separated path to the element (e.g. dbo.orders for a table, dbo.orders.total_amount for a column)
--description string No Description text (omit or pass empty string to clear)

Examples

Terminal window
fabio data-agent describe-element --workspace $WS --id $DA --datasource $LH_ID --path "dbo.orders" --description "Customer orders with amounts and shipping dates"
Terminal window
fabio data-agent describe-element --workspace $WS --id $DA --datasource $LH_ID --path "dbo.orders.total_amount" --description "Total order value in USD including tax"

Mutates state · Returns object

Delete a stale schema element (only elements no longer in the live schema)

Terminal window
fabio data-agent delete-element --workspace <value> --id <value> --datasource <value> --element-id <value>
Flag Type Required Description
--workspace uuid Yes Workspace ID
--id uuid Yes Data agent ID
--datasource string Yes Data source name or ID
--element-id string Yes Element ID to delete (from list-elements output)

Examples

Terminal window
fabio data-agent delete-element -w $WS --id $AGENT --datasource "SalesLakehouse" --element-id "dbo.deprecated_table"

Mutates state · Destructive · Returns void

Get the definition of a data agent (configuration, data sources, etc.)

Terminal window
fabio data-agent get-definition --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--decode bool No Decode base64 payloads inline (adds decodedPayload field)

Read-only · Long-running operation · Returns object

Update the definition of a data agent (configure data sources, instructions, etc.)

Terminal window
fabio data-agent update-definition --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--file string No Path to definition file (JSON with parts array)
--content string No Inline JSON definition (alternative to –file)
--update-metadata bool No Also update item metadata from .platform file if present

Mutates state · Long-running operation · Returns void

Publish a data agent (promotes draft configuration to published state)

Terminal window
fabio data-agent publish --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Data agent ID
--description string No Optional publish description
--to-m365 bool No Also publish to Microsoft 365 Copilot Agent Store

Examples

Terminal window
fabio data-agent publish --workspace $WS --id $DA --description "v1.0 production"
Terminal window
fabio data-agent publish --workspace $WS --id $DA --to-m365

Mutates state · Returns object

Reset staging (discard all draft changes, revert to published state)

Terminal window
fabio data-agent reset --workspace <value> --id <value>
Flag Type Required Description
--workspace uuid Yes Workspace ID
--id uuid Yes Data agent ID

Examples

Terminal window
fabio data-agent reset -w $WS --id $AGENT

Mutates state · Destructive · Returns void