Azure AI Foundry in 2025: Building Your First AI Agent in 30 Minutes – Part 1

Azure AI Foundry in 2025: Building Your First AI Agent in 30 Minutes – Part 1

The AI revolution is here, and building intelligent agents is no longer reserved for tech giants with massive engineering teams. In 2025, Azure AI Foundry has democratized AI agent development, making it accessible to developers, startups, and enterprises alike. Whether you’re building a customer support chatbot, an automated workflow assistant, or a specialized knowledge retrieval system, Azure AI Foundry provides the tools, models, and infrastructure you need—all in one platform.

This is Part 1 of our comprehensive 4-part series where we’ll guide you through building your first AI agent from scratch. By the end of this series, you’ll have a fully functional AI agent deployed and ready to handle real-world tasks. Let’s dive in!

What is Azure AI Foundry?

Azure AI Foundry is Microsoft’s unified platform for designing, customizing, and managing AI applications and agents at scale. Think of it as an assembly line for intelligent agents—bringing together specialized components like models, tools, policies, and orchestration to build production-ready AI solutions.

The platform provides access to a comprehensive catalog of over 11,000 models, including flagship offerings from OpenAI (GPT-4o, GPT-4), Microsoft, DeepSeek, xAI (Grok), Mistral, Meta (Llama), Cohere, NVIDIA, and many more. These models span text, image, and audio tasks, supporting use cases from retrieval and summarization to classification, generation, reasoning, and multimodal interactions.

Why Azure AI Foundry Matters in 2025

The AI landscape has evolved dramatically. According to recent industry data, 95% of Fortune 500 companies now use Azure, and the platform captured nearly 25% of the global cloud market while growing revenue by 33% in Q1 2025. Azure AI Foundry stands at the forefront of this transformation with several game-changing advantages:

  • Multi-Model Access: Switch between models from different providers without changing a single line of code, using a unified API and endpoint
  • Enterprise-Grade Security: Built-in identity management via Microsoft Entra, role-based access control (RBAC), content filters, encryption, and network isolation
  • Production-Ready Infrastructure: Fully managed service with high availability, disaster recovery, and compliance certifications
  • Developer-Friendly: Access through portal, SDK, API, and integration with familiar tools like GitHub, Visual Studio, and VS Code
  • Cost Optimization: Model Router automatically selects optimal models for different prompts, boosting quality while reducing costs

Understanding AI Agents: The Building Blocks

Before we start building, let’s understand what an AI agent actually is. An AI agent is a “smart” microservice that combines AI models with tools to access and interact with your data. Unlike a simple chatbot that responds to queries, an agent can:

  • Answer questions using training data or search external sources using Retrieval Augmented Generation (RAG)
  • Execute actions through integrated tools (file search, code interpreter, API calls)
  • Maintain conversation context across multiple interactions (stateful conversations)
  • Orchestrate complex workflows with multiple specialized agents
  • Learn from interactions and improve over time

The Agent Factory Assembly Line

Azure AI Foundry works like a modern factory assembly line for intelligent agents. Here’s how each station contributes to the final product:

flowchart TD
    A[Select Model] --> B[Customize & Train]
    B --> C[Equip with Tools]
    C --> D[Add Orchestration]
    D --> E[Test & Monitor]
    E --> F[Deploy to Production]
    
    A --> A1[GPT-4o, Llama, Mistral, Grok]
    B --> B1[Fine-tuning, Distillation, Prompts]
    C --> C1[Bing, SharePoint, Azure AI Search, Functions]
    D --> D1[Multi-Agent Coordination, State Management]
    E --> E1[Traces, Logs, Evaluations]
    F --> F1[Enterprise Security & Compliance]
    
    style A fill:#0078d4,color:#fff
    style B fill:#0078d4,color:#fff
    style C fill:#0078d4,color:#fff
    style D fill:#0078d4,color:#fff
    style E fill:#0078d4,color:#fff
    style F fill:#50e6ff,color:#000

Station 1: Model Selection – Choose from flagship models like GPT-4o, GPT-4, Llama, Mistral, or Grok. This reasoning core powers your agent’s decision-making capabilities.

Station 2: Customization – Shape the model to fit your use case through fine-tuning, distillation, or domain-specific prompts. Encode agent behavior and role-specific knowledge.

Station 3: Tool Integration – Equip your agent with tools to access enterprise knowledge (Bing, SharePoint, Azure AI Search) and take actions (Logic Apps, Azure Functions, OpenAPI).

Station 4: Orchestration – Coordinate the full lifecycle including tool calls, thread state management, retries, and logging. Enable multi-agent workflows for complex scenarios.

Station 5: Testing & Monitoring – Capture logs, traces, and evaluations at every step with Application Insights integration for continuous improvement.

Station 6: Production Deployment – Launch with enterprise-grade trust features including identity management, content filters, and network isolation.

What We’re Building: A Customer Support Agent

