WhoBuilt

Building Code First AI Agents with Azure AI Agent Service

Jun 27, 2025· 1 h 54 min· 1.7K views·Watch on YouTube

Speaker

Cedric Vidal, principal AI advocate at Microsoft, leads an AI Engineer workshop on building code first agents with Azure AI Agent Service.

What an agent does

Vidal defines an agent as semi-autonomous software given a goal, with tools and data it can use to work toward that goal. The workshop example is an outdoor equipment sales assistant that answers plain-English questions using sales data and product information, and can present results as tables or charts.

How Azure AI Agent Service works

The service manages agent configuration, conversation state, and some data and tools in Azure. The basic flow is to create or reconnect to an agent, create or reuse a thread, run the agent, check its status, and show the response. Vidal also describes the tradeoff: managed state simplifies development, while developers need to learn the service's workflow.

Function routing and database queries

Vidal explains that function calling produces a structured request naming a tool and its parameters; the application is responsible for executing it. In the workshop, an agent turns a question such as sales by region into a SQLite query, using database schema and instructions as grounding. He cautions that instructions alone cannot enforce confidentiality, so sensitive data needs normal access controls.

Combining databases, documents, and charts

The workshop adds product PDFs through Azure AI Search file search, then combines product details with sales query results. Vidal notes that without multi-step planning, an agent may miss a data source needed to answer a question. Code Interpreter generates Python to create a pie chart, while Bing grounding can add web search; the Bing demo encounters a resource error.

Choosing control and evaluating agents

Vidal says broader instructions and more tools can increase flexibility but also raise the chance of choosing incorrectly; specialized agents with routing can narrow the task. He describes stopping criteria as a difficult part of looped agents and says evaluation must consider the conversation, tool selection, and tool accuracy. Azure AI Agent Service is optional: developers can use a regular LLM and manage persistence and tools themselves.

Takeaways

  • Ground SQL generation with a clear schema and useful tool descriptions.
  • Enforce sensitive data access in code and database permissions, not only agent instructions.
  • Use specialized agents and routing when one agent has too many tools or responsibilities.
  • Use deterministic tools for calculations that need to be accurate.
  • Evaluate tool choices and conversation behavior as well as final answers.

Mentioned in this talk

Search inside this talk

What was claimed 8

Related talks