| 1234567891011121314151617181920212223242526272829303132333435363738394041 | [[esql-elastic-security]]=== Using {esql} in {elastic-sec}++++<titleabbrev>Using {esql} in {elastic-sec}</titleabbrev>++++You can use {esql} in {elastic-sec} to investigate events in Timeline and createdetection rules. Use the Elastic AI Assistant to build {esql} queries, or answerquestions about the {esql} query language.[discrete][[esql-elastic-security-timeline]]=== Use {esql} to investigate events in TimelineYou can use {esql} in Timeline to filter, transform, and analyze event datastored in {es}. To start using {esql}, open the **{esql}** tab. To learnmore, refer to {security-guide}/timelines-ui.html#esql-in-timeline[Investigateevents in Timeline].[discrete][[esql-elastic-security-detection-rules]]=== Use {esql} to create detection rulesUse the {esql} rule type to create detection rules using {esql} queries. The{esql} rule type supports aggregating and non-aggregating queries. To learnmore, refer to {security-guide}/rules-ui-create.html#create-esql-rule[Create an{esql} rule].[discrete][[esql-elastic-security-ai-assistant]]=== Elastic AI AssistantUse the Elastic AI Assistant to build {esql} queries, or answer questions aboutthe {esql} query language. To learn more, refer to{security-guide}/security-assistant.html[AI Assistant].NOTE: For AI Assistant to answer questions about {esql} and write {esql}queries, you need to{security-guide}/security-assistant.html#set-up-ai-assistant[enable knowledgebase].
 |