Throughout this series, we’ll build a practical customer support agent that can:

  • Answer customer inquiries using a knowledge base
  • Search through documentation and past tickets
  • Generate helpful responses with proper citations
  • Escalate complex issues when necessary
  • Maintain conversation context for personalized interactions

This real-world example mirrors what companies like JM Family, Fujitsu, and YoungWilliams are already doing with Azure AI Foundry Agent Service—automating complex business processes at scale.

Prerequisites: What You’ll Need

Before we begin, let’s make sure you have everything ready. Don’t worry—the setup is straightforward, and Azure offers generous free tiers for experimentation.

Azure Account Requirements

  • Azure Account: An active Azure subscription (create a free account with $200 credit for 30 days if you’re new)
  • Subscription Role: You must be the Owner of the subscription to receive appropriate access control, OR have the Contributor or Cognitive Services Contributor role at the subscription level
  • Project-Level Access: Once the project is created, you’ll need the Azure AI User role at the project level to create agents

Development Environment

  • Web Browser: Modern browser (Chrome, Edge, Firefox, Safari) for accessing Azure AI Foundry portal
  • Code Editor (Optional for Part 1): Visual Studio Code with Azure AI Foundry extension (we’ll use this in Parts 2 and 3)
  • Programming Knowledge: Basic familiarity with Python, C#, TypeScript, or Java (we’ll provide examples in multiple languages)

Cost Considerations

Azure AI Foundry operates on a pay-as-you-go model. Here’s what to expect:

  • Azure AI Foundry: Free tier available for getting started
  • Model Usage: Pricing based on token count (gpt-4o-mini is cost-effective for development)
  • Storage: Minimal costs for storing conversation history and files
  • Cosmos DB: Required for agent state management (free tier available)

Pro Tip: Start with gpt-4o-mini for development—it’s significantly cheaper than GPT-4o while still providing excellent performance for most tasks. You can always upgrade to more powerful models later.

Creating Your Azure AI Foundry Project

Now comes the exciting part—setting up your first Azure AI Foundry project. This is where your AI agent will live and evolve.

Step 1: Access Azure AI Foundry Portal

  1. Navigate to ai.azure.com in your web browser
  2. Sign in with your Azure account credentials
  3. If this is your first time, you’ll see a welcome screen—click “Got it” to proceed

Step 2: Create a New Project (Quick Method)

Azure AI Foundry offers a streamlined creation flow specifically for agents. This is the fastest way to get started:

  1. On the home page, click “Create an agent”
  2. Enter a name for your project (e.g., “customer-support-agent-2025”)
  3. If you want to customize settings, select “Advanced options”:
    • Choose an existing Resource Group or create a new one (recommended for beginners)
    • Select a Location (choose a region close to you or your users)
    • Review the default settings for compute and storage
  4. Click “Create”
  5. Wait for resources to be provisioned (typically 2-3 minutes)

What’s Happening Behind the Scenes? Azure is creating several resources for you:

  • An Azure AI Foundry resource (the hub for your project)
  • A project workspace (child resource where your agent lives)
  • Storage account (for files and data)
  • Cosmos DB account (for agent state management)

Step 3: Understanding Your Project Dashboard

Once provisioning completes, you’ll land in the Agent Playground. Take a moment to familiarize yourself with the interface:

  • Left Navigation Panel:
    • Overview: Project summary and quick links
    • Models + Endpoints: Available models and deployment status
    • Agents: Your created agents
    • Threads: Conversation histories
    • Tools: Available tools (Code Interpreter, File Search, Functions)
  • Center Panel: Agent configuration and playground interface
  • Right Panel: Agent settings, tools, and properties

Step 4: Locating Your Project Endpoint

You’ll need this endpoint URL for API access in later parts. Here’s how to find it:

  1. Navigate to Overview in the left sidebar
  2. Scroll to “Libraries” section
  3. Under “Azure AI Foundry”, you’ll see your project endpoint
  4. Click the copy icon to save it

The endpoint format looks like: https://<AIFoundryResourceName>.services.ai.azure.com/api/projects/<ProjectName>

Save this endpoint! You’ll use it when we move to code-based development in Part 2.

Deploying Your First Model

With your project created, it’s time to deploy a model—the brain of your AI agent.

Step 1: Access Model Catalog

  1. From your project dashboard, navigate to “Models + Endpoints” in the left sidebar
  2. Click “Model catalog” to browse available models
  3. You’ll see thousands of models organized by provider and capability

Step 2: Choose Your Model

For this tutorial, we recommend starting with gpt-4o-mini. Here’s why:

  • Cost-Effective: Significantly cheaper than GPT-4o (about 60% less)
  • Fast Response Times: Lower latency for better user experience
  • Capable: Handles most customer support scenarios excellently
  • 128K Context Window: Can process large amounts of information

