AIP agent calling other agents are extremely slow

I have one AIP super agent that calls other agents based on the query.

These calls are extremely slow. For example, it takes 60 seconds to get a response from a child agent when called from the super agent, but only 7 seconds when the child agent is used directly.

Could this be because the child agents are published as functions? What is the right approach? These functions seem to be consuming time somewhere in between.

Is this because of cold start of serverless functions behind the scenes?

Hi Raj,

Have you tried the native calling?

The issue has previously been, that the ‘super agent’ needed to basically parse through the entire request several times:

  1. Super agent receives request X
    1. (Super agent might need to do something with request X)
  2. Super agent thinks about which tool to use, based on request X
  3. Super agent finds the right tool, then prepare the payload to be sent to child agent
  4. child agent processes request X, and returns output X
  5. Super agent reads output X
    1. (Super agent might do some reasoning on top of output X, e.g. comparing it with request X)
  6. Super agent returns output X

Even if the agent did nothing to this request, you still had the full payload go through it multiple times, which was definitely very slow.

If you can share some more details, we could see where you might be able to optimise performance. As mentioned above, the native tool calling does help a lot.

1 Like

Hello,

Can anybody share a template or configuration how a super agent can call other agents in Palantir? I am trying to do that in agent studio and whenever I add other agents it shows some error with some input is missing.

Really appreciate the help here

Are you adding these agents via their published functions, or what is your workflow?

Hello @jakehop

I tried using the published AIP agent/functions directly in other AIP agent. But I believe that’s not supported in design due to new session ID requirement currently. Now I am trying to use via typescript functions. Do I need to have two different functions for each agent - one to start a conversation so I can have the session id and one to continue the thread os there is easier way to do that?

Is there any way to use OpenAI reponses API format in foundry with the foundry provided models?

Thanks for your help

Not sure how close your workflow is to Raj’s in the top. Perhaps it’s worth a new topic if it differs too much.

That said, you can get away with a single function that wraps all of this up, not too dissimilar from how the responses API works.

If you want to use them via the Workshop widget, you can use the ‘wrapper function’ as a tool, which can work well for many use cases.

1 Like

It was the case before, but timelines are now significantly compressed—probably due to some new updates rolling out.

That said, if anybody wants to publish an agent as a function, simply clicking “Publish” won’t work. You need to click the icon next to the publish button and select appropriate option.