Skip to content

azd ai agent packaging the binaries for source code deployment when using local build #8610

@karthiksaligrama

Description

@karthiksaligrama
 % azd ai agent init -p /subscriptions/921496dc-987f-410f-bd57-426eb2611356/resourceGroups/rg-ksaligrama-cc-template-11-v2/providers/Microsoft.CognitiveServices/accounts/aiservices4ctl/projects/project4ctl

███████╗ ██████╗ ██╗   ██╗███╗   ██╗██████╗ ██████╗ ██╗   ██╗
██╔════╝██╔═══██╗██║   ██║████╗  ██║██╔══██╗██╔══██╗╚██╗ ██╔╝
█████╗  ██║   ██║██║   ██║██╔██╗ ██║██║  ██║██████╔╝ ╚████╔╝
██╔══╝  ██║   ██║██║   ██║██║╚██╗██║██║  ██║██╔══██╗  ╚██╔╝
██║     ╚██████╔╝╚██████╔╝██║ ╚████║██████╔╝██║  ██║   ██║
╚═╝      ╚═════╝  ╚═════╝ ╚═╝  ╚═══╝╚═════╝ ╚═╝  ╚═╝   ╚═╝

v0.1.34-preview
Visit the docs at https://aka.ms/azd-ai-agent-docs

Retrieving agent templates...
? Select a language: Python
? Select a starter template: Basic agent (Responses, Agent Framework, Python)
Let's get your project initialized.

Initializing an app to run on Azure (azd init)

  (✓) Done: Initialized git repository
  (✓) Done: Downloading template code to: /home/ksaligrama/personal/template11-v3


Installing required extensions...
  (-) Skipped: Installing azure.ai.agents extension (version 0.1.34-preview already installed)

Downloading manifest from GitHub...
? Enter a name for your agent: agent-framework-agent-basic-responses
✓ Manifest validated successfully
Downloading files...
  .azdignore
  .dockerignore
  .env.example
  Dockerfile
  README.md
  agent.manifest.yaml
  agent.yaml
  main.py
  requirements.txt
Downloaded to: src/agent-framework-agent-basic-responses

? How would you like to deploy your agent?: Source Code (ZIP upload)
? Select the runtime for your agent: Python 3.14
? Enter the file path for the entry point of the agent: main.py
? How should dependencies be resolved?: Bundled (dependencies pre-installed locally and included in ZIP)

Application Insights (optional)

Enable telemetry to collect logs, traces, and diagnostics for this agent.

You can:
  • Use an existing Application Insights resource
  • Or create a new one during 'azd up'

Docs: https://aka.ms/azdaiagent/docs
? Enter your Application Insights resource ID, or leave blank to create a new one:
No existing deployment for model 'gpt-4.1-mini' specified in the selected agent manifest was found in your Foundry project.
? How would you like to proceed?: Use a different model already deployed in this project
Only one deployment available: gpt-4o-mini (gpt-4o-mini)
Using existing model deployment: gpt-4o-mini
Model deployment details processed and injected into agent definition. Deployment details can also be found in the JSON formatted AI_PROJECT_DEPLOYMENTS environment variable.
? Select resources (CPU and Memory) for your agent. You can adjust these settings later in the azure.yaml file if needed.: 0.5 cores, 1Gi memory
An agent named 'agent-framework-agent-basic-responses' already exists in this Foundry project. Deploying with this name will create a new version of the existing agent, not a separate agent.
? Continue with this existing agent name?: No
? Enter a different name for your agent: agent-framework-agent-basic-responses-3
Processed agent.yaml at src/agent-framework-agent-basic-responses/agent.yaml

Added your agent as a service entry named 'agent-framework-agent-basic-responses' under the file azure.yaml.

Next:  azd provision  -- set up your Foundry project, models, and connections
       azd deploy     -- when ready to deploy to Azure

AI agent definition added to your azd project successfully!
WARNING: A new version of extension 'Foundry agents (Preview)' is available: 0.1.34-preview -> 0.1.38-preview
  • To upgrade: azd extension upgrade azure.ai.agents
  • To upgrade all: azd extension upgrade --all

Update available: 1.25.2 -> 1.25.5 (Release notes)
To update, run `azd update`
ksaligrama@CPC-ksali-R2KVK ~/personal/template11-v3
 % azd provision

Provisioning Azure resources (azd provision)
Provisioning Azure resources can take some time.

Subscription: azure-openai-agents-exp-nonprod-01 (921496dc-987f-410f-bd57-426eb2611356)
Location: Canada Central

  You can view detailed progress in the Azure Portal:
  https://portal.azure.com/#view/HubsExtension/DeploymentDetailsBlade/~/overview/id/%2Fsubscriptions%2F921496dc-987f-410f-bd57-426eb2611356%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2Ftemplate11-v3-dev-1781205331

  (✓) Done: Resource group: rg-ksaligrama-cc-template-11-v2 (1.334s)
  (✓) Done: Azure AI Services Model Deployment: aiservices4ctl/gpt-4o-mini (2.279s)

