Edit

Share via


Tutorial: Idea to prototype - Build and evaluate an enterprise agent

This tutorial covers the first stage of the Microsoft Foundry developer journey: from an initial idea to a working prototype. You build a modern workplace assistant that combines internal company knowledge with external technical guidance by using the Microsoft Foundry SDK.

Business scenario: Create an AI assistant that helps employees by combining:

  • Company policies (from SharePoint documents)
  • Technical implementation guidance (from Microsoft Learn via MCP)
  • Complete solutions (combining both sources for business implementation)
  • Batch evaluation to validate agent performance on realistic business scenarios

Tutorial outcome: By the end you have a running Modern Workplace Assistant that can answer policy, technical, and combined implementation questions; a repeatable batch evaluation script; and clear extension points (other tools, multi‑agent patterns, richer evaluation).

You will:

  • Build a Modern Workplace Assistant with SharePoint and MCP integration.
  • Demonstrate real business scenarios combining internal and external knowledge.
  • Implement robust error handling and graceful degradation.
  • Create evaluation framework for business-focused testing.
  • Prepare foundation for governance and production deployment.

This minimal sample demonstrates enterprise-ready patterns with realistic business scenarios.

Important

Code in this article uses packages that are currently in 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.

Prerequisites

  • Azure subscription and CLI authentication (az login)

  • Azure CLI 2.67.0 or later (check with az version)

  • A Foundry project with a deployed model (for example, gpt-4o-mini). If you don't have one: Create a project and then deploy a model (see model overview: Model catalog).

  • Python 3.10 or later

  • SharePoint connection configured in your project (SharePoint tool documentation)

    Note

    To configure your Foundry project for SharePoint connectivity, see the SharePoint tool documentation.

  • (Optional) Git installed for cloning the sample repository

Step 1: Get the sample code

Instead of navigating a large repository tree, use one of these approaches:

Option A (clone entire samples repo)

Tip

Code uses Foundry project (new) API (preview) and is incompatible with the Foundry project (classic) API.

git clone --depth 1 https://github.com/azure-ai-foundry/foundry-samples.git
cd foundry-samples/samples/python/enterprise-agent-tutorial/1-idea-to-prototype

Option B (sparse checkout only this tutorial - reduced download)

git clone --no-checkout https://github.com/azure-ai-foundry/foundry-samples.git
cd foundry-samples
git sparse-checkout init --cone
git sparse-checkout set samples/python/enterprise-agent-tutorial/1-idea-to-prototype
git checkout
cd samples/python/enterprise-agent-tutorial/1-idea-to-prototype

Repeat the path for csharp or java variants as needed.

Option C (Download ZIP of repository)

Download the repository ZIP, extract it to your local environment, and go to the tutorial folder.

Important

For production adoption, use a standalone repository. This tutorial uses the shared samples repo. Sparse checkout minimizes local noise.

The minimal structure contains only essential files:

enterprise-agent-tutorial/
└── 1-idea-to-prototype/
    ├── main.py                          # Modern Workplace Assistant
    ├── evaluate.py                      # Business evaluation framework
    ├── questions.jsonl                  # Business test scenarios (4 questions)
    ├── requirements.txt                 # Python dependencies
    ├── .env.template                    # Environment variables template
    ├── README.md                        # Complete setup instructions
    ├── MCP_SERVERS.md                   # MCP server configuration guide
    ├── sharepoint-sample-data           # Sample business documents for SharePoint
        └── collaboration-standards.docx # Sample content for policies
        └── remote-work-policy.docx      # Sample content for policies
        └── security-guidelines.docx     # Sample content for policies
        └── data-governance-policy.docx  # Sample content for policies

Step 2: Run the sample immediately

Start by running the agent so you see working functionality before diving into implementation details.

