| title | Create a Foundry agent with OpenAPI tool |
|---|---|
| description | Steps to create a Foundry agent in the portal and configure it with an OpenAPI tool to call your web app. |
| ms.author | cephalin |
| ms.topic | include |
| ms.date | 12/08/2025 |
| ms.service | azure-app-service |
-
In the Foundry portal, make sure the top New Foundry radio button is set to active and create a project.
-
In the home page, copy the Project endpoint for later.
-
Select Start building > Create agent and follow the prompt.
-
In the new agent's playground, create an OpenAPI tool to call your web app by selecting Tools > Add > Custom > OpenAPI tool > Create. In the Setup pane, add an action with the OpenAPI spec tool. Use the OpenAPI schema that you get from the deployed web app and anonymous authentication. For detailed steps, see How to use the OpenAPI spec tool.
Your application code is already configured to include the server's
urlandoperationId, which are needed by the agent. For more information, see Connect to OpenAPI Specification. -
Be sure to select Save.
-
Select Try in playground and test your Foundry agent with prompts like "Show me all the tasks" and "Please add a task."
If you get a valid response, the agent is making tool calls to the OpenAPI endpoint on your deployed web app.