agent-framework-devui 1.0.0b251007__py3-none-any.whl → 1.0.0b251016__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of agent-framework-devui might be problematic. Click here for more details.

@@ -5,8 +5,8 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/agentframework.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Agent Framework Dev UI</title>
8
- <script type="module" crossorigin src="/assets/index-D0SfShuZ.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-WsCIE0bH.css">
8
+ <script type="module" crossorigin src="/assets/index-DmL7WSFa.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-CE4pGoXh.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
@@ -0,0 +1,286 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-framework-devui
3
+ Version: 1.0.0b251016
4
+ Summary: Debug UI for Microsoft Agent Framework with OpenAI-compatible API server.
5
+ Author-email: Microsoft <af-support@microsoft.com>
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Typing :: Typed
17
+ License-File: LICENSE
18
+ Requires-Dist: agent-framework-core
19
+ Requires-Dist: fastapi>=0.104.0
20
+ Requires-Dist: uvicorn[standard]>=0.24.0
21
+ Requires-Dist: python-dotenv>=1.0.0
22
+ Requires-Dist: pytest>=7.0.0 ; extra == "all"
23
+ Requires-Dist: watchdog>=3.0.0 ; extra == "all"
24
+ Requires-Dist: pytest>=7.0.0 ; extra == "dev"
25
+ Requires-Dist: watchdog>=3.0.0 ; extra == "dev"
26
+ Project-URL: homepage, https://github.com/microsoft/agent-framework
27
+ Project-URL: issues, https://github.com/microsoft/agent-framework/issues
28
+ Project-URL: release_notes, https://github.com/microsoft/agent-framework/releases?q=tag%3Apython-1&expanded=true
29
+ Project-URL: source, https://github.com/microsoft/agent-framework/tree/main/python
30
+ Provides-Extra: all
31
+ Provides-Extra: dev
32
+
33
+ # DevUI - A Sample App for Running Agents and Workflows
34
+
35
+ A lightweight, standalone sample app interface for running entities (agents/workflows) in the Microsoft Agent Framework supporting **directory-based discovery**, **in-memory entity registration**, and **sample entity gallery**.
36
+
37
+ > [!IMPORTANT]
38
+ > DevUI is a **sample app** to help you get started with the Agent Framework. It is **not** intended for production use. For production, or for features beyond what is provided in this sample app, it is recommended that you build your own custom interface and API server using the Agent Framework SDK.
39
+
40
+ ![DevUI Screenshot](./docs/devuiscreen.png)
41
+
42
+ ## Quick Start
43
+
44
+ ```bash
45
+ # Install
46
+ pip install agent-framework-devui --pre
47
+ ```
48
+
49
+ You can also launch it programmatically
50
+
51
+ ```python
52
+ from agent_framework import ChatAgent
53
+ from agent_framework.openai import OpenAIChatClient
54
+ from agent_framework.devui import serve
55
+
56
+ def get_weather(location: str) -> str:
57
+ """Get weather for a location."""
58
+ return f"Weather in {location}: 72°F and sunny"
59
+
60
+ # Create your agent
61
+ agent = ChatAgent(
62
+ name="WeatherAgent",
63
+ chat_client=OpenAIChatClient(),
64
+ tools=[get_weather]
65
+ )
66
+
67
+ # Launch debug UI - that's it!
68
+ serve(entities=[agent], auto_open=True)
69
+ # → Opens browser to http://localhost:8080
70
+ ```
71
+
72
+ In addition, if you have agents/workflows defined in a specific directory structure (see below), you can launch DevUI from the _cli_ to discover and run them.
73
+
74
+ ```bash
75
+
76
+ # Launch web UI + API server
77
+ devui ./agents --port 8080
78
+ # → Web UI: http://localhost:8080
79
+ # → API: http://localhost:8080/v1/*
80
+ ```
81
+
82
+ When DevUI starts with no discovered entities, it displays a **sample entity gallery** with curated examples from the Agent Framework repository. You can download these samples, review them, and run them locally to get started quickly.
83
+
84
+ ## Directory Structure
85
+
86
+ For your agents to be discovered by the DevUI, they must be organized in a directory structure like below. Each agent/workflow must have an `__init__.py` that exports the required variable (`agent` or `workflow`).
87
+
88
+ **Note**: `.env` files are optional but will be automatically loaded if present in the agent/workflow directory or parent entities directory. Use them to store API keys, configuration variables, and other environment-specific settings.
89
+
90
+ ```
91
+ agents/
92
+ ├── weather_agent/
93
+ │ ├── __init__.py # Must export: agent = ChatAgent(...)
94
+ │ ├── agent.py
95
+ │ └── .env # Optional: API keys, config vars
96
+ ├── my_workflow/
97
+ │ ├── __init__.py # Must export: workflow = WorkflowBuilder()...
98
+ │ ├── workflow.py
99
+ │ └── .env # Optional: environment variables
100
+ └── .env # Optional: shared environment variables
101
+ ```
102
+
103
+ ## Viewing Telemetry (Otel Traces) in DevUI
104
+
105
+ Agent Framework emits OpenTelemetry (Otel) traces for various operations. You can view these traces in DevUI by enabling tracing when starting the server.
106
+
107
+ ```bash
108
+ devui ./agents --tracing framework
109
+ ```
110
+
111
+ ## OpenAI-Compatible API
112
+
113
+ For convenience, DevUI provides an OpenAI Responses backend API. This means you can run the backend and also use the OpenAI client sdk to connect to it. Use **agent/workflow name as the model**, and set streaming to `True` as needed.
114
+
115
+ ```bash
116
+ # Simple - use your entity name as the model
117
+ curl -X POST http://localhost:8080/v1/responses \
118
+ -H "Content-Type: application/json" \
119
+ -d @- << 'EOF'
120
+ {
121
+ "model": "weather_agent",
122
+ "input": "Hello world"
123
+ }
124
+ ```
125
+
126
+ Or use the OpenAI Python SDK:
127
+
128
+ ```python
129
+ from openai import OpenAI
130
+
131
+ client = OpenAI(
132
+ base_url="http://localhost:8080/v1",
133
+ api_key="not-needed" # API key not required for local DevUI
134
+ )
135
+
136
+ response = client.responses.create(
137
+ model="weather_agent", # Your agent/workflow name
138
+ input="What's the weather in Seattle?"
139
+ )
140
+
141
+ # Extract text from response
142
+ print(response.output[0].content[0].text)
143
+ # Supports streaming with stream=True
144
+ ```
145
+
146
+ ### Multi-turn Conversations
147
+
148
+ Use the standard OpenAI `conversation` parameter for multi-turn conversations:
149
+
150
+ ```python
151
+ # Create a conversation
152
+ conversation = client.conversations.create(
153
+ metadata={"agent_id": "weather_agent"}
154
+ )
155
+
156
+ # Use it across multiple turns
157
+ response1 = client.responses.create(
158
+ model="weather_agent",
159
+ input="What's the weather in Seattle?",
160
+ conversation=conversation.id
161
+ )
162
+
163
+ response2 = client.responses.create(
164
+ model="weather_agent",
165
+ input="How about tomorrow?",
166
+ conversation=conversation.id # Continues the conversation!
167
+ )
168
+ ```
169
+
170
+ **How it works:** DevUI automatically retrieves the conversation's message history from the stored thread and passes it to the agent. You don't need to manually manage message history - just provide the same `conversation` ID for follow-up requests.
171
+
172
+ ## CLI Options
173
+
174
+ ```bash
175
+ devui [directory] [options]
176
+
177
+ Options:
178
+ --port, -p Port (default: 8080)
179
+ --host Host (default: 127.0.0.1)
180
+ --headless API only, no UI
181
+ --config YAML config file
182
+ --tracing none|framework|workflow|all
183
+ --reload Enable auto-reload
184
+ ```
185
+
186
+ ## Key Endpoints
187
+
188
+ ## API Mapping
189
+
190
+ Given that DevUI offers an OpenAI Responses API, it internally maps messages and events from Agent Framework to OpenAI Responses API events (in `_mapper.py`). For transparency, this mapping is shown below:
191
+
192
+ | Agent Framework Content | OpenAI Event/Type | Status |
193
+ | ------------------------------- | ---------------------------------------- | -------- |
194
+ | `TextContent` | `response.output_text.delta` | Standard |
195
+ | `TextReasoningContent` | `response.reasoning_text.delta` | Standard |
196
+ | `FunctionCallContent` (initial) | `response.output_item.added` | Standard |
197
+ | `FunctionCallContent` (args) | `response.function_call_arguments.delta` | Standard |
198
+ | `FunctionResultContent` | `response.function_result.complete` | DevUI |
199
+ | `FunctionApprovalRequestContent`| `response.function_approval.requested` | DevUI |
200
+ | `FunctionApprovalResponseContent`| `response.function_approval.responded` | DevUI |
201
+ | `ErrorContent` | `error` | Standard |
202
+ | `UsageContent` | Final `Response.usage` field (not streamed) | Standard |
203
+ | `WorkflowEvent` | `response.workflow_event.complete` | DevUI |
204
+ | `DataContent` | `response.trace.complete` | DevUI |
205
+ | `UriContent` | `response.trace.complete` | DevUI |
206
+ | `HostedFileContent` | `response.trace.complete` | DevUI |
207
+ | `HostedVectorStoreContent` | `response.trace.complete` | DevUI |
208
+
209
+ - **Standard** = OpenAI Responses API spec
210
+ - **DevUI** = Custom extensions for Agent Framework features (workflows, traces, function approvals)
211
+
212
+ ### OpenAI Responses API Compliance
213
+
214
+ DevUI follows the OpenAI Responses API specification for maximum compatibility:
215
+
216
+ **Standard OpenAI Types Used:**
217
+ - `ResponseOutputItemAddedEvent` - Output item notifications (function calls and results)
218
+ - `Response.usage` - Token usage (in final response, not streamed)
219
+ - All standard text, reasoning, and function call events
220
+
221
+ **Custom DevUI Extensions:**
222
+ - `response.function_approval.requested` - Function approval requests (for interactive approval workflows)
223
+ - `response.function_approval.responded` - Function approval responses (user approval/rejection)
224
+ - `response.workflow_event.complete` - Agent Framework workflow events
225
+ - `response.trace.complete` - Execution traces and internal content (DataContent, UriContent, hosted files/stores)
226
+
227
+ These custom extensions are clearly namespaced and can be safely ignored by standard OpenAI clients.
228
+
229
+ ### Entity Management
230
+
231
+ - `GET /v1/entities` - List discovered agents/workflows
232
+ - `GET /v1/entities/{entity_id}/info` - Get detailed entity information
233
+ - `POST /v1/entities/{entity_id}/reload` - Hot reload entity (for development)
234
+
235
+ ### Execution (OpenAI Responses API)
236
+
237
+ - `POST /v1/responses` - Execute agent/workflow (streaming or sync)
238
+
239
+ ### Conversations (OpenAI Standard)
240
+
241
+ - `POST /v1/conversations` - Create conversation
242
+ - `GET /v1/conversations/{id}` - Get conversation
243
+ - `POST /v1/conversations/{id}` - Update conversation metadata
244
+ - `DELETE /v1/conversations/{id}` - Delete conversation
245
+ - `GET /v1/conversations?agent_id={id}` - List conversations _(DevUI extension)_
246
+ - `POST /v1/conversations/{id}/items` - Add items to conversation
247
+ - `GET /v1/conversations/{id}/items` - List conversation items
248
+ - `GET /v1/conversations/{id}/items/{item_id}` - Get conversation item
249
+
250
+ ### Health
251
+
252
+ - `GET /health` - Health check
253
+
254
+ ## Security
255
+
256
+ DevUI is designed as a **sample application for local development** and should not be exposed to untrusted networks or used in production environments.
257
+
258
+ **Security features:**
259
+ - Only loads entities from local directories or in-memory registration
260
+ - No remote code execution capabilities
261
+ - Binds to localhost (127.0.0.1) by default
262
+ - All samples must be manually downloaded and reviewed before running
263
+
264
+ **Best practices:**
265
+ - Never expose DevUI to the internet
266
+ - Review all agent/workflow code before running
267
+ - Only load entities from trusted sources
268
+ - Use `.env` files for sensitive credentials (never commit them)
269
+
270
+ ## Implementation
271
+
272
+ - **Discovery**: `agent_framework_devui/_discovery.py`
273
+ - **Execution**: `agent_framework_devui/_executor.py`
274
+ - **Message Mapping**: `agent_framework_devui/_mapper.py`
275
+ - **Conversations**: `agent_framework_devui/_conversations.py`
276
+ - **API Server**: `agent_framework_devui/_server.py`
277
+ - **CLI**: `agent_framework_devui/_cli.py`
278
+
279
+ ## Examples
280
+
281
+ See working implementations in `python/samples/getting_started/devui/`
282
+
283
+ ## License
284
+
285
+ MIT
286
+
@@ -0,0 +1,23 @@
1
+ agent_framework_devui/__init__.py,sha256=Hk2ddFHRvxe6Ytz59g2dKCs-wreG7pi7DuMgbUIeqiY,5079
2
+ agent_framework_devui/_cli.py,sha256=UnQ6xRfDnaZcDnlI2GCiFKjoZ1mkOqpPctEaZ9Zyhxc,4604
3
+ agent_framework_devui/_conversations.py,sha256=TvnQgc9sCRf-kcLnMjmIqjfi7zqqK-5fWjZvJOWErOY,18045
4
+ agent_framework_devui/_discovery.py,sha256=rltt4CpucOVKDfNBVUkeJkUrL_RDUNqYUWZbxDT16CM,29543
5
+ agent_framework_devui/_executor.py,sha256=usK3EpgHnuMaEhW20wahltZqgR8dTmBT_d_nSPskI48,28117
6
+ agent_framework_devui/_mapper.py,sha256=YDXFogVnA_JzvSez2J4e5OneNTSMkVtvWq6FIcUF5TU,32843
7
+ agent_framework_devui/_server.py,sha256=DSYUXABRTzI3hFK_Qjug6fy3abcao6UDvgP66deSFvQ,26792
8
+ agent_framework_devui/_session.py,sha256=VgmCeT3XBNds4JCCbZeH9gruGdyfUdnVgJH_DRMLNm4,6039
9
+ agent_framework_devui/_tracing.py,sha256=ZoYKYomFB0VjiEBFgPsSu2ocpnPushWczKl5QndSUjQ,6152
10
+ agent_framework_devui/_utils.py,sha256=c7uDVhCy0s0Q38OdjvYdu0XWA-mRPEndVkcpduoXFxA,18171
11
+ agent_framework_devui/models/__init__.py,sha256=Ajo8XLK-HSlCim_TSBA5rI_SihfozaN4MFR08Kz27Ew,2280
12
+ agent_framework_devui/models/_discovery_models.py,sha256=V78TKx8Oq6Zo1zggI6XcQ7U95OOQ8rGQckprAGH5sRM,1637
13
+ agent_framework_devui/models/_openai_custom.py,sha256=8-Eq7IQXAmQFKXXoqQA3hzdtvSc-xypU8cdR4hBuSj8,5317
14
+ agent_framework_devui/ui/agentframework.svg,sha256=ViWg7Wee6B3X4_yVOhgmuLBtEmWx2L48Q8QSmtbYQT0,5361
15
+ agent_framework_devui/ui/index.html,sha256=Yf7FYC4QNYqSzFivEF9FYgM8xleYb3MAD_teoTv8W10,479
16
+ agent_framework_devui/ui/vite.svg,sha256=SnSK_UQ5GLsWWRyDTEAdrjPoeGGrXbrQgRw6O0qSFPs,1497
17
+ agent_framework_devui/ui/assets/index-CE4pGoXh.css,sha256=0GntI9ZABqCobFN-5_G-S8AVDFGgGcHtcZYz4Uctrrk,97732
18
+ agent_framework_devui/ui/assets/index-DmL7WSFa.js,sha256=CZxdwlLsx7qlz_E57ELO3P64NFey-cCf6vp8fCtpLi0,722595
19
+ agent_framework_devui-1.0.0b251016.dist-info/entry_points.txt,sha256=H6Vq4nNyU8GryiFv215LfIF9pjVnow9Ono-pJzZ6zsI,52
20
+ agent_framework_devui-1.0.0b251016.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
21
+ agent_framework_devui-1.0.0b251016.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
22
+ agent_framework_devui-1.0.0b251016.dist-info/METADATA,sha256=1pxeD8YgOhR0PWc5ySa0ZEcapC322Gne3338Bh58ACE,11221
23
+ agent_framework_devui-1.0.0b251016.dist-info/RECORD,,