Environment setup and virtual environment

  1. Install the required language runtimes, global tools, and VS Code extensions as described in Prepare your development environment.

  2. Install dependencies from requirements.txt:

    pip install -r requirements.txt
    
  3. Copy your endpoint from the welcome screen. You'll use it in the next step.

    Screenshot of Microsoft Foundry Models welcome screen showing the endpoint URL and copy button.

  4. Configure .env.

    Copy .env.template to .env and configure:

    # Foundry Configuration  
    PROJECT_ENDPOINT=https://<your-project>.aiservices.azure.com
    MODEL_DEPLOYMENT_NAME=gpt-4o-mini
    AI_FOUNDRY_TENANT_ID=<your-tenant-id>
    
    # The Microsoft Learn MCP Server (public authoritative Microsoft docs index)
    MCP_SERVER_URL=https://learn.microsoft.com/api/mcp
    
    # SharePoint Integration (Optional - requires connection setup)
    SHAREPOINT_RESOURCE_NAME=your-sharepoint-connection
    SHAREPOINT_SITE_URL=https://<your-company>.sharepoint.com/teams/your-site
    

    Tip

    To get your tenant ID, run:

    # Get tenant ID
    az account show --query tenantId -o tsv
    

    To get your project endpoint, open your project in the Foundry portal and copy the value shown there.

Run agent and evaluation

python main.py
python evaluate.py

Expected output (agent first run)

Successful run with SharePoint:

🤖 Creating Modern Workplace Assistant...
✅ SharePoint connected: YourConnection
✅ Agent created: asst_abc123

Graceful degradation without SharePoint:

⚠️  SharePoint connection not found: Connection 'YourConnection' not found
✅ Agent created: asst_abc123

Now that you have a working agent, the next sections explain how it works. You don't need to take any action while reading these sections—they're for explanation.

Step 3: Set up sample SharePoint business documents

  1. Go to your SharePoint site (configured in the connection).
  2. Create document library "Company Policies" (or use existing "Documents").
  3. Upload the four sample Word documents provided in the sharepoint-sample-data folder:
    • remote-work-policy.docx
    • security-guidelines.docx
    • collaboration-standards.docx
    • data-governance-policy.docx

Sample structure

📁 Company Policies/
├── remote-work-policy.docx      # VPN, MFA, device requirements
├── security-guidelines.docx     # Azure security standards
├── collaboration-standards.docx # Teams, SharePoint usage
└── data-governance-policy.docx  # Data classification, retention

Step 4: Understand the assistant implementation

This section explains the core code in main.py. You already ran the agent; this section is conceptual and requires no changes. After reading it, you can:

  • Add new internal and external data tools.
  • Extend dynamic instructions.
  • Introduce multi-agent orchestration.
  • Enhance observability and diagnostics.

The code breaks down into the following main sections, ordered as they appear in the full sample code:

  1. Configure imports and authentication
  2. Configure authentication to Azure
  3. Configure the SharePoint tool
  4. Configure MCP tool
  5. Create the agent and connect the tools
  6. Converse with the agent

Important

Code in this article uses packages that are currently in 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.

Imports and authentication setup

The code uses several client libraries from the Microsoft Foundry SDK to create a robust enterprise agent.

import os
import time
from azure.ai.agents import AgentsClient
from azure.ai.agents.models import (
    SharepointTool,
    SharepointGroundingToolParameters,
    McpTool,
    RunHandler,
    ToolApproval
)
from azure.identity import DefaultAzureCredential
from dotenv import load_dotenv

# Import for connection resolution
try:
    from azure.ai.projects import AIProjectClient
    from azure.ai.projects.models import ConnectionType
    HAS_PROJECT_CLIENT = True
except ImportError:
    HAS_PROJECT_CLIENT = False

Configure authentication in Azure

Before you create your agent, set up authentication to the Foundry.

# Support default Azure credentials
credential = DefaultAzureCredential()

agents_client = AgentsClient(
    endpoint=os.environ["PROJECT_ENDPOINT"],
    credential=credential,
)
print(f"✅ Connected to Azure AI Foundry: {os.environ['PROJECT_ENDPOINT']}")

Create the SharePoint tool for the agent

The agent uses SharePoint and can access company policy and procedure documents stored there. Set up the connection to SharePoint in your code.

# Create SharePoint tool with the full ARM resource ID
sharepoint_tool = SharepointTool(connection_id=connection_id)
print(f"✅ SharePoint tool configured successfully")

Create the MCP tool for the agent

# MCP (Model Context Protocol) enables agents to access external data sources
# like Microsoft Learn documentation. The approval flow is handled automatically
# in the chat_with_assistant function.
from azure.ai.agents.models import McpTool

mcp_server_url = os.environ.get("MCP_SERVER_URL")
mcp_tool = None

