-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
41 lines (30 loc) · 1.09 KB
/
Copy pathmain.py
File metadata and controls
41 lines (30 loc) · 1.09 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
"""Entry point for running the orchestrated multi-agent demo."""
from __future__ import annotations
import argparse
import json
import logging
import sys
from orchestrator.orchestrator import Orchestrator
def configure_logging() -> None:
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
)
def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
parser = argparse.ArgumentParser(description="Run the pure Python multi-agent demo.")
parser.add_argument(
"query",
nargs="?",
help="User query to process. If omitted, a sample query is used.",
)
return parser.parse_args(argv)
def main(argv: list[str] | None = None) -> int:
configure_logging()
args = parse_args(argv)
query = args.query or "What are the key benefits of geometric multi-agent systems?"
orchestrator = Orchestrator()
result = orchestrator.run(query)
print(json.dumps(result, indent=2, default=str))
return 0
if __name__ == "__main__": # pragma: no cover - CLI entry
sys.exit(main())