You can create an Agent or Agent Action directly from a chart or Data Table. Click the Create button and select Agent / Agent Action from the drop-down list.
You can also create them after selecting a data point in the chart (the Agent or Agent Action will contain all the context - the chart, data, filters, etc.). See Create Agents and Agent Actions with a Data Point from Chart.