SUCCESS: Your application was provisioned in Azure in 1 minute 4 seconds.
You can view the resources created under the resource group rg-ksaligrama-cc-template-11-v2 in Azure Portal:
https://portal.azure.com/#@/resource/subscriptions/921496dc-987f-410f-bd57-426eb2611356/resourceGroups/rg-ksaligrama-cc-template-11-v2/overview
Update available: 1.25.2 -> 1.25.5 (Release notes)
To update, run `azd update`
ksaligrama@CPC-ksali-R2KVK ~/personal/template11-v3
 % azd update

Updating azd to 1.25.5 (stable)

Updating azd via install script...
Downloading... 100%
Installing azd stable channel to /opt/microsoft/azd...
azd-linux-amd64
NOTICE.txt
install-azd: Writing to /opt/microsoft/azd/ requires elevated permission. You may be prompted to enter credentials.
[sudo] password for ksaligrama:
install-azd: Successfully installed to /opt/microsoft/azd
install-azd:
install-azd: The Azure Developer CLI collects usage data and sends that usage data to Microsoft in order to help us improve your experience.
install-azd: You can opt-out of telemetry by setting the AZURE_DEV_COLLECT_TELEMETRY environment variable to 'no' in the shell you use.
install-azd:
install-azd: Read more about Azure Developer CLI telemetry: https://github.com/Azure/azure-dev#data-collection

SUCCESS: Updated azd to version 1.25.5! Changes take effect on next invocation.
Run `azd --version` to confirm.
ksaligrama@CPC-ksali-R2KVK ~/personal/template11-v3
 % azd deploy

Let's get your development environment ready.

Discover and install Azure development tools such as Azure CLI, GitHub Copilot CLI, and Azure AI extensions.
To skip this check, set AZD_SKIP_FIRST_RUN=true or run azd config set tool.firstRunCompleted true.

? Would you like to check your Azure development tools?: Yes


  ✓ Azure CLI (2.83.0)
  ✓ GitHub Copilot CLI (1.0.61)
  ✓ Azure Tools VS Code Extension (0.12.6)
  ✓ Bicep VS Code Extension (0.43.8)
  ○ GitHub Copilot Chat VS Code Extension — not installed
  ○ Azure MCP Server — not installed
  ✓ azd AI Agent Extensions (0.1.34-preview)

All recommended tools are installed. You're all set!

Deploying services (azd deploy)


  Service                                Status        Duration
  ─────────────────────────────────────  ────────────  ──────────
  ● agent-framework-agent-basic-responses  Done          10s
- Agent playground (portal): https://ai.azure.com/nextgen/r/khSW3Jh_QQ-9V0JusmETVg,rg-ksaligrama-cc-template-11-v2,,aiservices4ctl,project4ctl/build/agents/agent-framework-agent-basic-responses-3/build?version=1
- Agent endpoint (responses): https://aiservices4ctl.services.ai.azure.com/api/projects/project4ctl/agents/agent-framework-agent-basic-responses-3/endpoint/protocols/openai/responses?api-version=2025-11-15-preview
  Next:  azd ai agent show agent-framework-agent-basic-responses                -- verify it's running
           see src/agent-framework-agent-basic-responses/README.md                -- find the sample-specific payload
           azd ai agent invoke agent-framework-agent-basic-responses '<payload>'  -- test with the sample-specific payload


SUCCESS: Your application was deployed to Azure in 15 seconds.
You can view the resources created under the resource group rg-ksaligrama-cc-template-11-v2 in Azure Portal:
https://portal.azure.com/#@/resource/subscriptions/921496dc-987f-410f-bd57-426eb2611356/resourceGroups/rg-ksaligrama-cc-template-11-v2/overview
ksaligrama@CPC-ksali-R2KVK ~/personal/template11-v3
 % azd ai agent monitor --session-id 12b50862201b3788a32594cb3399b96b54b30c1b1d36e0e273cd2c22bec2cf3
Streaming session logs for agent-framework-agent-basic-responses-3 (session: 12b50862201b3788a32594cb3399b96b54b30c1b1d36e0e273cd2c22bec2cf3)...
19:19:25  session Running (last accessed: 19:19:25)
19:20:06  status   Connecting to the container...
19:19:29  stderr   Traceback (most recent call last):
19:19:29  stderr     File "/app/main.py", line 5, in <module>
19:19:29  stderr       from agent_framework import Agent
19:19:29  stderr   ModuleNotFoundError: No module named 'agent_framework'

19:20:06  status   Successfully connected to container

Metadata

Metadata

Assignees

No one assigned

    Labels

    ext-agentsazure.ai.{agents,connections,inspector,projects,routines,skills,toolboxes} extensions

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions