|
| 1 | +--- |
| 2 | +title: "Prepare project and model" |
| 3 | +description: "Export the Tailspin catalog, create a Foundry project and model deployment, and validate them in Canvas." |
| 4 | +authors: |
| 5 | + - juliamuiruri4 |
| 6 | +lastUpdated: 2026-09-16 |
| 7 | +prev: |
| 8 | + link: /copilot-workshops/app/8-foundry-canvas/ |
| 9 | + label: "Optional: Incorporate Foundry" |
| 10 | +next: |
| 11 | + link: /copilot-workshops/app/8-foundry-canvas/2-build-and-deploy/ |
| 12 | + label: Build and deploy the agent |
| 13 | +--- |
| 14 | + |
| 15 | +This first module establishes the data and Azure resources for the Backer Concierge. No agent code or hosted deployment is needed yet. |
| 16 | + |
| 17 | +By the end, you will have: |
| 18 | + |
| 19 | +- A catalog export with explicit grounding limits. |
| 20 | +- A Foundry project and a model deployment chosen for the feature requirements. |
| 21 | +- A Canvas-validated deployment and a simple catalog-bounded model smoke check. |
| 22 | + |
| 23 | +## Scenario |
| 24 | + |
| 25 | +Tailspin Toys backers can filter games by category and publisher, but questions such as *Which games would suit someone who loves Git puns?* don't have dropdown answers. A Backer Concierge should recommend only games in the Tailspin catalog and never invent games, publishers, ratings, funding totals, backer counts, prices, player counts, play times, or release dates. A reliable catalog and a suitable model are the foundation for those answers. |
| 26 | + |
| 27 | +## Prepare your tools and issue session |
| 28 | + |
| 29 | +The setup connects the GitHub Copilot app to Azure while keeping all feature work together. |
| 30 | + |
| 31 | +> [!IMPORTANT] |
| 32 | +> Microsoft Foundry Canvas and hosted agents are in public preview. This module creates billable Azure resources. Subscription, region, quota, and estimated cost need checking before resource creation. |
| 33 | +
|
| 34 | +1. Confirm you have an Azure subscription, such as a [free Azure subscription with $200 credit][azure-free] or [Azure for Students with $100 credits][azure-students], and permission to create the workshop resources. |
| 35 | +2. Install the [Azure CLI][install-azure-cli] for your OS, then verify the installation using `az version`. Azure Developer CLI setup is deferred until the hosted-agent module. |
| 36 | +3. Open the GitHub Copilot app, open **Customize**, then select **Plugins**. Search for `microsoft-foundry` and select **Install** for the Microsoft Foundry plugin, which bundles Canvas and the Foundry skills. |
| 37 | + |
| 38 | +  |
| 39 | + |
| 40 | +4. In **Customize**, select **Plugins**, search for `azure` or select it from the **Featured** list, then select **Install** for the Azure plugin. |
| 41 | +5. On the **My work** tab, find and open the issue titled **Add a Backer Concierge assistant for catalog questions** in your Tailspin Toys repository. Select **New session** to start an issue-linked session in a new worktree. Keep this repository, worktree branch, and issue session for all three modules. |
| 42 | +6. Type `/microsoft-foundry`, then `/azure` to confirm both skills are installed and available; don't send any prompts yet. If a plugin does not appear immediately, restart the app, return to this same issue session, and check again. |
| 43 | + |
| 44 | +## Generate the catalog export |
| 45 | + |
| 46 | +The sample repository includes an export script that gives the agent a file it can read. |
| 47 | + |
| 48 | +7. In this issue-linked worktree session, replace the default `/fix-issue` prompt in the prompt box with: |
| 49 | + |
| 50 | + ```plaintext |
| 51 | + Install the project dependencies, seed the database, then run the existing db:export script. Show me the command output and summarize the shape and grounding limits of db/catalog.json. |
| 52 | + ``` |
| 53 | + |
| 54 | +8. Review the command output. Copilot should run the equivalent of: |
| 55 | + |
| 56 | + ```bash |
| 57 | + npm install |
| 58 | + npm run db:setup |
| 59 | + npm run db:export |
| 60 | + ``` |
| 61 | + |
| 62 | +  |
| 63 | + |
| 64 | +9. Open `db/catalog.json` and confirm it contains 21 games with a title, description, category, publisher, and star rating. Check its `note` field: the catalog doesn't contain funding totals, backer counts, pledge tiers, or release dates. Treat missing prices, player counts, and play times as unavailable too, rather than filling gaps from outside knowledge. If the export fails or differs, ask Copilot to investigate and rerun it before continuing. |
| 65 | + |
| 66 | +  |
| 67 | + |
| 68 | +## Set up a Foundry project and model |
| 69 | + |
| 70 | +Creating the project and deployment in chat first means Canvas connects only to resources that already exist. |
| 71 | + |
| 72 | +10. Select **+**, select **Terminal**, and sign in to Azure: |
| 73 | + |
| 74 | + ```bash |
| 75 | + az login |
| 76 | + ``` |
| 77 | + |
| 78 | +11. Confirm the selected subscription, region, quota, and estimated cost before approving resource creation. Check in the Azure portal that `rg-tailspin-toys` is available for a dedicated workshop group. If that name belongs to unrelated or shared resources, stop and resolve a dedicated naming choice before using the following prompt; consistently use your approved names throughout the journey. |
| 79 | +12. In the same issue session, enter: |
| 80 | + |
| 81 | + ```plaintext |
| 82 | + Use the Microsoft Foundry skill to create a resource group named rg-tailspin-toys and a Foundry project named tailspin-toys. |
| 83 | + ``` |
| 84 | + |
| 85 | +  |
| 86 | + |
| 87 | +13. Ask Copilot to recommend a model. The issue's acceptance criteria are already in context because the session started from the issue: |
| 88 | +
|
| 89 | + ```plaintext |
| 90 | + Use the Microsoft Foundry skill to recommend two or three current chat models in the tailspin-toys project that meet this issue's acceptance criteria. Explain the tradeoffs and wait for me to choose. |
| 91 | + ``` |
| 92 | + |
| 93 | +14. Confirm Copilot loads the `microsoft-foundry` skill, then choose an available model based on its tradeoffs. The Microsoft Foundry hosted-agent quickstart currently uses `gpt-5.4-mini`, but availability and quota vary by region. |
| 94 | + |
| 95 | +  |
| 96 | + |
| 97 | +15. Ask Copilot to deploy your selection, reviewing the target project and cost before approval: |
| 98 | + |
| 99 | + ```plaintext |
| 100 | + Deploy the model I selected to the tailspin-toys Foundry project, using the model name as the deployment name. |
| 101 | + ``` |
| 102 | + |
| 103 | +> [!TIP] |
| 104 | +> Model availability changes over time. The model Copilot confirms is available in your project is the appropriate choice, rather than a hardcoded model from this module. |
| 105 | + |
| 106 | +## Validate and smoke-test the model in Canvas |
| 107 | + |
| 108 | +This check verifies the project and model before any agent code exists. A model smoke check is not a substitute for the hosted agent's grounding tests in module 2. |
| 109 | + |
| 110 | +16. Select **+**, then **Canvas**, then **Microsoft Foundry (Preview)**. |
| 111 | +17. Open the **More options** menu in the top-right corner of Canvas, then select **Sign in**. |
| 112 | +18. Select the **tailspin-toys** Foundry project. Expand **Models** and confirm your deployment appears with the expected name and status. |
| 113 | + |
| 114 | +  |
| 115 | + |
| 116 | +19. In the same GitHub Copilot app issue session, ask Copilot to run a small authenticated request to the model deployment you confirmed in Canvas, using your existing local Azure sign-in. Have it supply two actual entries from `db/catalog.json` plus the catalog's `note`, request one recommendation using only that excerpt, and ask whether the excerpt supplies prices. Check that the recommendation uses the supplied entries and the response acknowledges that prices are unavailable. Keep credentials local or server-side, never in browser code or chat output; no agent scaffold is needed. |
| 117 | +20. Compare the answer's title, publisher, and rating with the supplied entries. If the deployment cannot be tested, check the project, deployment status, access, and quota in Canvas and send the error to Copilot. If it invents details, make the excerpt-only instruction explicit and retry. Record the result without treating it as proof of full agent acceptance. |
| 118 | + |
| 119 | +> [!NOTE] |
| 120 | +> Canvas remembers the selected project when reopened. Its stages are **Create new hosted agents** for scaffolding, **Build current hosted agent** for connecting models, toolboxes, skills, and guardrails, and **Deploy and test** for local runs and deployment to Foundry Agent Service. |
| 121 | + |
| 122 | +## Checkpoint and next steps |
| 123 | + |
| 124 | +The handoff is a catalog export plus a tested model deployment, not a scaffolded agent. |
| 125 | + |
| 126 | +21. Record the Tailspin Toys repository, current worktree branch, issue-linked session, subscription ID, dedicated resource group, Foundry project, model deployment name, catalog export result, and smoke-check evidence in this session. Confirm the selected project before every later cost-bearing change. |
| 127 | +22. Continue to [Build and deploy the agent][next-module] in this same repository, worktree branch, issue session, Foundry project, and model deployment—do not create another project. If stopping here, follow [Clean up your resources][cleanup]; this stopping point needs neither `azure.yaml` nor `azd`. |
| 128 | + |
| 129 | +[azure-free]: https://azure.microsoft.com/pricing/purchase-options/azure-account |
| 130 | +[azure-students]: https://azure.microsoft.com/free/students |
| 131 | +[install-azure-cli]: https://learn.microsoft.com/cli/azure/install-azure-cli |
| 132 | +[next-module]: ../2-build-and-deploy/ |
| 133 | +[cleanup]: ../#clean-up-your-resources |
0 commit comments