Commit Graph

801 Commits

  • Python: .Net: Dotnet devui compatibility fixes (#2026)
    * 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
    
    * DevUI: Serialize workflow input as string to maintain conformance with OpenAI Responses format
    
    * Phase 1: Add /meta endpoint and fix workflow event naming for .NET DevUI compatibility
    
    * additional fixes for .NET DevUI workflow visualization item ID tracking
    
    **Problem:**
    .NET DevUI was generating different item IDs for ExecutorInvokedEvent and
    ExecutorCompletedEvent, causing only the first executor to highlight in the
    workflow graph. Long executor names and error messages also broke UI layout.
    
    **Changes:**
    - Add ExecutorActionItemResource to match Python DevUI implementation
    - Track item IDs per executor using dictionary in AgentRunResponseUpdateExtensions
    - Reuse same item ID across invoked/completed/failed events for proper pairing
    - Add truncateText() utility to workflow-utils.ts
    - Truncate executor names to 35 chars in execution timeline
    - Truncate error messages to 150 chars in workflow graph nodes
    
    ** Details:**
    - ExecutorActionItemResource registered with JSON source generation context
    - Dictionary cleaned up after executor completion/failure to prevent memory leaks
    - Frontend item tracking by unique item.id supports multiple executor runs
    - All changes follow existing codebase patterns and conventions
    
    Tested with review-workflow showing correct executor highlighting and state
    transitions for sequential and concurrent executors.
    
    * format fixes, remove cors tests
    
    * remove unecessary attributes
    
    ---------
    
    Co-authored-by: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com>
    Co-authored-by: Reuben Bond <reuben.bond@gmail.com>
  • Python: Fix underlying tool choice bug and all for return to previous Handoff subagent (#2037)
    * Fix tool_choice override bug and add enable_return_to_previous support
    
    * Add unit test for handoff checkpointing
    
    * Handle tools when we have them
  • Python: DevUI: Add OpenAI Responses API proxy support + HIL for Workflows (#1737)
    * 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>
  • Python: DevUI: Use metadata.entity_id instead of model field (#1984)
    * DevUI: Use metadata.entity_id for agent/workflow name instead of model field
    
    * OpenAI Responses: add explicit request validation
    
    * Review feedback
  • .NET: DevUI: Use relative URLs for backend API by default (#2005)
    * DevUI: Use relative URLs for backend API by default
    
    * dotnet format
    
    * rebuild application
  • Python: [Purview] Add Caching and background processing in Python Purview Middleware (#1844)
    * [PythonPurview] Add Caching and background processing
    
    * [PythonPurview] Updates based on comments
  • Python: Fix ag-ui examples packaging for PyPI publish (#1953)
    * Fix ag-ui examples packaging for PyPI publish
    
    * Fix markdown links
  • .NET: Python: Updated package versions (#1944)
    * Updated .NET version
    
    * Updated Python package versions
    
    * Updated changelog
  • Python: [BREAKING] Replaced AIProjectClient with AgentsClient in Foundry (#1936)
    * Replaced AIProjectClient with AgentsClient in Foundry
    
    * Update python/samples/getting_started/observability/azure_ai_agent_observability.py
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update python/samples/getting_started/observability/azure_ai_chat_client_with_observability.py
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Small fix
    
    * Removed TODO item
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: Add DevUI package for .NET (#1603)
    * Implement DevUI
    
    * Review feedback
    
    * Fix build
  • Python: fix missing packaging dependency (#1929)
    * fix missing packaging dependency
    
    * add aiohttp to azureai
  • Python: Added parameter to disable agent cleanup in AzureAIAgentClient (#1882)
    * 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
  • Python: add support for Python 3.14 (#1904)
    * add tests for py3.14 and add classifier
    
    * remove macos
    
    * allow openai v2
  • Python: Updates to Tools (#1835)
    * updated tool samples
    
    * mypy and readme fixes
    
    * updated call logic
    
    * added function invocation config
    
    * added include detailed error
    
    * added tests
    
    * updated FRC exception handling
    
    * updated tests
    
    * fix oai test
    
    * fix name in sample
    
    * imporoved tests coverage and removed some dead code paths
  • Python: Bump ag-ui package to 1.0.0b251105 for a release. Update changelog. (#1922)
    * Bump ag-ui package to 1.0.0b251105 for a release. Update changelog.
    
    * Fix authors and license-files
  • Python: AG-UI protocol support (#1826)
    * Add AG-UI integration
    
    * Fix tests. PR feedback
    
    * Cleanup
    
    * PR Feedback
    
    * Improve README and getting started experience
    
    * Fix links
  • Python: feat: Add ChatKit integration with a sample application (#1273)
    * feat: Add ChatKit integration with a new frontend application
    
    - Created a new frontend application using React and Vite for the ChatKit integration.
    - Added essential files including package.json, vite.config.ts, and Tailwind CSS configuration.
    - Implemented core components: App, Home, ChatKitPanel, ThemeToggle, and hooks for color scheme management.
    - Established SQLite-based store implementation for ChatKit data persistence in store.py.
    - Integrated theme toggling functionality for light and dark modes.
    - Set up ESLint and TypeScript configurations for better development experience.
    
    * git ignore
    
    * fix mypy
    
    * add mising file
    
    * minimal frontend for chatkit sample
    
    * update ignore files
    
    * version
    
    * set python version lowerbound on chatkit
    
    * update project settings for chatkit
    
    * update setup
    
    * update setup
    
    * update setup
    
    * update setup
    
    * weather widget
    
    * add select city widget sample
    
    * remove widget helper
    
    * update chatkit to include file attachments and cover more thread item types
    
    * update readme with mermaid diagram
    
    * update diagram
    
    * update instructions
    
    * update chatkit dependency
    
    * fix converter imports
    
    * move to demos/
    
    * move to demos/ -- rename references
    
    * support multiple session instead of using global variable in sample
    
    * support chunk streaming
    
    * fix tests
    
    * Update python/samples/demos/chatkit-integration/store.py
    
    Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
    
    * use local host
    
    ---------
    
    Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
  • Python: .NET: Updated package version and small fix (#1911)
    * Removed public key
    
    * Updated package version
    
    * Updated Python package versions
  • Python: [BREAKING] consolidate workflow run APIs (#1723)
    * consolidate workflow run apis
    
    * improve validation, add tests
    
    * Proper code tags for docs
    
    * Update sample output
    
    * Remove cycle validation
    
    * PR feedback
    
    * Validation
    
    * Cleanup
  • Python: Introducing the Anthropic Client (#1819)
    * 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
  • Python: fix middleware and cleanup confusing function (#1865)
    * fix middleware and cleanup redundant function
    
    * added test to validate
  • Python: Azure AI top_p and temperature parameters fix (#1839)
    * azure ai parameters fix
    
    * added unit tests
    
    * unit test fix
    
    * fix
  • Python: Ensure agent thread is part of checkpoint (#1756)
    * ensure agent thread is part of checkpoint
    
    * Update python/packages/core/agent_framework/_workflows/_agent_executor.py
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * remove data copying for server side thread.
    
    * refine warning check
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • [BREAKING] Python: Remove request_type param from ctx.request_info() (#1824)
    * Remove request_type param from ctx.request_info()
    
    * Address comments
  • Python: Lab: Updates to GAIA module (#1763)
    * Lab: Updates to GAIA module
    
    * update
    
    * emoj!
    
    * fix lint
    
    * update lab test workflow to only trigger for python changes
    
    * lint
    
    * lint
    
    * Fix broken OpenAI agents JS documentation link
  • Python: [BREAKING] Cleanup of dependencies (#1803)
    * removed extra and non-released deps
    
    * added comments
    
    * added space and lock
    
    * fix pyright config
  • fix: Remove strict thread id validation for tool results (#1769)
    * fix: remove strict thread id validation for tool results
    
    * test: remove corresponding test for strict thread_id validation
  • Python: Azure AI Search Support Update + Refactored Samples & Unit Tests (#1683)
    * azure ai search sample update
    
    * azure ai search update
    
    * small fix
  • [BREAKING] Python: Replace RequestInfoExecutor with request_info API and @response_handler (#1466)
    * 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
  • Python: Fix type compatibility check (#1753)
    * Fix type compatibility check
    
    * Address comments
  • Python: Added thread to AgentRunContext (#1732)
    * Added thread to agent run context
    
    * Added sample
    
    * Update python/samples/getting_started/middleware/thread_behavior_middleware.py
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Small fix
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • Python: AutoGen migration samples (#1738)
    * add autogen migration samples
    
    * fix typo
    
    * remove comment
    
    * fix typo
    
    * fix lab pyright
    
    * fix for HuggingFace change
  • Python: reject @executor on staticmethod/classmethod with clear error message (#1719)
    * reject executor on static method w clear error
    
    * Simplify
    
    * Cleanup
  • Python: [BREAKING] Python: Intro group chat and refactor orchestrations. Fix as_agent(). Standardize orchestration start msg types. (#1538)
    * 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
  • Python: Update lab packages and installation instructions (#1687)
    * update lab packages and installation instructions
    
    * fix dep
  • Python: [BREAKING] Update Agent Framework Lab Lightning to use Agent-lightning v0.2.0 API (#1644)
    * Merge changes from AGL release
    
    * Merge changes from AGL release
    
    * fix mypy
    
    * fix tool call with pydantic
    
    * Apply suggestion from @ekzhu
    
    * fix lint
    
    ---------
    
    Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
  • [BREAKING] Python: Refactor Checkpointing for runner and runner context (#1645)
    * Refactor Checkpointing for runner and runner context
    
    * exception
    
    * Fix formatting
    
    * Comments
    
    * rename
    
    * Add detailed doc string
  • Python: DevUI Fix Serialization, Timestamp and Other Issues (#1584)
    * refactor(devui): adopt standard OpenAI lifecycle events for agents and workflows
    
    - Replace custom workflow events with OpenAI Responses API standard lifecycle events
    - Add AgentStartedEvent, AgentCompletedEvent, AgentFailedEvent for clean separation
    - Implement ExecutorActionItem for workflow executor tracking
    - Convert informational events to trace events to reduce noise
    - Update README mapper table with comprehensive event mappings
    - Maintain full backward compatibility with legacy events
    
    * fix(devui): resolve timestamp overwriting and Content serialization errors
    
    - Fix tool call timestamps being overwritten on each render (#1483)
    - Add recursive Content serialization to handle ChatMessage and nested objects (#1548)
    - Implement proper MCP tool cleanup on server shutdown
    - Add timestamp field to function_result.complete events
    - Enhance credential and client resource cleanup
    
    Fixes #1483, #1548
    Partial improvements for #1476
  • Python: Update lab test trigger (#1632)
    * Update lab test trigger
    
    * fix tests
  • Python: MCP Error Handling Fix + Added Unit Tests (#1621)
    * mcp error fix
    
    * test docstring fixes