To select it:

  1. In the Model catalog, search for “gpt-4o-mini”
  2. Click on the model card
  3. Review the model details, pricing, and capabilities
  4. Click “Use this model”

Step 3: Deploy the Model

  1. You’ll be prompted to create a deployment. Enter:
    • Deployment name: “gpt-4o-mini” (or choose your own)
    • Model version: Latest (pre-selected)
    • Deployment type: Standard (recommended for starting)
  2. Review the deployment configuration
  3. Click “Create”
  4. Wait for deployment to complete (1-2 minutes)

Important: Save your deployment name—you’ll need it when configuring your agent and making API calls.

Step 4: Test Your Model in Chat Playground

Let’s verify your model is working correctly:

  1. After deployment completes, click “Open in playground”
  2. You’ll land in the Chat Playground with your model pre-selected
  3. Try a simple test prompt: “Hello! Can you help me understand what you can do?”
  4. Observe the response—it should be coherent and relevant

Congratulations! You’ve successfully deployed your first AI model in Azure AI Foundry.

Exploring the Azure AI Foundry Interface

Before we wrap up Part 1, let’s take a quick tour of the key features you’ll be using throughout this series.

Agent Playground

The Agent Playground is where you’ll design and test your agents visually. Key features include:

  • System Instructions: Define your agent’s personality and behavior
  • Tool Configuration: Add capabilities like file search and code interpreter
  • Test Interface: Chat with your agent in real-time
  • Thread Management: View and manage conversation histories

Model Catalog

Access to over 11,000 models from multiple providers. Browse by:

  • Provider: OpenAI, Microsoft, Meta, Mistral, Cohere, etc.
  • Capability: Text generation, image creation, audio processing, embeddings
  • License: Commercial, open source, research
  • Performance: Token limits, latency, cost

Monitoring and Evaluation

Built-in tools for tracking agent performance:

  • Traces: Step-by-step execution logs
  • Metrics: Token usage, latency, error rates
  • Evaluations: Automated quality assessments
  • Application Insights: Integration with Azure monitoring

Key Concepts Recap

Let’s consolidate what we’ve learned in Part 1:

  • Azure AI Foundry is a comprehensive platform for building production-ready AI agents
  • AI Agents combine models with tools to create intelligent, autonomous assistants
  • Projects organize your work and provide access control, data integration, and monitoring
  • Models are the reasoning engines that power your agents (we deployed gpt-4o-mini)
  • The Agent Factory follows a systematic process from model selection to production deployment

What’s Next in Part 2?

In Part 2, we’ll dive into the exciting hands-on work of actually building your agent. Here’s what we’ll cover:

  • Creating your first agent in the Agent Playground
  • Configuring system instructions for customer support scenarios
  • Adding and configuring the File Search tool
  • Uploading a knowledge base (documentation, FAQs, past tickets)
  • Implementing Retrieval Augmented Generation (RAG)
  • Testing agent responses with real queries
  • Connecting to Cosmos DB for state management
  • Implementing the Model Router for cost optimization
  • Writing production code in Python, C#, or Node.js

By the end of Part 2, you’ll have a working agent that can answer customer questions by searching through your knowledge base and generating informed responses with proper citations.

Additional Resources

Want to explore more before Part 2? Check out these resources:

  • Official Documentation: Microsoft Learn – Azure AI Foundry (https://learn.microsoft.com/en-us/azure/ai-foundry/)
  • Model Catalog: Explore all available models at ai.azure.com
  • GitHub Samples: Azure Samples – AI Agents (https://github.com/Azure-Samples/get-started-with-ai-agents)
  • Community: Join the Azure AI Foundry Discord for Q&A and discussions
  • Pricing Calculator: Estimate costs for your specific use case

Troubleshooting Common Setup Issues

Issue: “Permission denied” when creating project

Solution: Verify you have Owner, Contributor, or Cognitive Services Contributor role on your subscription. Contact your Azure administrator if needed.

Issue: “Model deployment failed”

Solution: Check quota availability for your selected region. Some models have limited availability in certain regions. Try a different region or model.

Issue: “Unable to find project endpoint”

Solution: Ensure you created a Foundry project (not a hub-based project). Check Overview > Libraries > Azure AI Foundry section.

Final Thoughts

You’ve taken the first crucial steps toward building your own AI agent! Setting up Azure AI Foundry and deploying your first model might seem simple, but you’ve laid the foundation for creating powerful, enterprise-grade AI solutions.

The real magic happens in Part 2, where we’ll transform that deployed model into an intelligent agent capable of understanding context, searching through documents, and providing helpful responses. We’ll add personality, tools, and knowledge—bringing your agent to life.

We’ll continue building on what you’ve learned here and create a fully functional customer support agent.

Have questions about Part 1? Drop them in the comments below. We’re building this together!


References

This article is Part 1 of a 4-part series on building AI agents with Azure AI Foundry in 2025.

Written by:

373 Posts

View All Posts
Follow Me :