-
Notifications
You must be signed in to change notification settings - Fork 602
Expand file tree
/
Copy pathrun.py
More file actions
60 lines (50 loc) · 2.13 KB
/
run.py
File metadata and controls
60 lines (50 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env python3
"""Simple runner script for the Agent Architecture Comparison example.
This provides a clean entry point for users who want to run the example
without needing to understand the full pipeline implementation.
"""
from pipelines import compare_agent_architectures
def main() -> None:
"""Run the agent architecture comparison pipeline."""
print("🚀 Starting Agent Architecture Comparison Pipeline...")
print("This will demonstrate:")
print(" • Training a scikit-learn intent classifier")
print(" • Running 3 different agent architectures")
print(" • LiteLLM integration (real LLMs if API keys detected)")
print(" • Generating LangGraph workflow visualizations")
print(" • Creating beautiful HTML comparison reports")
print()
# Check if real LLMs will be used
from llm_utils import should_use_langfuse, should_use_real_llm
if should_use_real_llm():
print("✨ Real LLM APIs detected! Using LiteLLM for agent responses.")
if should_use_langfuse():
print(
"📊 Langfuse observability enabled! Tracking costs and performance."
)
else:
print(
"💡 Add LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY for observability."
)
else:
print(
"📝 No LLM API keys found. Using mock responses (perfect for demos)."
)
print("💡 Set OPENAI_API_KEY to enable real LLM integration.")
print()
# Execute the pipeline
compare_agent_architectures()
print("✅ Pipeline completed successfully!")
print()
print("🎯 Check the ZenML Dashboard to see:")
print(" • Customer service queries dataset")
print(" • Trained intent classifier model")
print(" • Architecture performance metrics")
print(" • Interactive Mermaid diagrams for all three architectures")
print(" • Beautiful HTML comparison report")
if should_use_langfuse():
print(" • Langfuse traces with cost and performance data")
print()
print("💡 Start the dashboard with: zenml login")
if __name__ == "__main__":
main()