* DevUI: Add OpenAI Responses API proxy support with enhanced UI features
This commit adds support for proxying requests to OpenAI's Responses API,
allowing DevUI to route conversations to OpenAI models when configured to enable testing.
Backend changes:
- Add OpenAI proxy executor with conversation routing logic
- Enhance event mapper to support OpenAI Responses API format
- Extend server endpoints to handle OpenAI proxy mode
- Update models with OpenAI-specific response types
- Remove emojis from logging and CLI output for cleaner text
Frontend changes:
- Add settings modal with OpenAI proxy configuration UI
- Enhance agent and workflow views with improved state management
- Add new UI components (separator, switch) for settings
- Update debug panel with better event filtering
- Improve message renderers for OpenAI content types
- Update types and API client for OpenAI integration
* update ui, settings modal and workflow input form, add register cleanup hooks.
* add workflow HIL support, user mode, other fixes
* feat(devui): add human-in-the-loop (HIL) support with dynamic response schemas
Implement HIL workflow support allowing workflows to pause for user input
with dynamically generated JSON schemas based on response handler type hints.
Key Features:
- Automatic response schema extraction from @response_handler decorators
- Dynamic form generation in UI based on Pydantic/dataclass response types
- Checkpoint-based conversation storage for HIL requests/responses
- Resume workflow execution after user provides HIL response
Backend Changes:
- Add extract_response_type_from_executor() to introspect response handlers
- Enrich RequestInfoEvent with response_schema via _enrich_request_info_event_with_response_schema()
- Map RequestInfoEvent to response.input.requested OpenAI event format
- Store HIL responses in conversation history and restore checkpoints
Frontend Changes:
- Add HILInputModal component with SchemaFormRenderer for dynamic forms
- Support Pydantic BaseModel and dataclass response types
- Render enum fields as dropdowns, strings as text/textarea, numbers, booleans, arrays, objects
- Display original request context alongside response form
Testing:
- Add tests for checkpoint storage (test_checkpoints.py)
- Add schema generation tests for all input types (test_schema_generation.py)
- Validate end-to-end HIL flow with spam workflow sample
This enables workflows to seamlessly pause execution and request structured user input
with type-safe, validated forms generated automatically from response type annotations.
* improve HIL support, improve workflow execution view
* ui updates
* ui updates
* improve HIL for workflows, add auth and view modes
* update workflow
* security improvements , ui fixes
* fix mypy error
* update loading spinner in ui
---------
Co-authored-by: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com>
* Removed automatic agent cleanup in AzureAIAgentClient
* Revert "Removed automatic agent cleanup in AzureAIAgentClient"
This reverts commit 89846c7212.
* Exposed boolean flag to control deletion behavior
* Update sample
* initial version of anthropic connector
* updated implementation and added tests
* fix type and readme
* mypy fix and int tests enabled
* add integration test setup
* updated based on comments
* improved function result handling
* added extra unordered test
* updated from review
* fix tool choice handling
* same fix for chat client
Eduard van Valkenburg
·
2025-11-03 19:32:28 +00:00
* Prototype: Add request_info API and @response_handler
* Add original_request as a parameter to the response handler
* Prototype: request interception in sub workflows
* Prototype: request interception in sub workflows 2
* WIP: Make checkpointing work
* checkpointing with sub workflow
* Fix function executor
* Allow sub-workflow to output directly
* Remove ReqeustInfoExecutor and related classes; Debugging checkpoint_with_human_in_the_loop
* Fix Handoff and sample
* fix pending requests in checkpoint
* Fix unit tests
* Fix formatting
* Resolve comments
* Address comment
* Add checkpoint tests
* Add tests
* misc
* fix mypy
* fix mypy
* Use request type as part of the key
* Log warning if there is not response handler for a request
* Update Internal edge group comments
* REcord message type in executor processing span
* Update sample
* Improve tests
* Intro group chat and refactor magentic. Fix as_agent()
* Cleanup and improvements
* Add as_agent docstring clarification
* Standardize orchestration messages to use agent-style inputs.
* Simplify group chat constructs
* Further cleanup
* Add sk to af group chat migration sample. Update README.
* Improvements and simplifications
* consolidating shared orchestration logic
* Further clean up
* Add group chat sample
* Improve typing
* Fix test imports
* Fix readme links
* Cleanup per PR Feedback
* Add Handoff orchestration pattern support
* PR feedback
* Use AOAI client in samples
* Adjust to tool
* Handoff to sub-agent via ai function
* PR feedback
* More cleanup
* Improvements
* PR feedback cleanup
* Add handoff migration sample.
* Remove type ignore
* fix markdown link formatting
* Remove readme link for non-existent sample
* Python: Fix AI Search Tool Sample and improve AI Search Exceptions
* Python: Fix AI Search Tool Test
---------
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
* Python: set role=tool when processing approval responses
* Python: set role=tool when processing approval responses
* Fix approval mode with OpenAIChatClient and threads: add approval requests to assistant message, fix deduplication/rejection call_id, filter approval content, add tests and example
* update test tools after change
* Rename _collect_approval_todos to _collect_approval_responses and filter empty call_ids
* Python: DevUI - Internal Refactor, Conversations API support, and performance improvements
Comprehensive refactor of DevUI package including samples relocation,
frontend reorganization, OpenAI Conversations API support, and critical
performance and code quality improvements.
Key Changes:
Architecture & Organization
- Moved DevUI samples to python/samples/getting_started/devui/
- Consolidated with other framework samples for better discoverability
- Added .env.example files and comprehensive README
- Restructured frontend components into feature-based folders (agent, workflow, gallery, layout)
- Created new OpenAI-compliant message renderers (devui should render oai responses types primarily)
New Features
- Added _conversations.py (467 lines) - Full conversation storage abstraction, replaces the /threads endpoint to better match oai conversations api
- Implements OpenAI Conversations API for thread management, Supports in-memory and extensible storage backends
API Simplification
- Use 'model' field as entity_id (agent/workflow name) instead of extra_body
- Use standard OpenAI 'conversation' field for conversation context.
Performance & Quality Improvements
- Improved context management in MessageMapper with bounded memory (~500KB max)
- Implemented hybrid LRU + cleanup approach to prevent unbounded memory growth
- General QOL improvement - Eliminated ~150 lines of dead/duplicate code, Consolidated helper functions into _utils.py, Extracted magic numbers to module-level constants, Optimized conversation item lookups with index-based approach
Testing
- Added test_conversations.py (13 tests)
- Added test_performance_fixes.py (9 tests)
- Updated existing tests for code consolidation
- 53 tests passing
Impact: 76 files changed: +4,106 insertions, -2,373 deletions
All linting and formatting checks passing. No breaking changes - backward compatible.
Migration: Samples moved to python/samples/getting_started/devui/
* readme lint fixes
* initial support for function approval and minor ui fixes
* Add mapping for application media type in OpenAI responses client
* Enhance multimodal input samples: Add PDF testing functionality and fix image sample
* Standardize filename handling and add multimodal samples
- Standardized filename extraction logic between chat and responses clients
- Both clients now omit filename when not provided (no default fallback)
- Added Azure Responses API multimodal sample with PDF support
- Cleaned up Azure Chat sample to focus on supported features only
- Fixed test comment placement for better code documentation
- Updated README with clear API capability differences
* Enhance multimodal input samples with image and PDF handling
- Refactor image and PDF handling in `azure_chat_multimodal.py` and `openai_chat_multimodal.py` to use new utility functions.
- Add `load_sample_pdf` and `create_sample_image` functions for better test asset management.
- Remove redundant code for creating sample images and PDFs.
- Introduce a sample PDF file in `sample_assets` for testing purposes.
* Fix formatting in OpenAI chat client
---------
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
* refactor AgentExecutor, add output_response flag for switching on or off workflow output for each agent.
* introduce add_agent
* make default agent's streaming to false
* address comments
* fix test
* add is_streaming to RunnerContext and WorkflowContext
* fix add_agent return
* fix tests
* address comments
* resolve conflict
* update to address comments
* fix
* added a sample on integration of Azure OpenAI Responses Client with hosted Model Context Protocol (MCP)
* added additional comments mentioning that the Microsoft Learn MCP server can be replaced by any other desired MCP server
* corrected the MCP server type to local
* added a newline at the end
* Update python/samples/getting_started/agents/azure_openai/azure_responses_client_with_local_mcp.py
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
---------
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
* support for local function approval
* small fix
* fix mypy
* added bigger test scenario's for function calling and approvals
* updated lock
* updated return message for rejection
* fix test
* updated function result content handling
Eduard van Valkenburg
·
2025-10-04 15:19:16 +00:00
Should be `Agent2Agent Protocol` not `Agent-to-Agent` unless talking about general agent to agent communication
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>