* 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>
* Adding more test for workflow vizualization.
* Improving README for sample.
* More cleanup.
* Removing rendering of workflow visualization and adding basic support for mermaid format.
* Adding basic mermaid tests.
* Improving sample. Switching to another branch.
* About to merge from main.
* Formatting.
* More fromatting.
* Removng uneeded call to ToUpper.
* Adding README.
* Moving samples under workflow to workflows.
* Removing uneeded README for map-reduce sample.
* Added example with stateful middleware
* Added chat middleware
* Updated middleware example with override scenario
* Small revert
* Small fixes
* Added kwargs to context objects
* Added README
* Added function middleware to chat client
* Small refactoring
* Reverted example files
* Made MiddlewareWrapper generic
* Added Middleware exception
* Small refactoring
* Small fix
* Magentic checkpoint wip
* Magentic checkpoint updates
* Support checkpointing for magentic orchestration.
* Checkpointing for sub-workflows
* Use _execute_contexts instead of _pending_requests
* Remove unnecessary type ignores
* Support checkpoints for other orchestrations, refactor some code.
* Regenerate uv.lock