Trying to figure out some clean ways to implement a multi agent tool calling workflow to handle cases like:
Employee slack message asking IT to grant their direct report access to a specific app in Okta.
There are a lot of things that need to happen to accomplish this.
- Reply to the user in a thread, informing them we’ve received the request and processing has begun, storing the timestamp of this reply for use later
- Since the slack message text contains slack user ids, we need to parse out the ID of the sender, and the direct report
- Using API calls or fetch from a cache, convert Slack ID to email address
- Check if the mentioned user does in fact report to the message sender
- Search through the list of Okta apps and find one with a name that most closely fits the one they mentioned.
- Get the list of groups assigned to that app
- If there’s more than one, inform the user, listing the group names and chat with them until they choose one, otherwise use the one group
- Add the user to the group
- Compose a message with outcome
- Run message through a function that converts text to slack-flavored-markdown
- Update the reply message by specifying the message using the timestamp we stored earlier and replacing its content with the formatted results
Not sure exactly but I’ve been thinking
User->proxy->message composer->planner->router->agent of choice->tool call->message composer->planner (repeat until the response fully satisfies the request)->message composer->format for slack->proxy->reply to user
Would love to hear opinions, recommendations, sources, or advice from developers who have professional experience building something like this successfully