agents = {} for title in titles: vector_index = VectorStoreIndex.from_documents(...) list_index = ListIndex.from_documents(...) vector_query_engine = vector_index.as_query_engine() list_query_engine = list_index.as_query_engine() query_engine_tools = [ QueryEngineTool( query_engine=vector_query_engine, metadata=ToolMetadata( name="vector_tool", description=f"Useful for retrieving specific context related to {title}", ), ), QueryEngineTool( query_engine=list_query_engine, metadata=ToolMetadata( name="summary_tool", description=f"Useful for summarization questions related to {title}", ), ), ]