Skip to content

Commit 4ccfd3d

Browse files
author
James N.
committed
add documentation
1 parent c1ef170 commit 4ccfd3d

File tree

4 files changed

+15
-106
lines changed

4 files changed

+15
-106
lines changed

README.md

Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ Welcome to the official repository for the Microsoft AI Agentic Workshop! This r
4545
- **🖥️ Advanced UI Options:**
4646
- **React Frontend:** Real-time streaming visualization with agent internal processes, tool calls, orchestrator planning, and turn-by-turn history tracking
4747
- **Streamlit Frontend:** Simple, elegant chat interface for quick prototyping and demos
48+
49+
- **🔄 Workflow Orchestration (NEW!):** Enterprise-grade workflow capabilities with [comprehensive orchestration patterns](agentic_ai/workflow/):
50+
- **Pregel-style execution engine** for complex multi-agent coordination
51+
- **Type-safe messaging** with runtime contract enforcement
52+
- **Checkpointing & resume** for long-running workflows
53+
- **Human-in-the-loop** approval patterns with RequestInfoExecutor
54+
- **Control flow patterns**: Switch/case routing, fan-out/fan-in, conditional edges
55+
- **Real-time observability**: OpenTelemetry tracing, event streaming, WebSocket updates
56+
- 🎯 **[Featured Demo: Fraud Detection System](agentic_ai/workflow/fraud_detection/)** - Production-ready workflow with React dashboard
4857

4958
- **Configurable LLM Backend:** Use the latest Azure OpenAI GPT models (e.g., GPT-5, GPT-4.1, GPT-4o).
5059
- **MCP Server Integration:** Advanced tools to enhance agent orchestration and capabilities with Model Context Protocol.
@@ -67,48 +76,12 @@ Welcome to the official repository for the Microsoft AI Agentic Workshop! This r
6776
1. Review the [Setup Instructions](./SETUP.md) for environment prerequisites and step-by-step installation.
6877
2. Explore the [Business Scenario and Agent Design](./SCENARIO.md) to understand the workshop challenge.
6978
3. Check out the **[Agent Framework Implementation Patterns](agentic_ai/agents/agent_framework/README.md)** to choose the right multi-agent approach (single-agent, Magentic orchestration, or handoff pattern).
70-
4. Dive into [System Architecture](./ARCHITECTURE.md) before building and customizing your agent solutions.
71-
5. Explore **[Workflow Examples & Production Demos](agentic_ai/workflow/)** to learn advanced orchestration patterns.
79+
4. Try the **[Fraud Detection Workflow Demo](agentic_ai/workflow/fraud_detection/)** to see enterprise orchestration patterns in action.
80+
5. Dive into [System Architecture](./ARCHITECTURE.md) before building and customizing your agent solutions.
7281
6. Utilize the [Support Guide](./SUPPORT.md) for troubleshooting and assistance.
7382

7483
---
7584

76-
## Workflow Orchestration
77-
78-
The workshop includes comprehensive **workflow orchestration** capabilities built on the Microsoft Agent Framework's Pregel-style execution engine. Workflows enable complex multi-agent coordination with type-safe messaging, checkpointing, and real-time observability.
79-
80-
### 🎯 Featured Demo: Fraud Detection System
81-
82-
A production-ready fraud detection workflow showcasing enterprise-grade patterns:
83-
84-
- **Real-time React dashboard** with live workflow visualization
85-
- **Fan-out/fan-in patterns** for parallel specialist agent analysis
86-
- **Human-in-the-loop** analyst review with checkpointing
87-
- **MCP tool integration** for customer data access
88-
- **WebSocket streaming** for live event updates
89-
90-
**[→ Try the Fraud Detection Demo](agentic_ai/workflow/fraud_detection/)**
91-
92-
### 📚 Learning Resources
93-
94-
| Resource | Description |
95-
|----------|-------------|
96-
| **[Workflow Architecture Guide](agentic_ai/workflow/README.md)** | Core concepts, execution model, and API reference |
97-
| **[Human-in-the-Loop Patterns](agentic_ai/workflow/human-in-the-loop.md)** | Comprehensive guide to approval workflows |
98-
| **[Fraud Detection Demo](agentic_ai/workflow/fraud_detection/)** | Production-ready workflow with real-time UI |
99-
100-
### Key Capabilities
101-
102-
**Control Flow**: Switch/case routing, conditional edges, dynamic branching
103-
**Parallelism**: Fan-out/fan-in, concurrent execution, aggregation patterns
104-
**Checkpointing**: Pause/resume workflows, long-running processes, crash recovery
105-
**Human-in-the-Loop**: External approvals, RequestInfoExecutor, response handling
106-
**State Management**: Executor-local state, shared state, persistence
107-
**Observability**: OpenTelemetry tracing, event streaming, real-time monitoring
108-
**Composition**: Nested workflows, workflow-as-agent, modular design
109-
110-
---
111-
11285
## Contributing
11386

