-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathmain.py
More file actions
32 lines (25 loc) · 861 Bytes
/
main.py
File metadata and controls
32 lines (25 loc) · 861 Bytes
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
import argparse
import sys
import traceback
from agent.graph import agent
def main():
parser = argparse.ArgumentParser(description="Run engineering project planner")
parser.add_argument("--recursion-limit", "-r", type=int, default=100,
help="Recursion limit for processing (default: 100)")
args = parser.parse_args()
try:
user_prompt = input("Enter your project prompt: ")
result = agent.invoke(
{"user_prompt": user_prompt},
{"recursion_limit": args.recursion_limit}
)
print("Final State:", result)
except KeyboardInterrupt:
print("\nOperation cancelled by user.")
sys.exit(0)
except Exception as e:
traceback.print_exc()
print(f"Error: {e}", file=sys.stderr)
sys.exit(1)
if __name__ == "__main__":
main()