mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
9c094573e8
* Further support for declarative python workflows * Add tests. Clean up for typing and formatting * Improvements and cleanup * Typing cleanup. Improve docstrings * Proper code in docstrings * Fix malformed code-block directive in docstring * Remove dead links * PR feedback * Address PR feedback * Address PR feedback * Remove sl * Update devui frontend * More cleanup * Fix uv lock * Skip Py 3.14 tests as powerfx doesn't support it * Fix mypy error * Fix for tool calls * Removed stale docstring * Fix lint * Standardize on .NET namespaces. Revert DevUI changes (bring in later) * Implement remaining items for Python declarative support to match dotnet
26 lines
614 B
Python
26 lines
614 B
Python
# Copyright (c) Microsoft. All rights reserved.
|
|
|
|
"""
|
|
Run the declarative workflow sample with DevUI.
|
|
|
|
Demonstrates conditional branching based on age input using YAML-defined workflow.
|
|
"""
|
|
|
|
from pathlib import Path
|
|
|
|
from agent_framework.declarative import WorkflowFactory
|
|
from agent_framework.devui import serve
|
|
|
|
factory = WorkflowFactory()
|
|
workflow_path = Path(__file__).parent / "workflow.yaml"
|
|
workflow = factory.create_workflow_from_yaml_path(workflow_path)
|
|
|
|
|
|
def main():
|
|
"""Run the declarative workflow with DevUI."""
|
|
serve(entities=[workflow], auto_open=True)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|