It is used as a thickening agent that adds flavour at the same time.
Filé is used in Cajun cooking, in particular in making gumbo. That being said, it’s important to note that there are roughly two main types of gumbo: one which uses okra, and the other which includes Filé. Some Cajuns would never consider using both okra and Filé in the same gumbo recipe, as both are thickeners.
Filé needs to be added after cooking, but while the dish is still hot. If cooked too long, it will become stringy. Often, it’s left up to the individual to sprinkle it over his/her own rice or gumbo at the table.
Europeans learned how to make and use Filé from the Indians.