11487
Please review our [Code of Conduct](./CODE_OF_CONDUCT.md) and [Security Guidelines](./SECURITY.md) before contributing.

agentic_ai/workflow/.env.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ AZURE_OPENAI_ENDPOINT=https://your-resource-name.openai.azure.com/
55
AZURE_OPENAI_API_VERSION=2024-10-01-preview
66

77
# MCP Server Configuration
8-
MCP_SERVER_URI=http://localhost:8000
8+
MCP_SERVER_URI=http://localhost:8000/mcp

agentic_ai/workflow/fraud_detection/README.md

Lines changed: 2 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ This example demonstrates a comprehensive fraud detection system using the Agent
122122

123123
2. **MCP Server**:
124124
```bash
125-
export MCP_SERVER_URI="http://localhost:8000"
125+
export MCP_SERVER_URI="http://localhost:8000/mcp"
126126
```
127127

128128
3. **Start MCP Server** (in separate terminal):
@@ -131,7 +131,7 @@ This example demonstrates a comprehensive fraud detection system using the Agent
131131
python mcp_service.py
132132
```
133133

134-
### Running the Workflow
134+
### Running the Workflow with command line
135135

136136
```bash
137137
cd agentic_ai/workflow/examples/fraud_detection
@@ -267,52 +267,6 @@ instructions=(
267267
8. **Type-Safe Messaging**: Pydantic models for all messages
268268
9. **Event Streaming**: Real-time workflow event monitoring
269269

270-
## Recent Improvements
271-
272-
### ✅ Fixed Issues (Latest)
273-
274-
1. **Analyst Review Data Rendering**: Fixed dataclass serialization in `_serialize_analyst_request()` to properly display Risk Score, Recommended Action, Alert ID, and other assessment details in the UI.
275-
276-
2. **Event Ordering**: Corrected event broadcast sequence so Analyst Review completion appears before Fraud Action execution, maintaining proper workflow visualization order.
277-
278-
These fixes ensure the UI accurately reflects the workflow state and displays all relevant fraud assessment information during analyst review.
279-
280-
## Troubleshooting
281-
282-
### MCP Connection Fails
283-
284-
Ensure MCP server is running:
285-
```bash
286-
curl http://localhost:8000/health
287-
```
288-
289-
### Missing Environment Variables
290-
291-
Check all required variables are set:
292-
```bash
293-
echo $AZURE_OPENAI_API_KEY
294-
echo $AZURE_OPENAI_CHAT_DEPLOYMENT
295-
echo $AZURE_OPENAI_ENDPOINT
296-
```
297-
298-
### Analyst Review Panel Not Showing Data
299-
300-
This should now be fixed. If you still see issues:
301-
- Restart the backend server to load the updated code
302-
- Check browser console for WebSocket errors
303-
- Verify the MCP server is responding
304-
305-
### Workflow Hangs
306-
307-
Check logs for executor errors. Each executor logs its progress.
308-
309-
### Checkpoint Restoration
310-
311-
To restore from checkpoint:
312-
```python
313-
checkpoint_id = workflow.get_latest_checkpoint_id()
314-
await workflow.restore_from_checkpoint(checkpoint_id)
315-
```
316270

317271
## Real-Time Workflow Visualizer UI
318272

@@ -431,24 +385,6 @@ http://localhost:3000
431385
- Check WebSocket connection in DevTools
432386
- Verify events are being sent from backend
433387

434-
## Next Steps
435-
436-
-~~Implement real-time UI for analyst review~~ (Completed)
437-
- Add database persistence for checkpoints (Redis, Cosmos DB)
438-
- Add metrics and monitoring (OpenTelemetry)
439-
- Integrate with actual fraud detection systems
440-
- Add multiple workflow instances for parallel alert processing
441-
- Implement escalation chains for critical cases
442-
- Add workflow history/replay to UI
443-
- Export workflow results to PDF
444-
- Add custom alert creation in UI
445-
446-
## Related Examples
447-
448-
- `human-in-the-loop/guessing_game_with_human_input.py` - Basic human-in-the-loop pattern
449-
- `agents/workflow_as_agent_human_in_the_loop_azure.py` - Azure-integrated human input
450-
- `control-flow/` - Switch/case and conditional routing examples
451-
- `parallelism/` - Fan-out and concurrent execution patterns
452388

453389
## License
454390

agentic_ai/workflow/fraud_detection/fraud_detection_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ async def main() -> None:
916916

917917
# Load configuration
918918
azure_openai_key = os.getenv("AZURE_OPENAI_API_KEY")
919-
azure_deployment = os.getenv("AZURE_OPENAI_CHAT_DEPLOYMENT_NAME")
919+
azure_deployment = os.getenv("AZURE_OPENAI_CHAT_DEPLOYMENT")
920920
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
921921
mcp_server_uri = os.getenv("MCP_SERVER_URI", "http://localhost:8000/mcp")
922922
if not all([azure_openai_key, azure_deployment, azure_endpoint]):

0 commit comments

Comments
 (0)