if mcp_server_url:
    print(f"📚 Configuring Microsoft Learn MCP integration...")
    print(f"   Server URL: {mcp_server_url}")
    
    try:
        # Create MCP tool for Microsoft Learn documentation access
        # server_label must match pattern: ^[a-zA-Z0-9_]+$ (alphanumeric and underscores only)
        mcp_tool = McpTool(
            server_url=mcp_server_url,
            server_label="Microsoft_Learn_Documentation"
        )
        print(f"✅ MCP tool configured successfully")
    except Exception as e:
        print(f"⚠️  MCP tool unavailable: {e}")
        print(f"   Agent will operate without Microsoft Learn access")
        mcp_tool = None
else:
    print(f"📚 MCP integration skipped (MCP_SERVER_URL not set)")

Create the agent and connect the tools

Now, create the agent and connect the SharePoint and MCP tools.

# Create the agent using Agent SDK v2 with available tools
print(f"🛠️  Creating agent with model: {os.environ['MODEL_DEPLOYMENT_NAME']}")

# Build tools list with proper serialization
tools = []

# Add SharePoint tool using .definitions property
if sharepoint_tool:
    tools.extend(sharepoint_tool.definitions)
    print(f"   ✓ SharePoint tool added")

# Add MCP tool using .definitions property
if mcp_tool:
    tools.extend(mcp_tool.definitions)
    print(f"   ✓ MCP tool added")

print(f"   Total tools: {len(tools)}")

# Create agent with or without tools
if tools:
    agent = agents_client.create_agent(
        model=os.environ["MODEL_DEPLOYMENT_NAME"],
        name="Modern Workplace Assistant",
        instructions=instructions,
        tools=tools
    )
else:
    agent = agents_client.create_agent(
        model=os.environ["MODEL_DEPLOYMENT_NAME"],
        name="Modern Workplace Assistant",
        instructions=instructions,
    )

print(f"✅ Agent created successfully: {agent.id}")
return agent

Converse with the agent

Finally, implement an interactive loop to converse with the agent.

# Get response from the agent
print("🤖 ASSISTANT RESPONSE:")
response, status = chat_with_assistant(agent.id, scenario['question'])

Expected output from agent sample code (main.py)

When you run the agent, you see output similar to the following example. The output shows successful tool configuration and agent responses to business scenarios:

$ python main.py
✅ Connected to Foundry
🚀 Foundry - Modern Workplace Assistant
Tutorial 1: Building Enterprise Agents with Agent SDK v2
======================================================================
🤖 Creating Modern Workplace Assistant...
📁 Configuring SharePoint integration...
   Connection name: ContosoCorpPoliciesProcedures
   🔍 Resolving connection name to ARM resource ID...
   ✅ Resolved
✅ SharePoint tool configured successfully
📚 Configuring Microsoft Learn MCP integration...
   Server URL: https://learn.microsoft.com/api/mcp
✅ MCP tool configured successfully
🛠️  Creating agent with model: gpt-4o-mini
   ✓ SharePoint tool added
   ✓ MCP tool added
   Total tools: 2
✅ Agent created successfully

======================================================================
🏢 MODERN WORKPLACE ASSISTANT - BUSINESS SCENARIO DEMONSTRATION
======================================================================
This demonstration shows how AI agents solve real business problems
using the Azure AI Agents SDK v2.
======================================================================

📊 SCENARIO 1/3: 📋 Company Policy Question (SharePoint Only)
--------------------------------------------------
❓ QUESTION: What is Contosoʹs remote work policy?
🎯 BUSINESS CONTEXT: Employee needs to understand company-specific remote work requirements
🎓 LEARNING POINT: SharePoint tool retrieves internal company policies
--------------------------------------------------
🤖 ASSISTANT RESPONSE:
✅ SUCCESS: Contosoʹs remote work policy, effective January 2024, outlines the following key points:

### Overview
Contoso Corp supports flexible work arrangements, including remote work, to enhance employee productivity and work-life balance.

### Eligibility
- **Full-time Employees**: Must have completed a 90...
   📏 Full response: 1530 characters
📈 STATUS: completed
--------------------------------------------------

📊 SCENARIO 2/3: 📚 Technical Documentation Question (MCP Only)
--------------------------------------------------
❓ QUESTION: According to Microsoft Learn, what is the correct way to implement Azure AD Conditional Access policies? Please include reference links to the official documentation.
🎯 BUSINESS CONTEXT: IT administrator needs authoritative Microsoft technical guidance
🎓 LEARNING POINT: MCP tool accesses Microsoft Learn for official documentation with links
--------------------------------------------------
🤖 ASSISTANT RESPONSE:
✅ SUCCESS: To implement Azure AD Conditional Access policies correctly, follow these key steps outlined in the Microsoft Learn documentation:

