Skip to content

Commit e7311b1

Browse files
authored
Merge pull request #4 from EfeSenerr/feature/customer-use-cases
Add customer use cases
2 parents 1c5fcb1 + 32f4690 commit e7311b1

10 files changed

Lines changed: 616 additions & 0 deletions

File tree

148 KB
Loading
120 KB
Loading
297 KB
Loading
46.7 KB
Loading
66.4 KB
Loading
119 KB
Loading
82.1 KB
Loading

docs/customer-stories/customer-story-1.md

Lines changed: 421 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
# Building Multi-Agent Systems with MCP and External APIs
2+
3+
This customer case showcases how we leveraged GitHub Copilot end-to-end to build a proof-of-concept multi-agent application using the Agent Framework and Model Context Protocol (MCP). We demonstrate how GitHub Copilot can help developers rapidly explore new frameworks and build working prototypes without deep prior knowledge.
4+
5+
## Lab Overview
6+
7+
**Duration**: 1-2 hours
8+
**Difficulty**: Advanced
9+
**Prerequisites**:
10+
11+
- Python programming knowledge
12+
- Basic understanding of AI agents and LLMs
13+
- Familiarity with REST APIs
14+
- GitHub Copilot with MCP server support
15+
16+
## Customer Challenge
17+
18+
The customer was interested in building a PoC app with multi-agent architecture using a new agentic orchestration framework, the Agent Framework. They also wanted to explore Model Context Protocol (MCP) to connect to their API endpoint. They did not know where to start.
19+
20+
### Key Requirements
21+
22+
- Multi-agent architecture with agent-to-agent communication
23+
- Integration with external APIs via custom MCP servers
24+
- Use of Microsoft's Agent Framework (newly introduced)
25+
- Rapid prototyping without deep framework knowledge
26+
27+
### Challenges
28+
29+
- **Newly introduced framework**: The Agent Framework was recently released
30+
- **Limited LLM knowledge**: Base models have no knowledge of this framework
31+
- **Understanding MCP integration**: How to integrate MCP with the framework
32+
- **Multiple technology integration**: Agent Framework, MCP servers, external APIs, and orchestration patterns
33+
34+
## Solution Approach
35+
36+
This showcase demonstrates how to try out new libraries/frameworks while leveraging GitHub Copilot to build a working proof-of-concept quickly:
37+
38+
- **Leverage MCP Servers inside GitHub Copilot**:
39+
- Microsoft Docs MCP server to provide Agent Framework documentation from Microsoft
40+
- Context7 MCP to leverage code examples and patterns
41+
- **Start with a clear plan/requirements** using Copilot's planner mode
42+
- **Create custom instructions** focused on the desired implementation
43+
44+
## Getting Started
45+
46+
### Step 1: Custom Instructions
47+
48+
Before starting implementation, it's recommended to create custom instructions, agents, or prompts specific to your needs. In GitHub Copilot and VS Code, this can be done with chat modes and custom instructions:
49+
50+
- [Custom instructions](https://code.visualstudio.com/docs/copilot/customization/custom-instructions)
51+
- [Create a custom agent](https://code.visualstudio.com/docs/copilot/customization/custom-agents#_create-a-custom-agent)
52+
53+
#### Adding Custom MCP Instruction File
54+
55+
Take a look at this repository, which consists of various example instructions, prompts, and custom agents: [Awesome GitHub Copilot Customizations](https://github.com/github/awesome-copilot).
56+
57+
We will use a custom instruction file from the [Awesome GitHub Copilot Customizations](https://github.com/github/awesome-copilot) repository. [This example instruction file](https://github.com/github/awesome-copilot/blob/main/instructions/python-mcp-server.instructions.md) focuses on building MCP servers using Python. The file contains instructions, best practices, common patterns, and example code snippets.
58+
59+
![Customization](../assets/images/customer-stories/custom_instruction.png)
60+
61+
Now, every time GitHub Copilot is editing/reading a `*.py` file, it will include our MCP instruction file in the context.
62+
63+
### Step 2: Custom Agents - Planner
64+
65+
We will leverage the Plan Mode from GitHub Copilot as seen in the screenshot. Plan mode helps create, refine, and execute step-by-step implementation plans. Before starting to code, the plan mode analyzes your codebase, generates detailed execution plans, and validates that requirements are covered.
66+
67+
![Custom Agents](../assets/images/customer-stories/custom_agent.png)
68+
69+
!!! tip "Copilot Tip"
70+
You can also create your own custom agent, tailored to your own requirements and ideas.
71+
72+
### Step 3: Add MCP Servers
73+
74+
Right now our agent is limited to the model's knowledge. We need additional function calling capabilities (e.g., interacting with external tools and accessing up-to-date documentation).
75+
76+
We'll add MCP servers to our custom agent. You can leverage either:
77+
78+
- The internal marketplace of VS Code: [MCP Servers Documentation](https://code.visualstudio.com/docs/copilot/customization/mcp-servers)
79+
- The GitHub MCP Registry with one-click integration: [GitHub MCP](https://github.com/mcp)
80+
81+
#### Recommended MCP Servers
82+
83+
- **Context7**: Pulls up-to-date, version-specific documentation and code examples straight from the source
84+
- [Context7 MCP](https://github.com/mcp/io.github.upstash/context7)
85+
86+
- **Microsoft Learn MCP**: Provides access to Microsoft Learn documentation and tutorials, necessary when working with Microsoft libraries like Agent Framework
87+
- [Microsoft Learn MCP](https://github.com/mcp/microsoftdocs/mcp)
88+
89+
After adding the MCP servers to VS Code, enable them by selecting `Configure Tools` and ticking the boxes:
90+
91+
![Configure Tools](../assets/images/customer-stories/configure_tools.png)
92+
93+
## Implementation
94+
95+
With the custom instruction and MCP servers in place, we can now start implementing our prototype.
96+
97+
### Step 1: Planning with GitHub Copilot
98+
99+
We will first leverage the planner agent to help us with the implementation. Start a new chat with the planner agent and provide the following input. **Be sure to have selected your custom agent from the dropdown in the chat window.**
100+
101+
!!! abstract ""
102+
```
103+
I need to build a multi-agent PoC using Microsoft's Agent Framework in Python. The requirements are:
104+
105+
**Architecture:**
106+
- Two agents that communicate to complete a collaborative task
107+
- Agent 1, the Poet: Accesses a custom MCP server to retrieve Lord of the Rings quotes from an API (https://the-one-api.dev/v2/quote), then writes a brief LOTR-themed poem
108+
- Agent 2, the Critic: Reviews the poem for content accuracy, length, and LOTR lore compliance
109+
110+
**MCP Server Requirements:**
111+
- Implement a custom MCP server that connects to The One API
112+
- Handle Bearer token authentication: `Authorization: Bearer your-api-key-123`
113+
- Expose tools for quote retrieval
114+
115+
**Workflow:**
116+
- Agents should iterate in a "ping-pong" pattern with visible interaction logging
117+
- Implement a configurable limit on iteration rounds (e.g., max 5 exchanges)
118+
- User should see the full conversation flow
119+
120+
Please create a detailed implementation plan. I have access to #Microsoft Docs and #upstash/context7 MCP servers for up-to-date Agent Framework documentation and examples.
121+
```
122+
123+
The planning should take a moment. After the plan is ready, you'll have a structured approach to building the multi-agent system.
124+
125+
### Step 2: Implementation
126+
127+
Let's either change to `Agent` Mode or your custom implementer agent and provide the following input referencing the MCP servers we have:
128+
129+
!!! abstract ""
130+
```
131+
Looking at the previous plan, please start implementing this project considering your #Microsoft Docs and #upstash/context7 tools.
132+
```
133+
134+
Check the chat window to see what has been built:
135+
136+
![Implementation Window](../assets/images/customer-stories/implementation_window.png)
137+
138+
GitHub Copilot should complete the implementation. You should start the prototype to verify that everything is working as expected. If you have problems starting the prototype, ask the agent for help to troubleshoot the issues!
139+
140+
Let's be realistic: There might be errors during implementation. If that is the case, leverage the agent to help you troubleshoot the issues. We suggest nudging the agent with the error messages you get to get help on how to fix them.
141+
142+
### Step 3: Testing and Iteration
143+
144+
Once the implementation is complete:
145+
146+
1. **Verify the MCP server**: Ensure it can connect to the external API and retrieve data
147+
2. **Test agent communication**: Verify the agents can communicate in the ping-pong pattern
148+
3. **Check iteration limits**: Confirm the conversation respects the maximum round configuration
149+
4. **Review output quality**: Ensure the poet creates relevant content and the critic provides meaningful feedback
150+
151+
## Key Takeaways
152+
153+
This customer case demonstrates how GitHub Copilot with MCP servers can:
154+
155+
- **Accelerate learning**: Quickly understand new frameworks without deep documentation diving
156+
- **Provide up-to-date information**: Access the latest framework documentation via MCP servers
157+
- **Generate working prototypes**: Create functional multi-agent systems rapidly
158+
- **Integrate multiple technologies**: Combine frameworks, APIs, and orchestration patterns seamlessly
159+
- **Enable experimentation**: Try new approaches without extensive setup time
160+
161+
### Architecture Benefits
162+
163+
1. **Custom MCP Servers**: Extend agent capabilities with external data sources
164+
2. **Multi-Agent Collaboration**: Enable specialized agents to work together on complex tasks
165+
3. **Flexible Orchestration**: Control agent interactions with configurable patterns
166+
4. **Visible Communication Flow**: Track and debug agent-to-agent conversations
167+
168+
### Next Steps
169+
170+
- Extend the pattern to more complex multi-agent scenarios
171+
- Add additional MCP servers for different data sources
172+
- Implement more sophisticated orchestration patterns
173+
- Deploy the system to production environments
174+
- Add monitoring and logging for agent interactions
175+
176+
## Code Repository
177+
178+
The complete code for all three prototypes is available in this repository:
179+
180+
**[GitHub Repository: ghcp_session_stickiness_customer_case](https://github.com/EfeSenerr/demo_mcp_learn)**
181+
182+
183+
## Conclusion
184+
185+
This customer case shows that with GitHub Copilot and the right MCP servers, developers can:
186+
187+
- Rapidly prototype with unfamiliar frameworks
188+
- Build complex multi-agent systems without extensive research
189+
- Integrate external APIs seamlessly via custom MCP servers
190+
- Create working solutions in hours instead of days
191+
192+
The combination of GitHub Copilot's code generation, MCP servers for up-to-date documentation, and the planner mode for structured implementation creates a powerful workflow for exploring new technologies.

mkdocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,8 @@ nav:
9595
- Build Your Own MCP Server: hands-on/mcp-server-starter.md
9696
- MCP Fiar Game: hands-on/mcp-fiar.md
9797
- Other Labs: hands-on/other-labs.md
98+
- Customer Stories:
99+
- Spring Boot Session Management Customer Case: customer-stories/customer-story-1.md
100+
- Multi-Agent Systems with MCP and External APIs: customer-stories/customer-story-2.md
98101
- Future Roadmap: future-roadmap.md
99102
- RAG Extension Lab: rag-extension-lab.md

0 commit comments

Comments
 (0)