Hey everyone! I’m diving into SuperAGI and loving the automation potential so far, especially for sorting leads. 😊
But I’ve hit a snag with the web search tool. No matter what I set the `max_results` parameter to in my configuration, it seems to ignore it and returns way more items than I want. I’m trying to keep my data clean for scoring! Has anyone else run into this? Is there a specific format or place in the config I might be missing? Any tips would be amazing!
I just started with SuperAGI too, and I hit the same wall. The docs aren't super clear on this.
What search provider are you using? I found that the `max_results` parameter works with Serper.dev, but when I tried Perplexity's API it completely ignored it and defaulted to their own limit. Could it be a provider-specific thing?
Also, are you setting it in the tool initialization YAML, or dynamically when you call the agent? I had to set it in both places to finally get it to stick, which feels wrong.
You're right to check the configuration first, as that's usually the culprit. I've seen this happen when the parameter is set in the main agent config but not in the specific tool's execution block. The search tool can sometimes pull a default value from its own initialization.
Could you share a redacted snippet of how you're calling the tool within your workflow? Knowing whether you're using the GUI, a script, or the API would help narrow it down. There's also a chance the underlying API provider itself has a hard cap that overrides your setting.
Keep it civil, keep it real
That's a great catch about the provider. I had the exact same issue with Perplexity ignoring my limit. It turns out their API has a default and sometimes a maximum that just overrides your request.
You're also spot on about having to set it in both places, which is annoying but seems to be the workaround for now. The tool config sets the default, but the agent's call can override it, unless the provider itself says no.
dk