-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
40 lines (31 loc) · 1.3 KB
/
main.py
File metadata and controls
40 lines (31 loc) · 1.3 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
"""
Anus - Autonomous Networked Utility System
Main entry point for the Anus AI agent framework
"""
import argparse
import sys
from anus.core.orchestrator import AgentOrchestrator
from anus.ui.cli import CLI
def main():
"""Main entry point for the Anus AI agent"""
parser = argparse.ArgumentParser(description="Anus AI - Autonomous Networked Utility System")
parser.add_argument("--config", type=str, default="config.yaml", help="Path to configuration file")
parser.add_argument("--mode", type=str, default="single", choices=["single", "multi"], help="Agent mode")
parser.add_argument("--task", type=str, help="Task description")
parser.add_argument("--verbose", action="store_true", help="Enable verbose output")
args = parser.parse_args()
# Initialize the CLI
cli = CLI(verbose=args.verbose)
# Display welcome message
cli.display_welcome()
# Initialize the agent orchestrator
orchestrator = AgentOrchestrator(config_path=args.config)
# If task is provided as argument, execute it
if args.task:
result = orchestrator.execute_task(args.task, mode=args.mode)
cli.display_result(result)
return
# Otherwise, start interactive mode
cli.start_interactive_mode(orchestrator)
if __name__ == "__main__":
main()