agent-framework-devui 1.0.0b251007__tar.gz → 1.0.0b251028__tar.gz
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.
- agent_framework_devui-1.0.0b251028/PKG-INFO +321 -0
- agent_framework_devui-1.0.0b251028/README.md +288 -0
- agent_framework_devui-1.0.0b251028/agent_framework_devui/_conversations.py +473 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/agent_framework_devui/_discovery.py +295 -325
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/agent_framework_devui/_executor.py +115 -246
- agent_framework_devui-1.0.0b251028/agent_framework_devui/_mapper.py +1217 -0
- agent_framework_devui-1.0.0b251028/agent_framework_devui/_server.py +612 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/agent_framework_devui/_utils.py +150 -1
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/agent_framework_devui/models/__init__.py +21 -10
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/agent_framework_devui/models/_discovery_models.py +1 -2
- agent_framework_devui-1.0.0b251028/agent_framework_devui/models/_openai_custom.py +229 -0
- agent_framework_devui-1.0.0b251028/agent_framework_devui/ui/assets/index-CE4pGoXh.css +1 -0
- agent_framework_devui-1.0.0b251028/agent_framework_devui/ui/assets/index-D_Y1oSGu.js +577 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/agent_framework_devui/ui/index.html +2 -2
- agent_framework_devui-1.0.0b251028/dev.md +164 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/package.json +3 -2
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/App.tsx +169 -253
- agent_framework_devui-1.0.0b251028/frontend/src/components/features/agent/agent-view.tsx +1450 -0
- agent_framework_devui-1.0.0b251028/frontend/src/components/features/agent/index.ts +7 -0
- agent_framework_devui-1.0.0b251028/frontend/src/components/features/agent/message-renderers/OpenAIContentRenderer.tsx +262 -0
- agent_framework_devui-1.0.0b251028/frontend/src/components/features/agent/message-renderers/OpenAIMessageRenderer.tsx +77 -0
- agent_framework_devui-1.0.0b251028/frontend/src/components/features/agent/message-renderers/index.ts +7 -0
- {agent_framework_devui-1.0.0b251007/frontend/src/components → agent_framework_devui-1.0.0b251028/frontend/src/components/features}/gallery/gallery-view.tsx +77 -177
- agent_framework_devui-1.0.0b251028/frontend/src/components/features/gallery/setup-instructions-modal.tsx +207 -0
- agent_framework_devui-1.0.0b251028/frontend/src/components/features/workflow/index.ts +9 -0
- {agent_framework_devui-1.0.0b251007/frontend/src/components → agent_framework_devui-1.0.0b251028/frontend/src/components/features}/workflow/workflow-flow.tsx +5 -5
- {agent_framework_devui-1.0.0b251007/frontend/src/components → agent_framework_devui-1.0.0b251028/frontend/src/components/features}/workflow/workflow-input-form.tsx +17 -10
- {agent_framework_devui-1.0.0b251007/frontend/src/components → agent_framework_devui-1.0.0b251028/frontend/src/components/features}/workflow/workflow-view.tsx +451 -71
- {agent_framework_devui-1.0.0b251007/frontend/src/components/shared → agent_framework_devui-1.0.0b251028/frontend/src/components/layout}/app-header.tsx +2 -5
- {agent_framework_devui-1.0.0b251007/frontend/src/components/shared → agent_framework_devui-1.0.0b251028/frontend/src/components/layout}/debug-panel.tsx +428 -172
- agent_framework_devui-1.0.0b251028/frontend/src/components/layout/deployment-modal.tsx +519 -0
- {agent_framework_devui-1.0.0b251007/frontend/src/components/shared → agent_framework_devui-1.0.0b251028/frontend/src/components/layout}/entity-selector.tsx +20 -95
- agent_framework_devui-1.0.0b251028/frontend/src/components/layout/index.ts +10 -0
- {agent_framework_devui-1.0.0b251007/frontend/src/components/shared → agent_framework_devui-1.0.0b251028/frontend/src/components/layout}/settings-modal.tsx +34 -34
- agent_framework_devui-1.0.0b251028/frontend/src/components/ui/alert.tsx +48 -0
- agent_framework_devui-1.0.0b251028/frontend/src/components/ui/markdown-renderer.tsx +565 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/data/gallery/sample-entities.ts +4 -34
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/services/api.ts +109 -111
- agent_framework_devui-1.0.0b251028/frontend/src/stores/devuiStore.ts +309 -0
- agent_framework_devui-1.0.0b251028/frontend/src/stores/index.ts +5 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/types/agent-framework.ts +26 -5
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/types/index.ts +30 -16
- agent_framework_devui-1.0.0b251028/frontend/src/types/openai.ts +435 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/types/workflow.ts +8 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/utils/simple-layout.ts +1 -1
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/utils/workflow-utils.ts +71 -4
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/vite.config.ts +0 -10
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/yarn.lock +10 -5
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/pyproject.toml +1 -1
- agent_framework_devui-1.0.0b251028/samples/README.md +38 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/tests/capture_messages.py +14 -71
- agent_framework_devui-1.0.0b251028/tests/test_conversations.py +335 -0
- agent_framework_devui-1.0.0b251028/tests/test_discovery.py +367 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/tests/test_execution.py +78 -17
- agent_framework_devui-1.0.0b251028/tests/test_mapper.py +445 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/tests/test_server.py +116 -14
- agent_framework_devui-1.0.0b251007/PKG-INFO +0 -172
- agent_framework_devui-1.0.0b251007/README.md +0 -139
- agent_framework_devui-1.0.0b251007/agent_framework_devui/_mapper.py +0 -558
- agent_framework_devui-1.0.0b251007/agent_framework_devui/_server.py +0 -577
- agent_framework_devui-1.0.0b251007/agent_framework_devui/models/_openai_custom.py +0 -209
- agent_framework_devui-1.0.0b251007/agent_framework_devui/ui/assets/index-D0SfShuZ.js +0 -445
- agent_framework_devui-1.0.0b251007/agent_framework_devui/ui/assets/index-WsCIE0bH.css +0 -1
- agent_framework_devui-1.0.0b251007/dev.md +0 -132
- agent_framework_devui-1.0.0b251007/frontend/src/components/agent/agent-view.tsx +0 -1192
- agent_framework_devui-1.0.0b251007/frontend/src/components/message_renderer/ContentRenderer.tsx +0 -331
- agent_framework_devui-1.0.0b251007/frontend/src/components/message_renderer/MessageRenderer.tsx +0 -38
- agent_framework_devui-1.0.0b251007/frontend/src/components/message_renderer/StreamingRenderer.tsx +0 -114
- agent_framework_devui-1.0.0b251007/frontend/src/components/message_renderer/index.ts +0 -8
- agent_framework_devui-1.0.0b251007/frontend/src/components/message_renderer/types.ts +0 -48
- agent_framework_devui-1.0.0b251007/frontend/src/types/openai.ts +0 -228
- agent_framework_devui-1.0.0b251007/samples/fanout_workflow/__init__.py +0 -3
- agent_framework_devui-1.0.0b251007/samples/fanout_workflow/workflow.py +0 -700
- agent_framework_devui-1.0.0b251007/samples/foundry_agent/__init__.py +0 -7
- agent_framework_devui-1.0.0b251007/samples/foundry_agent/agent.py +0 -81
- agent_framework_devui-1.0.0b251007/samples/in_memory_mode.py +0 -71
- agent_framework_devui-1.0.0b251007/samples/spam_workflow/__init__.py +0 -7
- agent_framework_devui-1.0.0b251007/samples/spam_workflow/workflow.py +0 -333
- agent_framework_devui-1.0.0b251007/samples/weather_agent/__init__.py +0 -7
- agent_framework_devui-1.0.0b251007/samples/weather_agent/agent.py +0 -69
- agent_framework_devui-1.0.0b251007/samples/weather_agent_azure/__init__.py +0 -7
- agent_framework_devui-1.0.0b251007/samples/weather_agent_azure/agent.py +0 -133
- agent_framework_devui-1.0.0b251007/samples/workflow_agents/__init__.py +0 -7
- agent_framework_devui-1.0.0b251007/samples/workflow_agents/workflow.py +0 -167
- agent_framework_devui-1.0.0b251007/tests/test_discovery.py +0 -99
- agent_framework_devui-1.0.0b251007/tests/test_mapper.py +0 -186
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/.gitignore +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/LICENSE +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/agent_framework_devui/__init__.py +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/agent_framework_devui/_cli.py +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/agent_framework_devui/_session.py +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/agent_framework_devui/_tracing.py +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/agent_framework_devui/ui/agentframework.svg +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/agent_framework_devui/ui/vite.svg +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/docs/devuiscreen.png +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/.gitignore +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/README.md +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/components.json +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/eslint.config.js +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/index.html +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/public/agentframework.svg +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/public/vite.svg +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/App.css +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/assets/react.svg +0 -0
- {agent_framework_devui-1.0.0b251007/frontend/src/components/shared → agent_framework_devui-1.0.0b251028/frontend/src/components/features/agent}/agent-details-modal.tsx +0 -0
- {agent_framework_devui-1.0.0b251007/frontend/src/components → agent_framework_devui-1.0.0b251028/frontend/src/components/features}/gallery/index.ts +0 -0
- {agent_framework_devui-1.0.0b251007/frontend/src/components → agent_framework_devui-1.0.0b251028/frontend/src/components/features}/workflow/executor-node.tsx +0 -0
- {agent_framework_devui-1.0.0b251007/frontend/src/components/shared → agent_framework_devui-1.0.0b251028/frontend/src/components/features/workflow}/workflow-details-modal.tsx +0 -0
- {agent_framework_devui-1.0.0b251007/frontend/src/components/shared → agent_framework_devui-1.0.0b251028/frontend/src/components/layout}/about-modal.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/mode-toggle.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/theme-provider.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/attachment-gallery.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/badge.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/button.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/card.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/checkbox.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/dialog.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/dropdown-menu.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/file-upload.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/input.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/label.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/loading-spinner.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/loading-state.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/scroll-area.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/select.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/tabs.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/textarea.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/components/ui/toast.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/data/gallery/index.ts +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/hooks/useWorkflowEventCorrelation.ts +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/index.css +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/lib/utils.ts +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/main.tsx +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/src/vite-env.d.ts +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/tsconfig.app.json +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/tsconfig.json +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/frontend/tsconfig.node.json +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/samples/__init__.py +0 -0
- {agent_framework_devui-1.0.0b251007 → agent_framework_devui-1.0.0b251028}/tests/test_schema_generation.py +0 -0
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agent-framework-devui
|
|
3
|
+
Version: 1.0.0b251028
|
|
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
|
+

