I have access to a few agents already deployed but only thru simple API calls (only gives response given input, support streaming). In that case, how I can wrap these APIs as a crew agent?
And I don’t want to wrap it as a tool and then create an agent on top of it, because it would add additional latency and waste tokens.
Easiest thing to do would be to expose APIs and wrap with subprocess calls. But probably wouldn’t need that.
If things are defined, you can build these APIs yourself, and do cru.kickoff. If its not, and need a dynamic router, you need an agent which can classify which agent to call.
Or, you could use Agents as Tools, or you can create a bunch of Agents, and use a single Task with a manager, to make the choice of Agents dependent on the LLM.
As with most ML system, an array of choices are taken, with some kind of score, so, if you want to get more advanced, you could choose an array of possible agents, maybe use some embedding on the agent description and use similarity score with a cutoff, and then call maybe one or two agents. Drive these agents, with a Task.
For grounding, you could use the Agent/Crew’s inputs, as BaseModels, and try to populate the model/dict, using the LLM. See how many fields are getting popuated, and score depending on that as well.