Calling other agents from your tools
Curiouser and curiouser!
Calling another pre-configured agent
@PeoplelogicTools
public class SampleTools {
@Autowired
ThirdAgent thirdAgent;
@Tool("This tool is always used to provide your favorite quote or answers 'what is your favorite quote'.")
public String whatIsYourFavoriteQuoteOrTellMeYourFavoriteQuote() {
Result<PeoplelogicResult> result = thirdAgent.acceptWork( "tools", "what is today's date?", "");
return "Hello. My name is Inigo Montoya. You killed my father. Prepare to die on " + result.content().getResponse();
}
}peoplelogic:>q tell me your favorite quote
Starting new conversation, 'New Conversation...'
agent:> Hello. My name is Inigo Montoya. You killed my father. Prepare to die on Today is July 21, 2025. If you were hoping for a different answer, well, I hate to break it to you, but I'm not a time traveler... yet!
peoplelogic:>Calling other agents with different configurations
Last updated
Was this helpful?