|
|
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
|
+
## Using MCP Tools
|
|
85
|
+
|
|
86
|
+
**Important:** Don't use `async with` context managers when creating agents with MCP tools for DevUI - connections will close before execution.
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
# ✅ Correct - DevUI handles cleanup automatically
|
|
90
|
+
mcp_tool = MCPStreamableHTTPTool(url="http://localhost:8011/mcp", chat_client=chat_client)
|
|
91
|
+
agent = ChatAgent(tools=mcp_tool)
|
|
92
|
+
serve(entities=[agent])
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
MCP tools use lazy initialization and connect automatically on first use. DevUI attempts to clean up connections on shutdown
|
|
96
|
+
|
|
97
|
+
## Directory Structure
|
|
98
|
+
|
|
99
|
+
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`).
|
|
100
|
+
|
|
101
|
+
**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.
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
agents/
|
|
105
|
+
├── weather_agent/
|
|
106
|
+
│ ├── __init__.py # Must export: agent = ChatAgent(...)
|
|
107
|
+
│ ├── agent.py
|
|
108
|
+
│ └── .env # Optional: API keys, config vars
|
|
109
|
+
├── my_workflow/
|
|
110
|
+
│ ├── __init__.py # Must export: workflow = WorkflowBuilder()...
|
|
111
|
+
│ ├── workflow.py
|
|
112
|
+
│ └── .env # Optional: environment variables
|
|
113
|
+
└── .env # Optional: shared environment variables
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Viewing Telemetry (Otel Traces) in DevUI
|
|
117
|
+
|
|
118
|
+
Agent Framework emits OpenTelemetry (Otel) traces for various operations. You can view these traces in DevUI by enabling tracing when starting the server.
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
devui ./agents --tracing framework
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## OpenAI-Compatible API
|
|
125
|
+
|
|
126
|
+
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.
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Simple - use your entity name as the model
|
|
130
|
+
curl -X POST http://localhost:8080/v1/responses \
|
|
131
|
+
-H "Content-Type: application/json" \
|
|
132
|
+
-d @- << 'EOF'
|
|
133
|
+
{
|
|
134
|
+
"model": "weather_agent",
|
|
135
|
+
"input": "Hello world"
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Or use the OpenAI Python SDK:
|
|
140
|
+
|
|
141
|
+
```python
|
|
142
|
+
from openai import OpenAI
|
|
143
|
+
|
|
144
|
+
client = OpenAI(
|
|
145
|
+
base_url="http://localhost:8080/v1",
|
|
146
|
+
api_key="not-needed" # API key not required for local DevUI
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
response = client.responses.create(
|
|
150
|
+
model="weather_agent", # Your agent/workflow name
|
|
151
|
+
input="What's the weather in Seattle?"
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
# Extract text from response
|
|
155
|
+
print(response.output[0].content[0].text)
|
|
156
|
+
# Supports streaming with stream=True
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Multi-turn Conversations
|
|
160
|
+
|
|
161
|
+
Use the standard OpenAI `conversation` parameter for multi-turn conversations:
|
|
162
|
+
|
|
163
|
+
```python
|
|
164
|
+
# Create a conversation
|
|
165
|
+
conversation = client.conversations.create(
|
|
166
|
+
metadata={"agent_id": "weather_agent"}
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
# Use it across multiple turns
|
|
170
|
+
response1 = client.responses.create(
|
|
171
|
+
model="weather_agent",
|
|
172
|
+
input="What's the weather in Seattle?",
|
|
173
|
+
conversation=conversation.id
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
response2 = client.responses.create(
|
|
177
|
+
model="weather_agent",
|
|
178
|
+
input="How about tomorrow?",
|
|
179
|
+
conversation=conversation.id # Continues the conversation!
|
|
180
|
+
)
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**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.
|
|
184
|
+
|
|
185
|
+
## CLI Options
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
devui [directory] [options]
|
|
189
|
+
|
|
190
|
+
Options:
|
|
191
|
+
--port, -p Port (default: 8080)
|
|
192
|
+
--host Host (default: 127.0.0.1)
|
|
193
|
+
--headless API only, no UI
|
|
194
|
+
--config YAML config file
|
|
195
|
+
--tracing none|framework|workflow|all
|
|
196
|
+
--reload Enable auto-reload
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## Key Endpoints
|
|
200
|
+
|
|
201
|
+
## API Mapping
|
|
202
|
+
|
|
203
|
+
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:
|
|
204
|
+
|
|
205
|
+
| OpenAI Event/Type | Agent Framework Content | Status |
|
|
206
|
+
| ------------------------------------------------------------ | --------------------------------- | -------- |
|
|
207
|
+
| | **Lifecycle Events** | |
|
|
208
|
+
| `response.created` + `response.in_progress` | `AgentStartedEvent` | OpenAI |
|
|
209
|
+
| `response.completed` | `AgentCompletedEvent` | OpenAI |
|
|
210
|
+
| `response.failed` | `AgentFailedEvent` | OpenAI |
|
|
211
|
+
| `response.created` + `response.in_progress` | `WorkflowStartedEvent` | OpenAI |
|
|
212
|
+
| `response.completed` | `WorkflowCompletedEvent` | OpenAI |
|
|
213
|
+
| `response.failed` | `WorkflowFailedEvent` | OpenAI |
|
|
214
|
+
| | **Content Types** | |
|
|
215
|
+
| `response.content_part.added` + `response.output_text.delta` | `TextContent` | OpenAI |
|
|
216
|
+
| `response.reasoning_text.delta` | `TextReasoningContent` | OpenAI |
|
|
217
|
+
| `response.output_item.added` | `FunctionCallContent` (initial) | OpenAI |
|
|
218
|
+
| `response.function_call_arguments.delta` | `FunctionCallContent` (args) | OpenAI |
|
|
219
|
+
| `response.function_result.complete` | `FunctionResultContent` | DevUI |
|
|
220
|
+
| `response.function_approval.requested` | `FunctionApprovalRequestContent` | DevUI |
|
|
221
|
+
| `response.function_approval.responded` | `FunctionApprovalResponseContent` | DevUI |
|
|
222
|
+
| `error` | `ErrorContent` | OpenAI |
|
|
223
|
+
| Final `Response.usage` field (not streamed) | `UsageContent` | OpenAI |
|
|
224
|
+
| | **Workflow Events** | |
|
|
225
|
+
| `response.output_item.added` (ExecutorActionItem)* | `ExecutorInvokedEvent` | OpenAI |
|
|
226
|
+
| `response.output_item.done` (ExecutorActionItem)* | `ExecutorCompletedEvent` | OpenAI |
|
|
227
|
+
| `response.output_item.done` (ExecutorActionItem with error)* | `ExecutorFailedEvent` | OpenAI |
|
|
228
|
+
| `response.workflow_event.complete` | `WorkflowEvent` (other) | DevUI |
|
|
229
|
+
| `response.trace.complete` | `WorkflowStatusEvent` | DevUI |
|
|
230
|
+
| `response.trace.complete` | `WorkflowWarningEvent` | DevUI |
|
|
231
|
+
| | **Trace Content** | |
|
|
232
|
+
| `response.trace.complete` | `DataContent` | DevUI |
|
|
233
|
+
| `response.trace.complete` | `UriContent` | DevUI |
|
|
234
|
+
| `response.trace.complete` | `HostedFileContent` | DevUI |
|
|
235
|
+
| `response.trace.complete` | `HostedVectorStoreContent` | DevUI |
|
|
236
|
+
|
|
237
|
+
\*Uses standard OpenAI event structure but carries DevUI-specific `ExecutorActionItem` payload
|
|
238
|
+
|
|
239
|
+
- **OpenAI** = Standard OpenAI Responses API event types
|
|
240
|
+
- **DevUI** = Custom event types specific to Agent Framework (e.g., workflows, traces, function approvals)
|
|
241
|
+
|
|
242
|
+
### OpenAI Responses API Compliance
|
|
243
|
+
|
|
244
|
+
DevUI follows the OpenAI Responses API specification for maximum compatibility:
|
|
245
|
+
|
|
246
|
+
**OpenAI Standard Event Types Used:**
|
|
247
|
+
|
|
248
|
+
- `ResponseOutputItemAddedEvent` - Output item notifications (function calls and results)
|
|
249
|
+
- `ResponseOutputItemDoneEvent` - Output item completion notifications
|
|
250
|
+
- `Response.usage` - Token usage (in final response, not streamed)
|
|
251
|
+
- All standard text, reasoning, and function call events
|
|
252
|
+
|
|
253
|
+
**Custom DevUI Extensions:**
|
|
254
|
+
|
|
255
|
+
- `response.function_approval.requested` - Function approval requests (for interactive approval workflows)
|
|
256
|
+
- `response.function_approval.responded` - Function approval responses (user approval/rejection)
|
|
257
|
+
- `response.workflow_event.complete` - Agent Framework workflow events
|
|
258
|
+
- `response.trace.complete` - Execution traces and internal content (DataContent, UriContent, hosted files/stores)
|
|
259
|
+
|
|
260
|
+
These custom extensions are clearly namespaced and can be safely ignored by standard OpenAI clients. Note that DevUI also uses standard OpenAI events with custom payloads (e.g., `ExecutorActionItem` within `response.output_item.added`).
|
|
261
|
+
|
|
262
|
+
### Entity Management
|
|
263
|
+
|
|
264
|
+
- `GET /v1/entities` - List discovered agents/workflows
|
|
265
|
+
- `GET /v1/entities/{entity_id}/info` - Get detailed entity information
|
|
266
|
+
- `POST /v1/entities/{entity_id}/reload` - Hot reload entity (for development)
|
|
267
|
+
|
|
268
|
+
### Execution (OpenAI Responses API)
|
|
269
|
+
|
|
270
|
+
- `POST /v1/responses` - Execute agent/workflow (streaming or sync)
|
|
271
|
+
|
|
272
|
+
### Conversations (OpenAI Standard)
|
|
273
|
+
|
|
274
|
+
- `POST /v1/conversations` - Create conversation
|
|
275
|
+
- `GET /v1/conversations/{id}` - Get conversation
|
|
276
|
+
- `POST /v1/conversations/{id}` - Update conversation metadata
|
|
277
|
+
- `DELETE /v1/conversations/{id}` - Delete conversation
|
|
278
|
+
- `GET /v1/conversations?agent_id={id}` - List conversations _(DevUI extension)_
|
|
279
|
+
- `POST /v1/conversations/{id}/items` - Add items to conversation
|
|
280
|
+
- `GET /v1/conversations/{id}/items` - List conversation items
|
|
281
|
+
- `GET /v1/conversations/{id}/items/{item_id}` - Get conversation item
|
|
282
|
+
|
|
283
|
+
### Health
|
|
284
|
+
|
|
285
|
+
- `GET /health` - Health check
|
|
286
|
+
|
|
287
|
+
## Security
|
|
288
|
+
|
|
289
|
+
DevUI is designed as a **sample application for local development** and should not be exposed to untrusted networks or used in production environments.
|
|
290
|
+
|
|
291
|
+
**Security features:**
|
|
292
|
+
|
|
293
|
+
- Only loads entities from local directories or in-memory registration
|
|
294
|
+
- No remote code execution capabilities
|
|
295
|
+
- Binds to localhost (127.0.0.1) by default
|
|
296
|
+
- All samples must be manually downloaded and reviewed before running
|
|
297
|
+
|
|
298
|
+
**Best practices:**
|
|
299
|
+
|
|
300
|
+
- Never expose DevUI to the internet
|
|
301
|
+
- Review all agent/workflow code before running
|
|
302
|
+
- Only load entities from trusted sources
|
|
303
|
+
- Use `.env` files for sensitive credentials (never commit them)
|
|
304
|
+
|
|
305
|
+
## Implementation
|
|
306
|
+
|
|
307
|
+
- **Discovery**: `agent_framework_devui/_discovery.py`
|
|
308
|
+
- **Execution**: `agent_framework_devui/_executor.py`
|
|
309
|
+
- **Message Mapping**: `agent_framework_devui/_mapper.py`
|
|
310
|
+
- **Conversations**: `agent_framework_devui/_conversations.py`
|
|
311
|
+
- **API Server**: `agent_framework_devui/_server.py`
|
|
312
|
+
- **CLI**: `agent_framework_devui/_cli.py`
|
|
313
|
+
|
|
314
|
+
## Examples
|
|
315
|
+
|
|
316
|
+
See working implementations in `python/samples/getting_started/devui/`
|
|
317
|
+
|
|
318
|
+
## License
|
|
319
|
+
|
|
320
|
+
MIT
|
|
321
|
+
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
# DevUI - A Sample App for Running Agents and Workflows
|
|
2
|
+
|
|
3
|
+
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**.
|
|
4
|
+
|
|
5
|
+
> [!IMPORTANT]
|
|
6
|
+
> 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.
|
|
7
|
+
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Install
|
|
14
|
+
pip install agent-framework-devui --pre
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
You can also launch it programmatically
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from agent_framework import ChatAgent
|
|
21
|
+
from agent_framework.openai import OpenAIChatClient
|
|
22
|
+
from agent_framework.devui import serve
|
|
23
|
+
|
|
24
|
+
def get_weather(location: str) -> str:
|
|
25
|
+
"""Get weather for a location."""
|
|
26
|
+
return f"Weather in {location}: 72°F and sunny"
|
|
27
|
+
|
|
28
|
+
# Create your agent
|
|
29
|
+
agent = ChatAgent(
|
|
30
|
+
name="WeatherAgent",
|
|
31
|
+
chat_client=OpenAIChatClient(),
|
|
32
|
+
tools=[get_weather]
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
# Launch debug UI - that's it!
|
|
36
|
+
serve(entities=[agent], auto_open=True)
|
|
37
|
+
# → Opens browser to http://localhost:8080
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
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.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
|
|
44
|
+
# Launch web UI + API server
|
|
45
|
+
devui ./agents --port 8080
|
|
46
|
+
# → Web UI: http://localhost:8080
|
|
47
|
+
# → API: http://localhost:8080/v1/*
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
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.
|
|
51
|
+
|
|
52
|
+
## Using MCP Tools
|
|
53
|
+
|
|
54
|
+
**Important:** Don't use `async with` context managers when creating agents with MCP tools for DevUI - connections will close before execution.
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
# ✅ Correct - DevUI handles cleanup automatically
|
|
58
|
+
mcp_tool = MCPStreamableHTTPTool(url="http://localhost:8011/mcp", chat_client=chat_client)
|
|
59
|
+
agent = ChatAgent(tools=mcp_tool)
|
|
60
|
+
serve(entities=[agent])
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
MCP tools use lazy initialization and connect automatically on first use. DevUI attempts to clean up connections on shutdown
|
|
64
|
+
|
|
65
|
+
## Directory Structure
|
|
66
|
+
|
|
67
|
+
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`).
|
|
68
|
+
|
|
69
|
+
**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.
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
agents/
|
|
73
|
+
├── weather_agent/
|
|
74
|
+
│ ├── __init__.py # Must export: agent = ChatAgent(...)
|
|
75
|
+
│ ├── agent.py
|
|
76
|
+
│ └── .env # Optional: API keys, config vars
|
|
77
|
+
├── my_workflow/
|
|
78
|
+
│ ├── __init__.py # Must export: workflow = WorkflowBuilder()...
|
|
79
|
+
│ ├── workflow.py
|
|
80
|
+
│ └── .env # Optional: environment variables
|
|
81
|
+
└── .env # Optional: shared environment variables
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Viewing Telemetry (Otel Traces) in DevUI
|
|
85
|
+
|
|
86
|
+
Agent Framework emits OpenTelemetry (Otel) traces for various operations. You can view these traces in DevUI by enabling tracing when starting the server.
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
devui ./agents --tracing framework
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## OpenAI-Compatible API
|
|
93
|
+
|
|
94
|
+
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.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Simple - use your entity name as the model
|
|
98
|
+
curl -X POST http://localhost:8080/v1/responses \
|
|
99
|
+
-H "Content-Type: application/json" \
|
|
100
|
+
-d @- << 'EOF'
|
|
101
|
+
{
|
|
102
|
+
"model": "weather_agent",
|
|
103
|
+
"input": "Hello world"
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Or use the OpenAI Python SDK:
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
from openai import OpenAI
|
|
111
|
+
|
|
112
|
+
client = OpenAI(
|
|
113
|
+
base_url="http://localhost:8080/v1",
|
|
114
|
+
api_key="not-needed" # API key not required for local DevUI
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
response = client.responses.create(
|
|
118
|
+
model="weather_agent", # Your agent/workflow name
|
|
119
|
+
input="What's the weather in Seattle?"
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
# Extract text from response
|
|
123
|
+
print(response.output[0].content[0].text)
|
|
124
|
+
# Supports streaming with stream=True
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Multi-turn Conversations
|
|
128
|
+
|
|
129
|
+
Use the standard OpenAI `conversation` parameter for multi-turn conversations:
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
# Create a conversation
|
|
133
|
+
conversation = client.conversations.create(
|
|
134
|
+
metadata={"agent_id": "weather_agent"}
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
# Use it across multiple turns
|
|
138
|
+
response1 = client.responses.create(
|
|
139
|
+
model="weather_agent",
|
|
140
|
+
input="What's the weather in Seattle?",
|
|
141
|
+
conversation=conversation.id
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
response2 = client.responses.create(
|
|
145
|
+
model="weather_agent",
|
|
146
|
+
input="How about tomorrow?",
|
|
147
|
+
conversation=conversation.id # Continues the conversation!
|
|
148
|
+
)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**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.
|
|
152
|
+
|
|
153
|
+
## CLI Options
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
devui [directory] [options]
|
|
157
|
+
|
|
158
|
+
Options:
|
|
159
|
+
--port, -p Port (default: 8080)
|
|
160
|
+
--host Host (default: 127.0.0.1)
|
|
161
|
+
--headless API only, no UI
|
|
162
|
+
--config YAML config file
|
|
163
|
+
--tracing none|framework|workflow|all
|
|
164
|
+
--reload Enable auto-reload
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Key Endpoints
|
|
168
|
+
|
|
169
|
+
## API Mapping
|
|
170
|
+
|
|
171
|
+
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:
|
|
172
|
+
|
|
173
|
+
| OpenAI Event/Type | Agent Framework Content | Status |
|
|
174
|
+
| ------------------------------------------------------------ | --------------------------------- | -------- |
|
|
175
|
+
| | **Lifecycle Events** | |
|
|
176
|
+
| `response.created` + `response.in_progress` | `AgentStartedEvent` | OpenAI |
|
|
177
|
+
| `response.completed` | `AgentCompletedEvent` | OpenAI |
|
|
178
|
+
| `response.failed` | `AgentFailedEvent` | OpenAI |
|
|
179
|
+
| `response.created` + `response.in_progress` | `WorkflowStartedEvent` | OpenAI |
|
|
180
|
+
| `response.completed` | `WorkflowCompletedEvent` | OpenAI |
|
|
181
|
+
| `response.failed` | `WorkflowFailedEvent` | OpenAI |
|
|
182
|
+
| | **Content Types** | |
|
|
183
|
+
| `response.content_part.added` + `response.output_text.delta` | `TextContent` | OpenAI |
|
|
184
|
+
| `response.reasoning_text.delta` | `TextReasoningContent` | OpenAI |
|
|
185
|
+
| `response.output_item.added` | `FunctionCallContent` (initial) | OpenAI |
|
|
186
|
+
| `response.function_call_arguments.delta` | `FunctionCallContent` (args) | OpenAI |
|
|
187
|
+
| `response.function_result.complete` | `FunctionResultContent` | DevUI |
|
|
188
|
+
| `response.function_approval.requested` | `FunctionApprovalRequestContent` | DevUI |
|
|
189
|
+
| `response.function_approval.responded` | `FunctionApprovalResponseContent` | DevUI |
|
|
190
|
+
| `error` | `ErrorContent` | OpenAI |
|
|
191
|
+
| Final `Response.usage` field (not streamed) | `UsageContent` | OpenAI |
|
|
192
|
+
| | **Workflow Events** | |
|
|
193
|
+
| `response.output_item.added` (ExecutorActionItem)* | `ExecutorInvokedEvent` | OpenAI |
|
|
194
|
+
| `response.output_item.done` (ExecutorActionItem)* | `ExecutorCompletedEvent` | OpenAI |
|
|
195
|
+
| `response.output_item.done` (ExecutorActionItem with error)* | `ExecutorFailedEvent` | OpenAI |
|
|
196
|
+
| `response.workflow_event.complete` | `WorkflowEvent` (other) | DevUI |
|
|
197
|
+
| `response.trace.complete` | `WorkflowStatusEvent` | DevUI |
|
|
198
|
+
| `response.trace.complete` | `WorkflowWarningEvent` | DevUI |
|
|
199
|
+
| | **Trace Content** | |
|
|
200
|
+
| `response.trace.complete` | `DataContent` | DevUI |
|
|
201
|
+
| `response.trace.complete` | `UriContent` | DevUI |
|
|
202
|
+
| `response.trace.complete` | `HostedFileContent` | DevUI |
|
|
203
|
+
| `response.trace.complete` | `HostedVectorStoreContent` | DevUI |
|
|
204
|
+
|
|
205
|
+
\*Uses standard OpenAI event structure but carries DevUI-specific `ExecutorActionItem` payload
|
|
206
|
+
|
|
207
|
+
- **OpenAI** = Standard OpenAI Responses API event types
|
|
208
|
+
- **DevUI** = Custom event types specific to Agent Framework (e.g., workflows, traces, function approvals)
|
|
209
|
+
|
|
210
|
+
### OpenAI Responses API Compliance
|
|
211
|
+
|
|
212
|
+
DevUI follows the OpenAI Responses API specification for maximum compatibility:
|
|
213
|
+
|
|
214
|
+
**OpenAI Standard Event Types Used:**
|
|
215
|
+
|
|
216
|
+
- `ResponseOutputItemAddedEvent` - Output item notifications (function calls and results)
|
|
217
|
+
- `ResponseOutputItemDoneEvent` - Output item completion notifications
|
|
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
|
+
|
|
223
|
+
- `response.function_approval.requested` - Function approval requests (for interactive approval workflows)
|
|
224
|
+
- `response.function_approval.responded` - Function approval responses (user approval/rejection)
|
|
225
|
+
- `response.workflow_event.complete` - Agent Framework workflow events
|
|
226
|
+
- `response.trace.complete` - Execution traces and internal content (DataContent, UriContent, hosted files/stores)
|
|
227
|
+
|
|
228
|
+
These custom extensions are clearly namespaced and can be safely ignored by standard OpenAI clients. Note that DevUI also uses standard OpenAI events with custom payloads (e.g., `ExecutorActionItem` within `response.output_item.added`).
|
|
229
|
+
|
|
230
|
+
### Entity Management
|
|
231
|
+
|
|
232
|
+
- `GET /v1/entities` - List discovered agents/workflows
|
|
233
|
+
- `GET /v1/entities/{entity_id}/info` - Get detailed entity information
|
|
234
|
+
- `POST /v1/entities/{entity_id}/reload` - Hot reload entity (for development)
|
|
235
|
+
|
|
236
|
+
### Execution (OpenAI Responses API)
|
|
237
|
+
|
|
238
|
+
- `POST /v1/responses` - Execute agent/workflow (streaming or sync)
|
|
239
|
+
|
|
240
|
+
### Conversations (OpenAI Standard)
|
|
241
|
+
|
|
242
|
+
- `POST /v1/conversations` - Create conversation
|
|
243
|
+
- `GET /v1/conversations/{id}` - Get conversation
|
|
244
|
+
- `POST /v1/conversations/{id}` - Update conversation metadata
|
|
245
|
+
- `DELETE /v1/conversations/{id}` - Delete conversation
|
|
246
|
+
- `GET /v1/conversations?agent_id={id}` - List conversations _(DevUI extension)_
|
|
247
|
+
- `POST /v1/conversations/{id}/items` - Add items to conversation
|
|
248
|
+
- `GET /v1/conversations/{id}/items` - List conversation items
|
|
249
|
+
- `GET /v1/conversations/{id}/items/{item_id}` - Get conversation item
|
|
250
|
+
|
|
251
|
+
### Health
|
|
252
|
+
|
|
253
|
+
- `GET /health` - Health check
|
|
254
|
+
|
|
255
|
+
## Security
|
|
256
|
+
|
|
257
|
+
DevUI is designed as a **sample application for local development** and should not be exposed to untrusted networks or used in production environments.
|
|
258
|
+
|
|
259
|
+
**Security features:**
|
|
260
|
+
|
|
261
|
+
- Only loads entities from local directories or in-memory registration
|
|
262
|
+
- No remote code execution capabilities
|
|
263
|
+
- Binds to localhost (127.0.0.1) by default
|
|
264
|
+
- All samples must be manually downloaded and reviewed before running
|
|
265
|
+
|
|
266
|
+
**Best practices:**
|
|
267
|
+
|
|
268
|
+
- Never expose DevUI to the internet
|
|
269
|
+
- Review all agent/workflow code before running
|
|
270
|
+
- Only load entities from trusted sources
|
|
271
|
+
- Use `.env` files for sensitive credentials (never commit them)
|
|
272
|
+
|
|
273
|
+
## Implementation
|
|
274
|
+
|
|
275
|
+
- **Discovery**: `agent_framework_devui/_discovery.py`
|
|
276
|
+
- **Execution**: `agent_framework_devui/_executor.py`
|
|
277
|
+
- **Message Mapping**: `agent_framework_devui/_mapper.py`
|
|
278
|
+
- **Conversations**: `agent_framework_devui/_conversations.py`
|
|
279
|
+
- **API Server**: `agent_framework_devui/_server.py`
|
|
280
|
+
- **CLI**: `agent_framework_devui/_cli.py`
|
|
281
|
+
|
|
282
|
+
## Examples
|
|
283
|
+
|
|
284
|
+
See working implementations in `python/samples/getting_started/devui/`
|
|
285
|
+
|
|
286
|
+
## License
|
|
287
|
+
|
|
288
|
+
MIT
|