|
| 1 | +## COBO Agent E2E Test |
| 2 | + |
| 3 | + |
| 4 | +1. Get the bicep |
| 5 | +```powershell |
| 6 | +azd init --template https://github.com/Azure-Samples/azd-ai-starter-basic |
| 7 | +``` |
| 8 | + |
| 9 | +2. Install the required azd version and extension |
| 10 | + |
| 11 | +Install azd daily build |
| 12 | +```powershell |
| 13 | +powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/install-azd.ps1' -OutFile 'install-azd.ps1'; ./install-azd.ps1 -Version 'daily'" |
| 14 | +``` |
| 15 | +Open a new powershell then |
| 16 | +``` |
| 17 | +azd version |
| 18 | +``` |
| 19 | +It should give you the expected commit number, most recently, you should see |
| 20 | +``` |
| 21 | +azd version 1.20.2 (commit 2063759a9d972b4b4b8d9a5052bc4b5fa664d7e7) |
| 22 | +``` |
| 23 | + |
| 24 | +Install extension |
| 25 | +```powershell |
| 26 | +azd extension install azure.foundry.ai.agents |
| 27 | +``` |
| 28 | +Then |
| 29 | +``` |
| 30 | +azd ext list |
| 31 | +``` |
| 32 | +You should see |
| 33 | +``` |
| 34 | +Id Name Version Installed Version Source |
| 35 | +azure.coding-agent Coding agent configuration extension 0.5.1 azd |
| 36 | +azure.foundry.ai.agents AI Foundry Agents 0.0.2 0.0.2 azd |
| 37 | +microsoft.azd.demo Demo Extension 0.3.0 azd |
| 38 | +microsoft.azd.extensions AZD Extensions Developer Kit 0.6.0 azd |
| 39 | +``` |
| 40 | + |
| 41 | +3. Init Agent sample |
| 42 | +``` |
| 43 | +azd ai agent init -m https://github.com/coreai-microsoft/foundry-golden-path/tree/main/idea-to-proto/01-build-agent-in-code/agent-catalog-code-samples/cobo-calculator-agent |
| 44 | +``` |
| 45 | + |
| 46 | +Your folder structure should look like this now: |
| 47 | +``` |
| 48 | +cobo-calculator-agent/ |
| 49 | +├── .azure/ |
| 50 | +├── infra/ |
| 51 | +├── agent.yaml |
| 52 | +├── azure.yaml |
| 53 | +├── Dockerfile |
| 54 | +├── langraph_agent_calculator.py |
| 55 | +└── requirements.txt |
| 56 | +``` |
| 57 | + |
| 58 | + |
| 59 | +4. Test |
| 60 | +``` |
| 61 | +azd up |
| 62 | +``` |
| 63 | +Use the following parameters if you don't have a test subscription: |
| 64 | +``` |
| 65 | +? Select an Azure Subscription to use: 87. azure-openai-agents-exp-nonprod-01 (921496dc-987f-410f-bd57-426eb2611356) |
| 66 | +? Enter a value for the 'aiDeploymentsLocation' infrastructure parameter: 24. (US) West US 2 (westus2) |
| 67 | +? Enter a value for the 'enableCoboAgent' infrastructure parameter: True |
| 68 | +``` |
| 69 | +Please contact migu@microsoft to get permission to the subscription |
| 70 | + |
| 71 | + |
| 72 | +When it finishes, you should see console output like: |
| 73 | +``` |
| 74 | +--- Testing Agent with Data Plane Call --- |
| 75 | +Data Plane POST URL: https://ai-account-kply6uaglbh5u.services.ai.azure.com/api/projects/migu-cobo-int-1602/openai/responses?api-version=2025-05-15-preview |
| 76 | +Data Plane Payload: { |
| 77 | + "stream": false, |
| 78 | + "agent": { |
| 79 | + "version": "2", |
| 80 | + "name": "Cobo Calculator Agent", |
| 81 | + "type": "agent_reference" |
| 82 | + }, |
| 83 | + "input": "Tell me a joke." |
| 84 | +} |
| 85 | +Data Plane POST completed. Response: |
| 86 | +{ |
| 87 | + "metadata": {}, |
| 88 | + "temperature": null, |
| 89 | + "top_p": null, |
| 90 | + "user": null, |
| 91 | + "model": "", |
| 92 | + "background": false, |
| 93 | + "tools": [], |
| 94 | + "id": "caresp_33443885792eaac0004iX4VWbkLbS4rTYxSKosWlyE6h1DZeFF", |
| 95 | + "object": "response", |
| 96 | + "status": "completed", |
| 97 | + "created_at": 1761349040, |
| 98 | + "error": null, |
| 99 | + "incomplete_details": null, |
| 100 | + "output": [ |
| 101 | + { |
| 102 | + "type": "message", |
| 103 | + "id": "msg_33443885792eaac0009lEaLBx6qSEMnII3pakiMz10q6ZnlBVI", |
| 104 | + "status": "completed", |
| 105 | + "role": "assistant", |
| 106 | + "content": [ |
| 107 | + { |
| 108 | + "type": "output_text", |
| 109 | + "text": "Why don't skeletons fight each other?\n\nBecause they don't have the guts!", |
| 110 | + "annotations": [] |
| 111 | + } |
| 112 | + ] |
| 113 | + } |
| 114 | + ], |
| 115 | + "instructions": null, |
| 116 | + "parallel_tool_calls": false, |
| 117 | + "conversation": null, |
| 118 | + "agent": { |
| 119 | + "type": "agent_id", |
| 120 | + "name": "Cobo Calculator Agent", |
| 121 | + "version": "2" |
| 122 | + } |
| 123 | +} |
| 124 | +
|
| 125 | +====================================== |
| 126 | +Azure Portal Links |
| 127 | +====================================== |
| 128 | +Container App: https://portal.azure.com/#@/resource/subscriptions/921496dc-987f-410f-bd57-426eb2611356/resourceGroups/rg-migu-cobo-int-1602/providers/Microsoft.App/containerApps/ca-migu-cobo-int-1602-kply6uaglb |
| 129 | +``` |
0 commit comments