Repository navigation
Expand file tree
/
Copy pathmain.py
More file actions
71 lines (55 loc) · 2.37 KB
/
Copy pathmain.py
File metadata and controls
71 lines (55 loc) · 2.37 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
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env python3
"""
AutoGen Framework - Main Entry Point
Proof of Concept demonstrating AutoGen-based business analysis framework.
Shows memory integration, agent workflows, and cross-requirement context handling.
This serves as the foundation for building specialized multi-agent workflows.
"""
import asyncio
from dotenv import load_dotenv
from ba_copilot import BASession
# Load environment variables from .env file
load_dotenv()
async def demo_ba_workflow():
"""Demonstrate BA agent workflow with memory integration and context handling"""
print("AutoGen Framework - Business Analysis PoC")
print("=" * 60)
print("Demonstrating: BA Agent + Memory Integration + Context Handling")
print()
# Create and start BA session
session = BASession()
await session.start()
try:
# First requirement - establishes baseline context
print("=== FIRST REQUIREMENT ===")
requirement1 = """
We need a user login system for our web application. Users should be able to register
with email and password, log in securely, and reset their password if they forget it.
"""
print("Requirement 1:", requirement1.strip())
print("\n" + "-" * 40)
await session.analyze_requirement(requirement1, max_stories=2)
print("\n" + "=" * 60)
# Second requirement - tests cross-requirement memory and context
print("=== SECOND REQUIREMENT (Tests context retention) ===")
requirement2 = """
Now we also need user profile management. Users should be able to update their
profile information, upload a profile picture, and manage their account settings.
"""
print("Requirement 2:", requirement2.strip())
print("\n" + "-" * 40)
await session.analyze_requirement(requirement2, max_stories=2)
finally:
# Always clean up
await session.close()
print("\n" + "=" * 60)
print("🎉 Framework PoC Complete!")
print("✓ Memory integration working")
print("✓ Agent maintained context across requirements")
print("✓ Clean modular architecture")
print("✓ Ready for extension with additional agent types")
async def main():
"""Main entry point for AutoGen framework demonstration"""
await demo_ba_workflow()
if __name__ == "__main__":
asyncio.run(main())