Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ann33
Helper I
Helper I

Fabric Data Agent SDK

 Hi..

Am trying to run Fabric Data Agent SDK. However I am unable to proceed due to the below error. There is no documentation post the migration Assistant API.Can someone help to guide on the correct method to call.

 

AttributeError: 'FabricOpenAI' object has no attribute 'list_messages'
-------------------------------------------------------
import sempy.fabric as fabric
from fabric.dataagent.client import FabricOpenAI

# Initialize the FabricOpenAI client
fabric_client = FabricOpenAI(artifact_name=ai_skill_name)

# Assume there is a method to list messages
# Note: The actual method name should be verified with the library documentation
response = fabric_client.list_messages(
    thread_id=thread.id,
    sort_order="asc"
)

# Print the response in a structured JSON format
print(response.model_dump_json(indent=2))
2 ACCEPTED SOLUTIONS
nilendraFabric
Super User
Super User

Hi @ann33 

 

 

The `FabricOpenAI` client does not have a direct `list_messages()` method.  the correct way to list messages is to use the thread-based message listing pattern from the OpenAI Assistants API

 

Give this a try :

 

 

from fabric.dataagent.client import FabricOpenAI


fabric_client = FabricOpenAI(artifact_name=ai_skill_name)


response = fabric_client.beta.threads.messages.list(
thread_id=thread.id,
order="asc" 
)


print(response.model_dump_json(indent=2))

View solution in original post

v-tsaipranay
Community Support
Community Support

Hi @ann33 ,

Thank you for reaching out to the Microsoft Fabric Community and thank you @nilendraFabric for sharing the helpful response.

 

The warning you’re seeing is from the openai Python package, which flags that the Assistants API will eventually be replaced by the Responses API. However, it remains fully supported and will be available until at least mid-2026, with a 12-month notice before deprecation.

As of now, the Fabric Data Agent SDK supports only the Assistants API. The correct method:

fabric_client.beta.threads.messages.list(thread_id=thread.id, order="asc")

is still valid and safe to use.

If you'd prefer to remove the warning, you can suppress it using:

import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)

Support for the Responses API in Fabric will come in a future update. Meanwhile, you're good to proceed with the current SDK.

 

Hope this helps. Please reach out for further assistance.

If this post helps, then please consider to Accept as the solution to help the other members find it more quickly and a kudos would be appreciated.

 

Thank you.

View solution in original post

4 REPLIES 4
v-tsaipranay
Community Support
Community Support

Hi @ann33 ,

Thank you for reaching out to the Microsoft Fabric Community and thank you @nilendraFabric for sharing the helpful response.

 

The warning you’re seeing is from the openai Python package, which flags that the Assistants API will eventually be replaced by the Responses API. However, it remains fully supported and will be available until at least mid-2026, with a 12-month notice before deprecation.

As of now, the Fabric Data Agent SDK supports only the Assistants API. The correct method:

fabric_client.beta.threads.messages.list(thread_id=thread.id, order="asc")

is still valid and safe to use.

If you'd prefer to remove the warning, you can suppress it using:

import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)

Support for the Responses API in Fabric will come in a future update. Meanwhile, you're good to proceed with the current SDK.

 

Hope this helps. Please reach out for further assistance.

If this post helps, then please consider to Accept as the solution to help the other members find it more quickly and a kudos would be appreciated.

 

Thank you.

Thank You. It worked.

nilendraFabric
Super User
Super User

Hi @ann33 

 

 

The `FabricOpenAI` client does not have a direct `list_messages()` method.  the correct way to list messages is to use the thread-based message listing pattern from the OpenAI Assistants API

 

Give this a try :

 

 

from fabric.dataagent.client import FabricOpenAI


fabric_client = FabricOpenAI(artifact_name=ai_skill_name)


response = fabric_client.beta.threads.messages.list(
thread_id=thread.id,
order="asc" 
)


print(response.model_dump_json(indent=2))

Thank You.

Now facing the below.

 

DeprecationWarning: The Assistants API is deprecated in favor of the Responses API

Does the SDK support Responses API

Helpful resources

Announcements
Fabric July 2025 Monthly Update Carousel

Fabric Monthly Update - July 2025

Check out the July 2025 Fabric update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.