Appearance
Microsoft Agent Framework Orchestration Documentation β
Overview β
This directory contains comprehensive documentation for reimplementing the orchestration layer of the Azure AI Travel Agents application using the Microsoft Agent Framework (MAF) Python SDK.
Documentation Index β
π Planning Documents β
MAF Orchestration Design β Start Here
- Complete architecture design for MAF-based orchestration
- High-level system architecture
- Component design and integration approach
- Directory structure and technology stack
- Workflow patterns (sequential, parallel, conditional)
- Best practices and security considerations
- 20-week phased migration strategy
- Detailed implementation phases
- Risk management and mitigation strategies
- Success metrics and rollback procedures
- Resource requirements and dependencies
- Parallel deployment approach
MAF Comparison: LlamaIndex.TS vs MAF
- Side-by-side comparison of current and proposed solutions
- Feature comparison matrix
- Performance characteristics
- Pros and cons analysis
- Decision factors and recommendations
π οΈ Implementation Guides β
MAF Implementation Guide β Technical Reference
- Step-by-step implementation instructions
- Code examples for agents, tools, and workflows
- MCP client implementation details
- FastAPI integration patterns
- Testing strategies and deployment guidelines
- Best practices for production
MAF Quick Reference π Cheat Sheet
- Common code patterns and snippets
- Agent creation examples
- Tool definition patterns
- Workflow orchestration examples
- Error handling patterns
- Observability setup
- Testing examples
Quick Start β
For Decision Makers β
- Read the MAF Comparison to understand the differences between current and proposed solutions
- Review the MAF Migration Plan to understand timeline, resources, and risks
- Decide on approach: Continue with LlamaIndex.TS, migrate to MAF, or parallel deployment
For Architects β
- Start with MAF Orchestration Design to understand the architecture
- Review workflow patterns and integration approach
- Validate the design meets your requirements
- Provide feedback or adjustments
For Developers β
- Review MAF Implementation Guide for implementation details
- Keep MAF Quick Reference handy during development
- Follow the step-by-step instructions
- Refer to code examples for common patterns
For Project Managers β
- Review MAF Migration Plan for timeline and phases
- Understand resource requirements
- Plan team allocation and training
- Set up project tracking
Key Concepts β
What is Microsoft Agent Framework? β
Microsoft Agent Framework (MAF) is a Python SDK for building AI agent applications. It provides:
- Multi-agent orchestration - Coordinate multiple specialized agents
- Workflow management - Define complex agent workflows
- Tool integration - Connect agents to external tools and services
- LLM integration - Native support for Azure OpenAI and other LLMs
- State management - Built-in conversation and workflow state
- Observability - OpenTelemetry integration
Why Consider MAF? β
Advantages:
- β Native Azure AI integration
- β Microsoft backing and support
- β Python AI/ML ecosystem access
- β Modern agent architecture patterns
- β Strong type safety with Pydantic
- β FastAPI for high performance
Considerations:
- β οΈ Requires migration from TypeScript to Python
- β οΈ New framework (less mature than alternatives)
- β οΈ Custom MCP integration needed
- β οΈ Team needs Python expertise
Migration Approach β
We recommend a parallel deployment strategy:
- Build new Python API alongside existing TypeScript API
- Deploy both versions simultaneously
- Test thoroughly with subset of traffic
- Migrate gradually using feature flags or routing
- Validate functionality and performance
- Complete migration and deprecate old API
This approach minimizes risk while allowing thorough validation.
Architecture Overview β
Current Architecture (LlamaIndex.TS) β
βββββββββββββββ
β Angular UI β
ββββββββ¬βββββββ
β HTTP/SSE
ββββββββΌβββββββββββββββββββ
β TypeScript API β
β (Express.js) β
β ββββββββββββββββββββ β
β β LlamaIndex.TS β β
β β Orchestration β β
β ββββββββββββββββββββ β
ββββββββ¬βββββββββββββββββββ
β MCP Protocol
ββββββββΌβββββββββββββββββββ
β MCP Tool Servers β
β (Python, Java, C#, TS) β
βββββββββββββββββββββββββββProposed Architecture (MAF) β
βββββββββββββββ
β Angular UI β
ββββββββ¬βββββββ
β HTTP/SSE
ββββββββΌβββββββββββββββββββ
β Python API β
β (FastAPI) β
β ββββββββββββββββββββ β
β β MAF β β
β β Orchestration β β
β ββββββββββββββββββββ β
ββββββββ¬βββββββββββββββββββ
β MCP Protocol
ββββββββΌβββββββββββββββββββ
β MCP Tool Servers β
β (Python, Java, C#, TS) β
βββββββββββββββββββββββββββKey Change: Replace LlamaIndex.TS/TypeScript API with MAF/Python API while maintaining same MCP tool servers.
Implementation Phases β
Phase 1: Foundation (Week 1-2) β
- Set up Python project structure
- Implement MCP client integration
- Create configuration management
Phase 2: Agent Implementation (Week 3-4) β
- Implement all agents using MAF
- Create tool integration layer
- Implement agent handoff logic
Phase 3: Workflow Orchestration (Week 5-6) β
- Implement MAF workflow engine
- Add multi-agent coordination
- Implement state management
Phase 4: API Layer (Week 7-8) β
- Create FastAPI server
- Implement all endpoints
- Add SSE streaming support
Phase 5-12: Testing, Deployment, Migration β
- See Migration Plan for details
Technology Stack β
Core Dependencies β
agent-framework- Microsoft Agent Framework Python SDKfastapi- Modern web frameworkuvicorn- ASGI serverhttpx- Async HTTP clientpydantic- Data validationsse-starlette- SSE streaming
Azure Integration β
azure-ai-inference- Azure OpenAI clientazure-identity- Authenticationazure-ai-projects- Azure AI integration
Observability β
opentelemetry-api- Telemetry APIopentelemetry-sdk- Telemetry SDK- OpenTelemetry exporters for OTLP
Getting Help β
Documentation Resources β
- MAF GitHub: https://github.com/microsoft/agent-framework
- MAF Docs: https://learn.microsoft.com/en-us/agent-framework/
- FastAPI Docs: https://fastapi.tiangolo.com/
- Pydantic Docs: https://docs.pydantic.dev/
Project-Specific β
- Review existing documentation in this directory
- Check code examples in the implementation guide
- Refer to quick reference for common patterns
Issues and Questions β
- Open GitHub issues for bugs or feature requests
- Use discussions for questions
- Check existing issues for similar problems
Contributing β
When contributing to the MAF implementation:
- Follow the design - Adhere to the architecture in the design document
- Use best practices - Follow patterns in the implementation guide
- Test thoroughly - Unit, integration, and E2E tests
- Document changes - Update relevant documentation
- Code review - Get review before merging
Code Style β
- Python: Follow PEP 8, use Ruff for linting
- Type hints: Use for all public APIs
- Async/await: Use consistently for I/O operations
- Error handling: Implement proper exception handling
- Logging: Use structured logging
Testing Requirements β
- Unit tests for all agents and tools
- Integration tests for workflows
- E2E tests for API endpoints
- Performance tests for critical paths
- Minimum 80% code coverage
Timeline and Status β
Current Status β
- β Design documentation complete
- β Implementation guide complete
- β Migration plan complete
- β Comparison analysis complete
- β Quick reference complete
- βΈοΈ Implementation pending approval
Estimated Timeline β
- Total Duration: 20 weeks (5 months)
- Team Size: 2-3 engineers
- Effort: 40-60 person-weeks
Next Steps β
- Get stakeholder approval
- Allocate resources
- Begin Phase 1: Foundation
- Set up project tracking
Success Criteria β
Technical β
- β API response time < 2s (95th percentile)
- β Error rate < 0.1%
- β Uptime > 99.9%
- β Test coverage > 80%
Functional β
- β 100% feature parity with current implementation
- β All agents working correctly
- β MCP tool integration functional
- β Streaming responses working
Business β
- β No degradation in user experience
- β Equal or better performance
- β Smooth migration with no downtime
- β Maintainable and well-documented code
Risks and Mitigations β
High Risks β
- API Breaking Changes β Extensive testing, feature flags
- Performance Issues β Early benchmarking, optimization
- MAF Limitations β Fallback mechanisms, stay updated
Medium Risks β
- State Management β Use MAF built-in, thorough testing
- Streaming Issues β Test early, use proven libraries
- Deployment Complexity β Clear documentation, automation
See Migration Plan for detailed risk management.
Feedback and Iteration β
This is a living set of documentation that will evolve based on:
- Implementation experience
- Team feedback
- MAF framework updates
- Best practice discoveries
How to provide feedback:
- Open a GitHub issue
- Submit a pull request with improvements
- Discuss in team meetings
- Update documentation as you learn
License β
Same as the main Azure AI Travel Agents project.
Maintainers β
- Project Team
- Azure AI Samples Team
- Microsoft Agent Framework Team
Last Updated: 2025-01-02
Document Version: 1.0
Status: Planning Phase β
For questions or clarification, please open an issue or contact the project team.
