Lab 02 - Develop an AI agent. Bad parameter in agent delete#71
Lab 02 - Develop an AI agent. Bad parameter in agent delete#71rob-foulkrod wants to merge 1 commit intoMicrosoftLearning:mainfrom
Conversation
delete method does take agent version
|
@v-vfarias can you take a look at this? We need to lock versions of our packages for these labs to avoid changes like this, if you can test with the latest then lock our pip install. Likely need to lock the rest of the lab versions soon too |
|
I'm not able to replicate this. @rob-foulkrod are you still seeing the issue? Are you running the code locally or in the cloud shell? |
|
[like] Rob Foulkrod reacted to your message:
…________________________________
From: Ivor Berry ***@***.***>
Sent: Wednesday, January 28, 2026 3:30:50 PM
To: MicrosoftLearning/mslearn-ai-agents ***@***.***>
Cc: Rob Foulkrod ***@***.***>; Author ***@***.***>
Subject: Re: [MicrosoftLearning/mslearn-ai-agents] Lab 02 - Develop an AI agent. Bad parameter in agent delete (PR #71)
[https://avatars.githubusercontent.com/u/11559977?s=20&v=4]ivorb left a comment (MicrosoftLearning/mslearn-ai-agents#71)<#71 (comment)>
@v-vfarias<https://github.com/v-vfarias> can you take a look at this? We need to lock versions of our packages for these labs to avoid changes like this, if you can test with the latest then lock our pip install. Likely need to lock the rest of the lab versions soon too
—
Reply to this email directly, view it on GitHub<#71 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AVHHNS54JKS6IQVOZKXW7NT4JDI2VAVCNFSM6AAAAACSSMYBC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQMJRHE3TIOJXGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Learners were in cloudshell. I replicated it local to be sure. Let's create 5 cool ASCII art representations based on these categories and their costs!
item.content[0].type = input_text
USER: create 5 cool ascii art representations of this data
Conversation deleted
Traceback (most recent call last):
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/agent.py", line 117, in <module>
main()
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/agent.py", line 113, in main
project_client.agents.delete(agent_name=agent.name, agent_version=agent.version)
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/core/tracing/decorator.py", line 119, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/ai/projects/_validation.py", line 62, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/ai/projects/operations/_operations.py", line 2621, in delete
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/core/pipeline/_base.py", line 242, in run
return first_node.send(pipeline_request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/core/pipeline/_base.py", line 98, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/core/pipeline/_base.py", line 98, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/core/pipeline/_base.py", line 98, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 2 more times]
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/core/pipeline/policies/_redirect.py", line 205, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/core/pipeline/policies/_retry.py", line 545, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/core/pipeline/policies/_authentication.py", line 161, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/core/pipeline/_base.py", line 98, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/core/pipeline/_base.py", line 98, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/core/pipeline/_base.py", line 98, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 2 more times]
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/core/pipeline/_base.py", line 130, in send
self._sender.send(request.http_request, **request.context.options),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rob/ai-agents/Labfiles/02-build-ai-agent/Python/labenv/lib/python3.12/site-packages/azure/core/pipeline/transport/_requests_basic.py", line 375, in send
response = self.session.request( # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Session.request() got an unexpected keyword argument 'agent_version'Then delete the parameter
|
|
@buzahid where did you see success, local or in cloudshell? @rob-foulkrod you saw the same thing in both places, can you check the library version you have installed? |
|
During my testing, I have faced the same issue as @rob-foulkrod mentioned. Removing the argument works, but also checking that other labs has the same clean-up methods used but no errors are raised, verifying that at the moment. |

delete method does take agent version
Module: 00
Lab/Demo: 02
Fixes # .
Learners (and confirmed locally) and were getting error
Changes proposed in this pull request: