* 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
* Further observability cleanup and update telemetry samples
* Add VS Code Extension config
* Fix unit tests
* Fix unit tests
* Add more comments
* Remove live metric
* removed intercepts_request and simplified how interception is handled
* parameterize SubWorkflowRequestInfo
* revert back the field rename of RequestResponse
* remove duplicate tests
* ignore type error
* remove SubWorkflowResponse
* Remove SubWorkflowRequestInfo and update RequestInfoMessage with source_executor_id for correlation
* Improve type utils
* Add sample
* Add Union
* Add more test cases
* Add more test cases
* Fix RequestResponse typing to only coerce mapping original_request
---------
Co-authored-by: Evan Mattson <evan.mattson@microsoft.com>
* Setting up
* Readme
* Add redis tests path to all-tests
* First pass integration
* Keep provider convention
* First pass integration
* add redis integration tests
* update README.md
* Add basic sample for redis integration
* Add partitioning, add partition-aware tests, improve sample script
* Fix code quality check
* Try to resolve pytest check
* Try to identify if pytest is the cause of failed checks
* Re-enable tests
* Rename redis test file
* Removing some tests to narrow down issue
* Revert, no difference
* Delete temp files
* Starting refactor of RedisProvider
* Build dynamic schema builder, still need to do dynamic embedding model config
* Add scope control
* Complete first pass functionality with OpenAI + HF vectors -> Tests, Samples, Demo to follow
* Fix code quality
* attempt to identify rootcause of failed test
* attempt to identify rootcause of failed test
* Attempt to resolve code quality fail
* Update pyproject.toml for foundry to pin azure-ai-projects == 1.1.0b3,azure-ai-agents == 1.2.0b3
* Add tests for redisprovider
* Remove invalid tests
* Add API key handling for openai vectorizer
* Update uv.locl
* Use master uv.lock
* Begin sample file, add lazy index creation, fix faulty override
* Index drop and reinit depends on drop_redis_index not overwrite
* Add samples, threading included, escaped queries, verify threading works, sample README.md
* Refactor filters
* Opinionated vars
* Allow filter expression combination
* Try inline stubs for mypy
* Address mypy errors
* Better docstrings, tweaks for feedback
* Tweak example 3 in redis_threads.py sample
* adjust confusing name
* Enrich docstrings
* Add descriptions and comments to samples, externalize vectorizer choice, remove nltk and sentencetransformers dependnecy
* Add descriptions and comments to samples, externalize vectorizer choice, remove nltk and sentencetransformers dependnecy
* Incorporate initial feedback from dmytrostruk
* Fix uv.lock
* Attempt to resolve conflict
* Use remote .tomls
* Sanity check
* fix tests
* Remove hardcoded API key from samples
* Fix incorrect env var
* Make add and redis_search private
* Fix tests relying on private funcs
* Expand tests
* Explainer comments to each test
* Add a 'get_conversation_history' function to RedisProvider - This just returns messages in sequential order. Added 'created_at_*' timestamps to facilitate sequential recovery. function has to be manually invoked by user
* Add agent-framework-redis to python/pyproject.toml
* Remove get_conversation_history
* improve redis context provider with pydantic techniques and safe index handling patterns
* add RedisChatMessageStore
* remove integration test :(
* fix mypy error
* Remove unused params
* Redo schema validation to be order-invariant, handle attrs (previously throwing errors due to strict ==)
* Expand explanation
* Add ChatMessageStore example
* Fix comments in redis_conversation.py
* Resolving uv.lock conflict, update to match main
* Fix test in redis provider
* Apply suggestion from @ekzhu
* Update python/packages/main/pyproject.toml
---------
Co-authored-by: Tyler Hutcherson <tyler.hutcherson@redis.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>