You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -48,10 +48,11 @@ The Agent Framework AG-UI integration supports all 7 AG-UI protocol features:
48
48
49
49
## Build agent UIs with CopilotKit
50
50
51
-
[CopilotKit](https://copilotkit.ai/) provides rich UI components for building agent user interfaces based on the standard AG-UI protocol. CopilotKit supports streaming chat interfaces, frontend & backend tool calling, human-in-the-loop interactions, generative UI, shared state, and much more. You can see a examples of the various agent UI scenarios that CopilotKit supports in the [AG-UI Dojo](https://dojo.ag-ui.com/microsoft-agent-framework-dotnet) sample application.
51
+
[CopilotKit](https://copilotkit.ai/) provides rich UI components and headless UI primitives for building agent user interfaces based on the standard AG-UI protocol, so you can ship quickly with prebuilt chat experiences or fully customize the interface for your application. CopilotKit supports streaming chat interfaces, frontend and backend tool calling, human-in-the-loop interactions, generative UI, shared state, and much more. You can see examples of the various agent UI scenarios that CopilotKit supports in the [AG-UI Dojo](https://dojo.ag-ui.com/microsoft-agent-framework-dotnet) sample application.
52
52
53
-
CopilotKit helps you focus on your agent’s capabilities while delivering a polished user experience without reinventing the wheel.
54
-
To learn more about getting started with Microsoft Agent Framework and CopilotKit, see the [Microsoft Agent Framework integration for CopilotKit](https://docs.copilotkit.ai/microsoft-agent-framework) documentation.
53
+
For production applications, use the [Copilot Runtime](https://docs.copilotkit.ai/backend/copilot-runtime) as the server-side connection layer between your user-facing application and your Agent Framework AG-UI endpoint. The runtime keeps the agent connection on your server, where you can enforce authentication, route requests, apply AG-UI middleware, and enable CopilotKit features such as frontend tools, generative UI, human-in-the-loop flows, shared state, observability, and MCP Apps.
54
+
55
+
Direct AG-UI client connections are useful for local development and protocol testing. For deployed applications, prefer the Copilot Runtime or another trusted frontend server so browser and mobile clients do not connect directly to the AG-UI server. To learn more about getting started with Microsoft Agent Framework and CopilotKit, see the [Microsoft Agent Framework integration for CopilotKit](https://docs.copilotkit.ai/microsoft-agent-framework) documentation.
Copy file name to clipboardExpand all lines: agent-framework/integrations/ag-ui/security-considerations.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,13 @@ description: Essential security guidelines for building secure AG-UI application
4
4
author: moonbox3
5
5
ms.topic: reference
6
6
ms.author: evmattso
7
-
ms.date: 11/11/2025
7
+
ms.date: 06/15/2026
8
8
ms.service: agent-framework
9
9
---
10
10
11
11
# Security Considerations for AG-UI
12
12
13
-
AG-UI enables powerful real-time interactions between clients and AI agents. This bidirectional communication requires some security considerations. The following document covers essential security practices for building securing your agents exposed through AG-UI.
13
+
AG-UI enables powerful real-time interactions between clients and AI agents. This bidirectional communication requires some security considerations. The following document covers essential security practices for securing your agents exposed through AG-UI.
14
14
15
15
## Overview
16
16
@@ -41,6 +41,8 @@ The primary trust boundary in AG-UI is between the client and the AG-UI server.
41
41
> [!IMPORTANT]
42
42
> **Do not expose AG-UI servers directly to untrusted clients** (e.g., JavaScript running in browsers, mobile apps). Instead, implement a trusted frontend server that mediates communication and constructs AG-UI protocol messages in a controlled manner. This prevents malicious clients from crafting arbitrary protocol messages.
43
43
44
+
If you build the user interface with [CopilotKit](https://copilotkit.ai/), the [Copilot Runtime](https://docs.copilotkit.ai/backend/copilot-runtime) can serve as this trusted frontend server. It runs on your server, connects to the AG-UI endpoint from a trusted environment, and gives your application a place to enforce authentication, validate requests, control available tools, and apply middleware before traffic reaches the agent.
45
+
44
46
### Potential threats
45
47
46
48
If AG-UI is exposed directly to untrusted clients (not recommended), the server must take care of validating every input coming from the client and ensuring that no output discloses sensitive information inside updates:
@@ -100,6 +102,8 @@ When using a trusted frontend server, the security model changes significantly:
100
102
> [!TIP]
101
103
> The trusted frontend server pattern significantly reduces attack surface by ensuring that only user message **content** comes from untrusted sources, while all other protocol elements (message structure, roles, tools, state, context) are controlled by trusted code.
102
104
105
+
When using a runtime or proxy layer, keep authorization decisions in that trusted layer. For example, decide which tools, state fields, context values, and forwarded properties a user can send before constructing the AG-UI request to the server.
106
+
103
107
## Input Validation and Sanitization
104
108
105
109
### Message Content Validation
@@ -148,7 +152,7 @@ Forwarded properties contain arbitrary JSON that passes through the system. Trea
148
152
149
153
## Authentication and Authorization
150
154
151
-
AG-UI does not include built-in authorization mechanism. It is up to your application to prevent unauthorized use of the exposed AG-UI endpoint.
155
+
AG-UI does not include a built-in authorization mechanism. It is up to your application to prevent unauthorized use of the exposed AG-UI endpoint.
0 commit comments