An agent is a slave machine that is used to run a pipeline or a stage of a jenkins build. Only one build can be using a given agent at a given time.
Agents can be top-level ('pipeline' level) but can be further broken down by stages. So, one build can use multiple agents for its different stages. For VS Code, the top-level agent is a kube one from a node image (Jenkinsfile#57). This agent is used for any stage which does not override the agent clause.