### 1. Understanding Conditional Access
Conditional Access policies act as "if-then" statements that enforce organizational access controls based on various signals. Th...
   📏 Full response: 2459 characters
📈 STATUS: completed
--------------------------------------------------

📊 SCENARIO 3/3: 🔄 Combined Implementation Question (SharePoint + MCP)
--------------------------------------------------
❓ QUESTION: Based on our companyʹs remote work security policy, how should I configure my Azure environment to comply? Please include links to Microsoft documentation showing how to implement each requirement.
🎯 BUSINESS CONTEXT: Need to map company policy to technical implementation with official guidance
🎓 LEARNING POINT: Both tools work together: SharePoint for policy + MCP for implementation docs
--------------------------------------------------
🤖 ASSISTANT RESPONSE:
✅ SUCCESS: To configure your Azure environment in compliance with Contoso Corpʹs remote work security policy, you need to focus on several key areas, including enabling Multi-Factor Authentication (MFA), utilizing Azure Security Center, and implementing proper access management. Below are specific steps and li...
   📏 Full response: 3436 characters
📈 STATUS: completed
--------------------------------------------------

✅ DEMONSTRATION COMPLETED!
🎓 Key Learning Outcomes:
   • Agent SDK v2 usage for enterprise AI
   • Proper thread and message management
   • Real business value through AI assistance
   • Foundation for governance and monitoring (Tutorials 2-3)

🎯 Try interactive mode? (y/n): n

🎉 Sample completed successfully!
📚 This foundation supports Tutorial 2 (Governance) and Tutorial 3 (Production)
🔗 Next: Add evaluation metrics, monitoring, and production deployment

Step 5: Evaluate the assistant in a batch

The evaluation framework code tests realistic business scenarios that combine SharePoint policies with Microsoft Learn technical guidance. This approach demonstrates batch evaluation capabilities for validating agent performance across multiple test cases. The evaluation uses a keyword-based approach to assess whether the agent provides relevant responses that incorporate the expected information sources.

This evaluation framework tests:

  • SharePoint integration for company policy questions
  • MCP integration for technical guidance questions
  • Combined scenarios that require both internal and external knowledge
  • Response quality by using keyword matching and length analysis

The code breaks down into the following main sections:

  1. Load evaluation data.
  2. Run batch evaluation.
  3. Compile evaluation results.

Load evaluation data

In this section, the evaluation framework loads test questions from questions.jsonl. The file contains business scenarios that test different aspects of the agent:

{"question": "What is Contoso's remote work policy?", "expected_source": "sharepoint", "test_type": "sharepoint_only", "explanation": "Forces SharePoint tool usage - answer must contain Contoso-specific policy details", "validation": "check_for_contoso_specifics"}
{"question": "What are Contoso's security protocols for remote employees?", "expected_source": "sharepoint", "test_type": "sharepoint_only", "explanation": "Forces SharePoint tool usage - must retrieve specific security protocols from company policies", "validation": "check_for_contoso_specifics"}
{"question": "How does Contoso classify confidential business documents according to our data governance policy?", "expected_source": "sharepoint", "test_type": "sharepoint_only", "explanation": "Forces SharePoint tool usage - must retrieve data classification from governance policy", "validation": "check_for_contoso_specifics"}
{"question": "What collaboration tools are approved for internal use at Contoso?", "expected_source": "sharepoint", "test_type": "sharepoint_only", "explanation": "Forces SharePoint tool usage - must list specific tools from collaboration standards", "validation": "check_for_contoso_specifics"}
{"question": "According to Microsoft Learn documentation, what is the correct way to set up Azure Active Directory for remote workers? Include reference links.", "expected_source": "mcp", "test_type": "mcp_only", "explanation": "Forces MCP tool usage - must provide Microsoft Learn documentation with links", "validation": "check_for_microsoft_learn_links"}
{"question": "What does Microsoft Learn say about configuring Azure Security Center monitoring? Please provide the official documentation links.", "expected_source": "mcp", "test_type": "mcp_only", "explanation": "Forces MCP tool usage - must access Microsoft Learn for Security Center guidance with links", "validation": "check_for_microsoft_learn_links"}
{"question": "How do I implement data loss prevention in Microsoft 365 according to Microsoft's official documentation? Include links to the relevant Microsoft Learn articles.", "expected_source": "mcp", "test_type": "mcp_only", "explanation": "Forces MCP tool usage - must provide DLP implementation steps with documentation links", "validation": "check_for_microsoft_learn_links"}
{"question": "What are the steps to configure conditional access policies in Azure AD according to Microsoft Learn? Provide documentation links.", "expected_source": "mcp", "test_type": "mcp_only", "explanation": "Forces MCP tool usage - must provide conditional access guidance with Microsoft Learn links", "validation": "check_for_microsoft_learn_links"}
{"question": "Based on Contoso's remote work policy requirements, how should I implement Azure VPN Gateway? Include links to Microsoft documentation for each step.", "expected_source": "both", "test_type": "hybrid", "explanation": "Forces both tools - must combine Contoso policy requirements with Azure VPN implementation guidance and links", "validation": "check_for_both_sources"}
{"question": "What Azure services do I need to configure to meet Contoso's data governance requirements? Provide Microsoft Learn links for implementing each service.", "expected_source": "both", "test_type": "hybrid", "explanation": "Forces both tools - must map Contoso governance policy to specific Azure services with documentation links", "validation": "check_for_both_sources"}
{"question": "How do I configure Microsoft Teams to comply with Contoso's collaboration standards? Include Microsoft documentation links for the setup.", "expected_source": "both", "test_type": "hybrid", "explanation": "Forces both tools - must combine Contoso collaboration standards with Teams configuration guidance and links", "validation": "check_for_both_sources"}
{"question": "What Azure security services should I implement to align with Contoso's incident response procedures? Provide links to Microsoft Learn for each service.", "expected_source": "both", "test_type": "hybrid", "explanation": "Forces both tools - must connect Contoso security policy to Azure security services with documentation links", "validation": "check_for_both_sources"}
# NOTE: This code is a non-runnable snippet of the larger sample code from which it is taken.
def load_test_questions(filepath="questions.jsonl"):
    """Load test questions from JSONL file"""
    questions = []
    with open(filepath, 'r') as f:
        for line in f:
            questions.append(json.loads(line.strip()))
    return questions

Run batch evaluation

def run_evaluation(agent_id):
    """
    Run evaluation with test questions using Agent SDK v2.
    
    Args:
        agent_id: The ID of the agent to evaluate
        
    Returns:
        list: Evaluation results for each question
    """
    questions = load_test_questions()
    results = []
    
    print(f"🧪 Running evaluation with {len(questions)} test questions...")
    print("="*70)
    
    # Track results by test type
    stats = {
        "sharepoint_only": {"passed": 0, "total": 0},
        "mcp_only": {"passed": 0, "total": 0},
        "hybrid": {"passed": 0, "total": 0}
    }
    
    for i, q in enumerate(questions, 1):
        test_type = q.get("test_type", "unknown")
        expected_source = q.get("expected_source", "unknown")
        validation_type = q.get("validation", "default")
        
        print(f"\n📝 Question {i}/{len(questions)} [{test_type.upper()}]")
        print(f"   {q['question'][:80]}...")
        
        response, status = chat_with_assistant(agent_id, q["question"])
        
        # Validate response using source-specific checks
        passed, validation_details = validate_response(response, validation_type, expected_source)
        
        result = {
            "question": q["question"],
            "response": response,
            "status": status,
            "passed": passed,
            "validation_details": validation_details,
            "test_type": test_type,
            "expected_source": expected_source,
            "explanation": q.get("explanation", "")
        }
        results.append(result)
        
        # Update stats
        if test_type in stats:
            stats[test_type]["total"] += 1
            if passed:
                stats[test_type]["passed"] += 1
        
        status_icon = "✅" if passed else "⚠️"
        print(f"{status_icon} Status: {status} | Tool check: {validation_details}")
    
    print("\n" + "="*70)
    print("📊 EVALUATION SUMMARY BY TEST TYPE:")
    print("="*70)
    for test_type, data in stats.items():
        if data["total"] > 0:
            pass_rate = (data["passed"] / data["total"]) * 100
            icon = "✅" if pass_rate >= 75 else "⚠️" if pass_rate >= 50 else "❌"
            print(f"{icon} {test_type.upper()}: {data['passed']}/{data['total']} passed ({pass_rate:.1f}%)")
    
    return results

