Copilot Studio: Natural-Language Agents
Microsoft Copilot Studio
Apr 13, 2026 12:02 PM

Copilot Studio: Natural-Language Agents

by HubSite 365 about Rafsan Huseynov

IT Program Manager @ Caterpillar Inc. | Power Platform Solution Architect | Microsoft Copilot | Project Manager for Power Platform CoE | PMI Citizen Developer Business Architect | Adjunct Professor

Build HR Copilot Studio agents in VS Code with GitHub Copilot, natural language RAG via Azure Search and Dataverse

Key insights

  • Copilot Studio + VS Code workflow
    Use GitHub Copilot inside VS Code to describe agent behavior in natural language and generate working code from scratch, then test and deploy the agent for production use.
    Example build in the video targets a production-ready HR agent that moves from idea to deployment.
  • Real-world HR scenarios
    The agent handles two practical tasks: answering HR policy questions using retrieval over company documents, and managing employee leave requests by updating records in Microsoft Dataverse.
    Both flows show how agents combine knowledge access and transactional operations.
  • Agent-to-Agent architecture with an Orchestrator
    Design agents as a set of specialized sub-agents and use an Orchestrator to route queries to the right sub-agent for better modularity and clearer responsibilities.
    This pattern improves reliability and makes testing and updates easier.
  • RAG pipeline with Azure AI Search
    Build a retrieval-augmented generation (RAG) pipeline using Azure AI Search to index HR documents and supply accurate, source-backed answers to user questions.
    RAG helps keep answers grounded in company policies and reduces hallucinations.
  • Dataverse integration and Managed Identity
    Connect the agent to Microsoft Dataverse using Managed Identity for secure, password‑free authentication so the agent can read and update employee records safely.
    The video also shows how to programmatically create a Custom Connector in Power Platform using Python to expose Dataverse actions.
  • Deployment options and benefits
    Run agents locally, as background CLI agents, or in the cloud to fit different workflows and scale needs; agents can also integrate with third-party model providers.
    Key benefits include faster development with natural language, autonomous task execution, and a unified development experience between Copilot Studio and VS Code.

Overview

In a recent YouTube video presented by Rafsan Huseynov, the host demonstrates how to build a production-ready HR agent using Copilot Studio and VS Code. The walkthrough emphasizes writing agent logic in natural language with GitHub Copilot, starting from scratch and moving through deployment. Specifically, the agent answers HR policy questions using a retrieval-augmented generation pipeline and manages leave requests through Microsoft Dataverse. As a result, viewers see a full lifecycle example from design to integration.


The video frames the work around two real-world scenarios: querying company documents and performing data operations in a business database. Consequently, it highlights the practical value of combining conversational AI with enterprise connectors. Additionally, the presenter shows how to programmatically create platform elements, which can speed up repeatable deployments. Therefore, the example is useful for teams seeking hands-on guidance.


Building Agents with Natural Language

Huseynov shows how developers can prompt GitHub Copilot inside VS Code to author agent logic using everyday language. Thus, the workflow reduces boilerplate coding and lets creators focus on the agent's intent rather than low-level syntax. The demonstration includes generating triggers, actions, and documentation automatically, which accelerates initial prototyping. However, the ease of generation introduces the need for careful review and testing.


Moreover, the presenter explains that local development modes let agents interact directly with the workspace, while other modes run in background or cloud contexts. Consequently, developers can iterate quickly on behavior and then adapt the agent for production deployment. This flexibility supports different team needs and risk profiles. Still, each mode requires differing levels of access and observability.


Architecture and Integration

The video illustrates an Agent-to-Agent architecture with an Orchestrator that routes queries to specialized sub-agents. Consequently, one sub-agent handles document search and answer generation while another manages Dataverse operations for leave requests. This modular approach improves maintainability and allows targeted testing of components. On the other hand, it adds complexity around inter-agent contracts and state handling.


For document answers, the presenter builds a RAG pipeline using search over company content, which combines retrieval with generative responses. Therefore, quality depends on index design, embedding strategy, and prompt construction. While retrieval reduces hallucination risk by grounding responses, it can introduce latency and cost based on search volume. In addition, maintaining up-to-date content sources becomes a governance concern.


Deployment, Security, and Tradeoffs

Huseynov covers connecting to Microsoft Dataverse using Managed Identity and programmatically creating a Custom Connector for the Power Platform with Python. Consequently, the demonstration emphasizes secure, automated integration patterns suited for enterprise environments. Managed identities reduce credential sprawl and support centralized control, yet they require correct configuration across subscription boundaries. Thus, teams must plan identity and permission models carefully.


Additionally, the video discusses deployment options including local, CLI, and cloud-based agents, each with tradeoffs. Local and CLI modes favor rapid iteration and debugging, while cloud deployments better support scalability and governance. However, cloud deployments may increase operational cost and require stricter compliance checks. Therefore, organizations need to balance developer productivity against long-term manageability and security requirements.


Challenges and Practical Takeaways

Throughout the walkthrough, the presenter highlights common challenges such as testing emergent behavior, ensuring traceability, and managing prompt drift over time. Consequently, teams should invest in observability, versioning, and automated tests to reduce surprises in production. Prompt engineering and clear failure handling are essential to make agents reliable for HR workflows that involve sensitive data. At the same time, thorough logging helps address audit and compliance needs.


Finally, the video makes a compelling case that natural language-driven agent creation accelerates development while shifting effort toward governance and integration engineering. Therefore, organizations adopting this approach must plan for connector security, search quality, and orchestration complexity. In short, Huseynov’s walkthrough offers a practical blueprint and highlights important tradeoffs that teams must manage to move from prototype to production successfully.


Microsoft Copilot Studio - Copilot Studio: Natural-Language Agents

Keywords

Copilot Studio agents VS Code, build Copilot Studio agents, Copilot Studio natural language, VS Code AI agents tutorial, create Copilot agents, Copilot Studio tutorial, natural language coding with Copilot Studio, develop agents in VS Code