Best Practices for Multi-Agent Tool Calling Workflows (Slack to Okta Integration)

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.

  1. 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
  2. Since the slack message text contains slack user ids, we need to parse out the ID of the sender, and the direct report
  3. Using API calls or fetch from a cache, convert Slack ID to email address
  4. Check if the mentioned user does in fact report to the message sender
  5. Search through the list of Okta apps and find one with a name that most closely fits the one they mentioned.
  6. Get the list of groups assigned to that app
  7. 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
  8. Add the user to the group
  9. Compose a message with outcome
  10. Run message through a function that converts text to slack-flavored-markdown
  11. 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

2 Likes

Maybe some n8n and clear tools definitions (MCP services?) will be good start

2 Likes

N8n is great but consumes a LOT of memory, especially when handling pagination in API results

1 Like

MCP looks like a solid option

2 Likes

Careful not to over-engineer this.

Why does this need to be “multi agent”?

Most of these steps can be achieved with deterministic code and existing APIs, and you’d only need a “bot” for communication?

3 Likes

Then wrap the calls in a proxy API or break it down in manageable pieces… BTW why n8n needs multi page results?

Agree here. Avoid ai as long as you can

1 Like

Thought I’d get more useful information in the openai forums. Oh well. Thanks anyways