Building a system which can interrogate other AI's

I am an experienced programmer, but new to AI. I am interested in several related topcs.

One of them is building a system which, given a prompt, considers not how to solve the problem, but which of the AI’s to which it has access it could consult with, and then connecting to that system and providing it with propmpts.

I’m sure I am not the first person to think of this sort of thing.

I am also interested in finding out if there are actual paper books I should be reading to get the basics