Forum Discussion
Foundry Toolbox preview not working for hosted agent
Tried calling a hosted foundry agent with calls to Toolbox where I tried both web search and code interpreter. Neither of them work. If i use session.call_tool, I get an error like "
meta={'tool_configuration': {'type': 'web_search'}} content=[TextContent(type='text', text='NotFound[404, user=The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.]', annotations=None, meta=None)] structuredContent=None isError=True".
If i try agent.run asking for latest news on a topic ,I either get a generic pretrained knowledge based response (without reference to web search tool) Or a generic error of the type "
I wasn't able to retrieve the latest news at the moment due to a technical issue."
I have verified that the code uses the appropriate headers like "
headers={"Foundry-Features": "Toolboxes=V1Preview"}"
I have verified that a Foundry portal agent calling web search tool works as expected.
However when I create a custom tool using MCP Server where I provide the URL of the foundry toolbox and then try to use this tool in a Portal created agent I always get an access issue even if i use project identity as the Entra authentication and despite the fact that Project Identity has Foundry User privilege on Foundry Project.
I have also tried the github samples for deploying hosted agents with foundry toolbox without luck.
Version of agent-framework as of date that I have tried is 1.4.0.
Please advise on a resolution. Thanks!