Edit

Share via


Quickstart: Get started with Azure AI Foundry (Foundry projects)

Note

An alternate hub project quickstart is available: Quickstart: Get started with Azure AI Foundry (Hub projects).

In this quickstart, you use Azure AI Foundry to:

  • Create a project
  • Deploy a model
  • Run a chat completion
  • Create and run an agent
  • Upload files to the agent

The Azure AI Foundry SDK is available in multiple languages, including Python, Java, TypeScript, and C#. This quickstart provides instructions for each of these languages.

Tip

The rest of this article shows how to create and use a Azure AI Foundry project. Select hub-based project at the top of this article if you want to use a hub-based project instead. Which type of project do I need?

Prerequisites

Important

Items marked (preview) in this article are currently in public preview. This preview is provided without a service-level agreement, and we don't recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.

First run experience

Use this fast path when you don't have any projects yet.

In the portal, you can explore a rich catalog of cutting-edge models from Microsoft, OpenAI, DeepSeek, Hugging Face, Meta, and more. For this tutorial, search and then select the gpt-4o model.

  1. Sign in to the Azure AI Foundry portal.

  2. From the overview page or Model catalog, select gpt-4o (or gpt-4o-mini).

    Screenshot shows how to start with a model in Azure AI Foundry portal.

  3. Select Use this model. When prompted, enter a project name and select Create.

  4. Review the deployment name and select Create.

  5. Then select Connect and deploy after selecting a deployment type.

  6. Select Open in playground from the deployment page after it's deployed.

  7. You land in the Chat playground with the model pre-deployed and ready to use.

If you're building an agent, you can instead start with Create an agent. The steps are similar, but in a different order. Once the project is created, you arrive at the Agent playground instead of the Chat playground.

Set up your environment

No installation is necessary to use the Azure AI Foundry portal.

Run a chat completion

Chat completions are the basic building block of AI applications. Using chat completions you can send a list of messages and get a response from the model.

  1. In the chat playground, fill in the prompt and select the Send button.
  2. The model returns a response in the Response pane.

Chat with an agent

Agents have powerful capabilities through the use of tools. Start by chatting with an agent.

When you're ready to try an agent, a default agent is created for you. To chat with this agent:

  1. On the left pane, select Playgrounds.
  2. In the Agents playground card, select Let's go.
  3. Add instructions, such as, "You are a helpful writing assistant."
  4. Start chatting with your agent, for example, "Write me a poem about flowers."

Add files to the agent

Now let's add a file search tool that enables us to do knowledge retrieval.

  1. In your agent's Setup pane, scroll down if necessary to find Knowledge.
  2. Select Add.
  3. Select Files to upload the product_info_1.md file.
  4. Select Select local files under Add files.
  5. Select Upload and save.
  6. Change your agents instructions, such as, "You are a helpful assistant and can search information from uploaded files."
  7. Ask a question, such as, "Hello, what Contoso products do you know?"
  8. To add more files, select the ... on the AgentVectorStore, then select Manage.

Clean up resources

If you no longer need any of the resources you created, delete the resource group associated with your project.

In the Azure AI Foundry portal, select your project name in the top right corner. Then select the link for the resource group to open it in the Azure portal. Select the resource group, and then select Delete. Confirm that you want to delete the resource group.