Yea you'll notice in that notebook there's a return_sources kwarg
Then the response from the agent is a json you can parse
The other option is using llama index as a custom tool in langchain without our wrappers
In that case, in the func of each tool, you can use a wrapper function around query that still calls query, but then also checks response.sources_nodes to do whatever you want with that πͺ