Skip to content

Commit 0be1841

Browse files
committed
Refactor AI agent implementation guide: enhance clarity and structure in Unit 6, adapt and extend strategies in Unit 7, and create a new knowledge check file.
1 parent c1610bd commit 0be1841

10 files changed

Lines changed: 554 additions & 372 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The following questions test your understanding of the concepts covered in this module.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
AI agents represent an evolution in how applications interact with users and systems. Unlike traditional chatbots that respond to individual queries, AI agents can reason about goals, take autonomous actions, and maintain context across multi-step tasks. The GitHub Copilot SDK provides developers with a production-tested framework for embedding these agentic capabilities directly into their own applications.
2+
3+
Imagine you're a software developer working for a consulting firm. Your client operates an e-commerce platform and needs an AI-powered customer support agent integrated into their existing web application. The agent should handle order inquiries, process returns, and send follow-up communications, all by reasoning about the customer's needs and calling backend services autonomously. With the GitHub Copilot SDK, you can build this agent by defining custom tools, configuring an AI session, and letting the SDK's execution loop handle the planning and orchestration.
4+
5+
The topics covered in this module include:
6+
7+
- Understanding what AI agents are and how they differ from chatbots.
8+
- Exploring the GitHub Copilot SDK's architecture and key features.
9+
- Examining real-world use cases for AI agents across business scenarios.
10+
- Designing AI agent systems with appropriate components and guardrails.
11+
- Implementing AI agents using the GitHub Copilot SDK with custom tools.
12+
- Adapting and extending agents for different operational requirements.
13+
14+
After completing this module, you'll be able to:
15+
16+
- Explain what AI agents are and how they differ from chatbots and automation scripts.
17+
- Describe the architecture and key features of the GitHub Copilot SDK.
18+
- Design an AI agent system with tools, memory, and guardrails.
19+
- Implement an AI agent using the GitHub Copilot SDK with custom tool definitions.
20+
21+
> [!IMPORTANT]
22+
> To complete this GitHub Copilot training, you must have an active subscription for GitHub Copilot in your personal GitHub account (includes the GitHub Copilot Free plan), or you must be assigned to a subscription managed by an organization or enterprise. Module activities might include GitHub Copilot suggestions that match public code. If you're a member of an organization on GitHub Enterprise Cloud who is assigned to a GitHub Copilot subscription through your organization, the setting for suggestions matching public code might be inherited from your organization or enterprise. If your account blocks suggestions that match public code, module activities might not work as expected.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
In this module, you learned about AI agents and how to build them using the GitHub Copilot SDK. You explored what makes AI agents different from chatbots and automation scripts—specifically their ability to reason about goals, use tools, and execute multi-step workflows autonomously. You examined the SDK's architecture, which provides a production-tested agent execution loop on top of the Copilot CLI, and you learned how its core concepts (client, session, tools, and events) work together.
2+
3+
You examined real-world scenarios where AI agents provide business value, from e-commerce customer support to IT operations incident response. You then learned how to design agent systems with appropriate components: an AI reasoning engine, custom tools, memory management, and guardrails. The implementation unit showed you how to configure a `CopilotClient`, define tools using `AIFunctionFactory.Create`, write system prompts, and handle responses through the SDK's event-driven model.
4+
5+
The main takeaway from this module is that the GitHub Copilot SDK handles the complex infrastructure of agent orchestration—session management, tool calling, context tracking, and model communication—so you can focus on defining the tools and business logic that make your agent useful.
6+
7+
You can apply this knowledge to build AI agents for your own applications. Start by identifying a workflow in your organization that involves multiple steps, data lookups, and decision making. Define the tools the agent would need, write a focused system prompt, and use the Copilot SDK to bring the agent to life.
8+
9+
## Learn more
10+
11+
- [GitHub Copilot SDK repository](https://github.com/github/copilot-sdk)
12+
- [Build an agent into any app with the GitHub Copilot SDK (GitHub Blog)](https://github.blog/news-insights/company-news/build-an-agent-into-any-app-with-the-github-copilot-sdk/)
Lines changed: 39 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,51 @@
1-
An **AI agent** is a goal-driven AI entity that can **reason, take actions, and adapt autonomously** in pursuit of an objective[1]. Unlike a simple chatbot that only responds to user queries with pre-scripted answers, an AI agent can **make decisions**, **use tools or APIs**, and **maintain memory of context** to achieve a goal without step-by-step human guidance[2][3]. In essence, *chatbots respond; AI agents act*.
1+
An AI agent is a goal-driven AI entity that can reason, take actions, and adapt autonomously in pursuit of an objective. Unlike a simple chatbot that only responds to user queries with pre-scripted answers, an AI agent can make decisions, use tools or APIs, and maintain memory of context to achieve a goal without step-by-step human guidance. In essence, chatbots respond to individual queries; AI agents pursue goals through multi-step reasoning and action.
22

3-
## Compare Chatbots and AI Agents
3+
## How AI agents differ from chatbots
44

5-
A traditional **chatbot** might answer "What's my account balance?" with information from a database. An **AI agent**, on the other hand, could not only fetch your balance but also **proactively alert you** if it detects unusual spending, or even **execute tasks** like transferring funds or scheduling a meeting with your financial advisor – all based on reasoning about your goal (e.g., managing your finances) rather than just reacting to one question[4][5].
5+
A traditional chatbot might answer "What's my account balance?" with information from a database. An AI agent, on the other hand, could not only fetch your balance but also proactively alert you if it detects unusual spending, or even execute tasks like transferring funds or scheduling a meeting with your financial advisor. The agent reasons about your goal (managing your finances) rather than just reacting to a single question.
66

7-
## Key Capabilities of AI Agents
7+
The key distinction is that chatbots follow predetermined conversational paths, while agents dynamically plan and execute multi-step workflows to achieve an outcome.
88

9-
Modern AI agents are powered by advanced AI models (often large language models, or LLMs) and are defined by a few core abilities that distinguish them from basic automation:
9+
## Key capabilities of AI agents
1010

11-
These capabilities let an AI agent operate with a degree of **independence**. The agent uses its AI **reasoning** to decide *what* needs to be done, it **acts** by calling tools or issuing commands to do it, and it **iterates** - checking outcomes and refining its plan as needed[6][7]. This loop continues until the agent's goal is accomplished or it reaches a stopping condition.
11+
Modern AI agents are powered by advanced AI models (often large language models, or LLMs) and are defined by several core abilities that distinguish them from basic automation:
1212

13-
## Beyond Chatbots and Scripts
13+
- **Reasoning and planning**: Agents use AI models to interpret requests, break them into steps, and decide what actions to take. Rather than following a fixed script, they formulate plans based on the current situation.
1414

15-
Early business automation took the form of **if/then scripts or workflows** – useful but rigid. AI agents are a step beyond: they can handle open-ended requests and unexpected situations by relying on AI planning rather than just hard-coded rules[8]. For example, if a user asks a chatbot, *'When is my next team meeting and can you book a room for it?"*, a basic bot might fail because that request spans multiple steps. An AI agent is designed to handle such multi-step goals: it could check the calendar, find the meeting time, then interface with a room-booking system to schedule a room, and confirm back – all without the user explicitly asking for each step.
15+
- **Tool use**: Agents extend their capabilities by calling external tools, APIs, or commands. A tool might look up a database record, call a REST API, run a shell command, or query a knowledge base. Tools give agents the ability to interact with real systems.
1616

17-
In technical terms, frameworks like **ReAct** (which couples reasoning and acting) and **RAG** (Retrieval-Augmented Generation) have emerged to enable these behaviors in agents[9]. These allow an agent's LLM to both **'think' (reason internally)** and **'do' (use tools)** in a unified loop. The takeaway is that an AI agent is *not* limited to answering questions; it can be thought of as an intelligent assistant or "digital coworker" that can carry out tasks on your behalf within the scope it's given.
17+
- **Memory and context**: Agents maintain context across multiple interactions within a session. They remember what happened earlier in a conversation, what data they retrieved, and what actions they took. This memory ensures coherent, contextual responses.
1818

19-
## When to Use AI Agents
19+
- **Iterative execution**: Agents operate in a loop of reasoning and acting. They reason about what to do next, take an action (like calling a tool), observe the result, and then decide whether to take another action or provide a final response. This loop continues until the agent's goal is accomplished or it reaches a stopping condition.
2020

21-
AI agents shine in scenarios where tasks: (a) require integrating information from multiple sources or systems, (b) involve multiple steps or decisions, or (c) would benefit from automation with minimal oversight. We'll see concrete examples in a moment (customer service, sales, finance, etc.). If a task is straightforward and single-step (e.g., "show latest sales figures"), a simple query or bot may suffice. But if it's complex (e.g., "find all customers who overpaid and initiate refunds" or "monitor my servers and fix issues"), an agent is more suitable because it can handle the decision process and execution. Enterprises are increasingly looking to **autonomous digital agents** to drive productivity – indeed, industry leaders predict that by 2028, at least 15% of work decisions will be made by agentic AI systems, up from essentially 0% in 2024[10].
21+
These capabilities let an AI agent operate with a degree of independence. The agent uses its AI reasoning to decide *what* needs to be done, it acts by calling tools or issuing commands to do it, and it iterates by checking outcomes and refining its plan as needed.
2222

23-
To summarize, AI agents combine the language understanding of chatbots with the action-oriented power of automation scripts, amplified by AI's ability to reason. In the next units, we'll explore how we can create such agents using the GitHub Copilot SDK – but first, let's introduce the SDK itself and why it's a game-changer for developers.
23+
## How AI agents compare to automation scripts
2424

25-
[1]https://www.knowi.com/blog/ai-agents-explained-how-they-differ-from-chatbots-and-workflows/
26-
[2]https://www.knowi.com/blog/ai-agents-explained-how-they-differ-from-chatbots-and-workflows/
27-
[3]https://www.knowi.com/blog/ai-agents-explained-how-they-differ-from-chatbots-and-workflows/
28-
[4]https://www.knowi.com/blog/ai-agents-explained-how-they-differ-from-chatbots-and-workflows/
29-
[5]https://www.knowi.com/blog/ai-agents-explained-how-they-differ-from-chatbots-and-workflows/
30-
[6]https://www.knowi.com/blog/ai-agents-explained-how-they-differ-from-chatbots-and-workflows/
31-
[7]https://www.knowi.com/blog/ai-agents-explained-how-they-differ-from-chatbots-and-workflows/
32-
[8]https://www.knowi.com/blog/ai-agents-explained-how-they-differ-from-chatbots-and-workflows/
33-
[9]https://www.knowi.com/blog/ai-agents-explained-how-they-differ-from-chatbots-and-workflows/
34-
[10]https://aws.amazon.com/blogs/aws-insights/the-rise-of-autonomous-agents-what-enterprise-leaders-need-to-know-about-the-next-wave-of-ai/
25+
Early business automation took the form of if/then scripts or workflows. These scripts are useful but rigid. AI agents go a step beyond: they handle open-ended requests and unexpected situations by relying on AI planning rather than hard-coded rules.
26+
27+
For example, if a user asks a chatbot, "When is my next team meeting and can you book a room for it?", a basic bot might fail because that request spans multiple steps. An AI agent is designed to handle such multi-step goals: it could check the calendar, find the meeting time, interface with a room-booking system to schedule a room, and confirm back. The user doesn't need to explicitly ask for each step.
28+
29+
Frameworks like **ReAct** (which couples reasoning and acting) and **RAG** (Retrieval-Augmented Generation) enable these behaviors in agents. ReAct allows an agent's LLM to both reason internally and use tools in a unified loop. RAG enables agents to retrieve relevant information from external knowledge bases, grounding their responses in factual data rather than relying solely on training data.
30+
31+
## When to use AI agents
32+
33+
AI agents are most effective in scenarios where tasks:
34+
35+
- Require integrating information from multiple sources or systems.
36+
- Involve multiple steps or decisions.
37+
- Benefit from automation with minimal human oversight.
38+
39+
If a task is straightforward and single-step (like "show latest sales figures"), a simple query or bot may suffice. But if it's complex (like "find all customers who overpaid and initiate refunds" or "monitor my servers and fix issues"), an agent is more suitable because it can handle the decision process and execution.
40+
41+
The following table compares the capabilities of chatbots, automation scripts, and AI agents:
42+
43+
| Capability | Chatbot | Automation script | AI agent |
44+
|---|---|---|---|
45+
| **Input handling** | Responds to specific queries | Follows predefined triggers | Interprets open-ended requests |
46+
| **Decision making** | Pre-scripted paths | Hard-coded rules | AI-driven reasoning |
47+
| **Tool use** | Limited or none | Fixed integrations | Dynamic tool selection |
48+
| **Multi-step tasks** | Limited | Sequential only | Adaptive, iterative |
49+
| **Error handling** | Falls back to default | Stops or retries | Reasons about alternatives |
50+
51+
AI agents combine the language understanding of chatbots with the action-oriented power of automation scripts, amplified by AI's ability to reason and adapt.

0 commit comments

Comments
 (0)