Compile evaluation results

def calculate_and_save_results(results):
    """Calculate pass rate and save results"""
    # Calculate pass rate
    passed = sum(1 for r in results if r.get("passed", False))
    total = len(results)
    pass_rate = (passed / total * 100) if total > 0 else 0
    
    print(f"\n📊 Overall Evaluation Results: {passed}/{total} questions passed ({pass_rate:.1f}%)")
    
    # Save results
    with open("evaluation_results.json", "w") as f:
        json.dump(results, f, indent=2)
    
    print(f"💾 Results saved to evaluation_results.json")
    
    # Print summary of failures
    failures = [r for r in results if not r.get("passed", False)]
    if failures:
        print(f"\n⚠️  Failed Questions ({len(failures)}):")
        for r in failures:
            print(f"   - [{r['test_type']}] {r['question'][:60]}...")
            print(f"     Reason: {r['validation_details']}")

Expected output from evaluation sample code (evaluate.py)

When you run the evaluation script, you see output similar to the following example. The output shows successful execution of business test scenarios and generation of evaluation metrics:

python evaluate.py
✅ Connected to Foundry
🧪 Modern Workplace Assistant - Evaluation (Agent SDK v2)
======================================================================
🤖 Creating Modern Workplace Assistant...
📁 Configuring SharePoint integration...
   Connection name: ContosoCorpPoliciesProcedures
   🔍 Resolving connection name to ARM resource ID...
   ✅ Resolved
✅ SharePoint tool configured successfully
📚 Configuring Microsoft Learn MCP integration...
   Server URL: https://learn.microsoft.com/api/mcp
✅ MCP tool configured successfully
🛠️  Creating agent with model: gpt-4o-mini
   ✓ SharePoint tool added
   ✓ MCP tool added
   Total tools: 2
✅ Agent created successfully
   Model: gpt-4o-mini
   Name: Modern Workplace Assistant
======================================================================
🧪 Running evaluation with 12 test questions...
======================================================================

📝 Question 1/12 [SHAREPOINT_ONLY]
   What is Contosoʹs remote work policy?...
✅ Status: completed | Tool check: Contoso-specific content: True

...

📝 Question 5/12 [MCP_ONLY]
   According to Microsoft Learn documentation, what is the correct way to set up Az...
✅ Status: completed | Tool check: Microsoft Learn links: True

...

📝 Question 12/12 [HYBRID]
   What Azure security services should I implement to align with Contosoʹs incident...
✅ Status: completed | Tool check: Contoso content: True, Learn links: True

======================================================================
📊 EVALUATION SUMMARY BY TEST TYPE:
======================================================================
✅ SHAREPOINT_ONLY: 4/4 passed (100.0%)
✅ MCP_ONLY: 4/4 passed (100.0%)
✅ HYBRID: 4/4 passed (100.0%)

📊 Overall Evaluation Results: 12/12 questions passed (100.0%)
💾 Results saved to evaluation_results.json

Additional evaluation assets

The evaluation generates evaluation_results.json with metrics for each question (keyword hits, length heuristic). You can extend this file to:

  • Use model-based scoring prompts.
  • Introduce structured output validation.
  • Record latency and token usage.

Here's a sample of the JSON output structure:

[
  {
    "question": "What is Contoso's remote work policy?",
    "response": "Contoso's remote work policy includes the following key components: <...>",
    "status": "completed",
    "passed": true,
    "validation_details": "Contoso-specific content: True",
    "test_type": "sharepoint_only",
    "expected_source": "sharepoint",
    "explanation": "Forces SharePoint tool usage - answer must contain Contoso-specific policy details"
  },
  {
    "question": "What are Contoso's security protocols for remote employees?",
    "response": ...

    ...

  }
]

Summary

You now have:

  • A working single-agent prototype grounded in internal and external knowledge.
  • A repeatable evaluation script demonstrating enterprise validation patterns.
  • Clear upgrade path: more tools, multi-agent orchestration, richer evaluation, deployment.

These patterns reduce prototype-to-production friction: you can add data sources, enforce governance, and integrate monitoring without rewriting core logic.

Next steps

This tutorial demonstrates Stage 1 of the developer journey - from idea to prototype. This minimal sample provides the foundation for enterprise AI development. To continue your journey, explore the next stages:

Suggested additional enhancements

Stage 2: Prototype to production

Stage 3: Production to adoption