Skip to content

Commit 0314de6

Browse files
giles17Copilot
andcommitted
fix: correct critical provider documentation issues
- copilot-studio.md: Replace non-existent CopilotStudioChatClient with CopilotStudioAgent, rewrite C# sample, add Python section - index.md: Fix comparison table (OpenAI/Anthropic/GitHub Copilot MCP, Anthropic Code Interpreter), add Foundry Local row, add Copilot Studio to Python list, note both AIAgent/.NET and BaseAgent/Python base classes - github-copilot.md: Fix PermissionRequest import path, rename thread variable to session for consistency - foundry-local.md: Fix next step link to point forward to Anthropic - microsoft-foundry.md: Fix next step link to point to Foundry Local Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f9f22a0 commit 0314de6

5 files changed

Lines changed: 60 additions & 11 deletions

File tree

agent-framework/agents/providers/copilot-studio.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,54 @@ Console.WriteLine(await agent.RunAsync("What are our company policies on remote
4141
:::zone pivot="programming-language-python"
4242

4343
> [!NOTE]
44-
> Python support for Copilot Studio agents is coming soon.
44+
> Python support for Copilot Studio agents is available through the `agent-framework-copilotstudio` package.
45+
46+
## Installation
47+
48+
```bash
49+
pip install agent-framework-copilotstudio --pre
50+
```
51+
52+
## Configuration
53+
54+
Set the following environment variables for automatic configuration:
55+
56+
```bash
57+
COPILOTSTUDIOAGENT__ENVIRONMENTID="<your-environment-id>"
58+
COPILOTSTUDIOAGENT__SCHEMANAME="<your-agent-schema-name>"
59+
COPILOTSTUDIOAGENT__AGENTAPPID="<your-client-id>"
60+
COPILOTSTUDIOAGENT__TENANTID="<your-tenant-id>"
61+
```
62+
63+
## Create a Copilot Studio Agent
64+
65+
`CopilotStudioAgent` reads connection settings from environment variables automatically:
66+
67+
```python
68+
import asyncio
69+
from agent_framework.microsoft import CopilotStudioAgent
70+
71+
async def main():
72+
agent = CopilotStudioAgent()
73+
74+
result = await agent.run("What are our company policies on remote work?")
75+
print(result)
76+
77+
asyncio.run(main())
78+
```
79+
80+
## Streaming
81+
82+
```python
83+
async def streaming_example():
84+
agent = CopilotStudioAgent()
85+
86+
print("Agent: ", end="", flush=True)
87+
async for chunk in agent.run("What is the capital of France?", stream=True):
88+
if chunk.text:
89+
print(chunk.text, end="", flush=True)
90+
print()
91+
```
4592

4693
:::zone-end
4794

agent-framework/agents/providers/foundry-local.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ For additional runtime controls, `FoundryLocalClient` also supports options such
7676
## Next steps
7777

7878
> [!div class="nextstepaction"]
79-
> [Microsoft Foundry Provider](./microsoft-foundry.md)
79+
> [Anthropic](./anthropic.md)

agent-framework/agents/providers/github-copilot.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,14 @@ async def thread_example():
306306
)
307307

308308
async with agent:
309-
thread = agent.create_session()
309+
session = agent.create_session()
310310

311311
# First interaction
312-
result1 = await agent.run("My name is Alice.", session=thread)
312+
result1 = await agent.run("My name is Alice.", session=session)
313313
print(f"Agent: {result1}")
314314

315315
# Second interaction - agent remembers the context
316-
result2 = await agent.run("What's my name?", session=thread)
316+
result2 = await agent.run("What's my name?", session=session)
317317
print(f"Agent: {result2}") # Should remember "Alice"
318318
```
319319

@@ -322,7 +322,7 @@ async def thread_example():
322322
By default, the agent cannot execute shell commands, read/write files, or fetch URLs. To enable these capabilities, provide a permission handler:
323323

324324
```python
325-
from copilot.types import PermissionRequest, PermissionRequestResult
325+
from copilot.generated.session_events import PermissionRequest
326326

327327
def prompt_permission(
328328
request: PermissionRequest, context: dict[str, str]

agent-framework/agents/providers/index.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@ ms.service: agent-framework
1111

1212
# Providers Overview
1313

14-
Microsoft Agent Framework supports several types of agents to accommodate different use cases and requirements. All agents are derived from a common base class, `AIAgent`, which provides a consistent interface for all agent types.
14+
Microsoft Agent Framework supports several types of agents to accommodate different use cases and requirements. All agents are derived from a common base class (`AIAgent` in .NET, `BaseAgent` in Python), which provides a consistent interface for all agent types.
1515

1616
## Provider Comparison
1717

1818
| Provider | Function Tools | Structured Output | Code Interpreter | File Search | MCP Tools | Background Responses |
1919
|----------|:---:|:---:|:---:|:---:|:---:|:---:|
2020
| [Azure OpenAI](./azure-openai.md) |||||||
21-
| [OpenAI](./openai.md) ||||| ||
21+
| [OpenAI](./openai.md) ||||| ||
2222
| [Microsoft Foundry](./microsoft-foundry.md) |||||||
23-
| [Anthropic](./anthropic.md) ||| || ||
23+
| [Anthropic](./anthropic.md) ||| || ||
2424
| [Ollama](./ollama.md) |||||||
25-
| [GitHub Copilot](./github-copilot.md) |||||||
25+
| [Foundry Local](./foundry-local.md) |||||||
26+
| [GitHub Copilot](./github-copilot.md) |||||||
2627
| [Copilot Studio](./copilot-studio.md) |||||||
2728
| [Custom](./custom.md) | Varies | Varies | Varies | Varies | Varies | Varies |
2829

@@ -61,6 +62,7 @@ Agent Framework supports many different inference services through chat clients.
6162
- **[Anthropic](./anthropic.md)** — Claude models with extended thinking and hosted tools support.
6263
- **[Ollama](./ollama.md)** — Run open-source models locally.
6364
- **[GitHub Copilot](./github-copilot.md)** — GitHub Copilot SDK integration.
65+
- **[Copilot Studio](./copilot-studio.md)** — Integration with Microsoft Copilot Studio agents.
6466
- **[Custom](./custom.md)** — Build your own provider by implementing the `BaseAgent` class.
6567

6668
:::zone-end

agent-framework/agents/providers/microsoft-foundry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,4 @@ Both `FoundryChatClient` and `FoundryAgent` integrate with the standard Python `
200200
## Next steps
201201

202202
> [!div class="nextstepaction"]
203-
> [Anthropic](./anthropic.md)
203+
> [Foundry Local](./foundry-local.md)

0 commit comments

Comments
 (0)