Best way to make an Agent pick an API endpoint

Hey Guys I have been trying to think of the best way to solve this problem I have. So I am making a crew that will act as a chatbot. Once the input is received the agent must pick the best API endpoint for the users query as they all contain different information, there is around 14 endpoints.

RAG is not an option as i want all the information to be present as they are data entries

i.e a single APIS json response:

  • a list of names, their emails, phone numbers etc.

So when the user asks what is Johns email is i would want it to know to pick the endpoint containing the name and email.

Much appreciated if anyone knows a good way!

Wrap the endpoints as tools and pass them to the agent. The agent will choose which tool(endpoint) to use based on the name and description you give the tools when you create them