We can make use of custom Flow Action to create or capture Lead record when using Salesforce Agentforce Agent.
To link the Lead to the Messaging Session, we can pass the Messaging Session Context Variable to the Flow.
Sample Topic Configuration:
Sample Topic Agent Actions:
Create Lead Agent Action is used to created the Lead record. It will link the Lead to the Messaging Session record. I have used a Flow to handle the Lead creation.
Create Event Agent Action is used to create a Follow-Up Event. I have used a Flow to handle the Event creation.