MCPcopy Create free account
hub / github.com/IBM/AssetOpsBench / _build_parser

Function _build_parser

src/agent/deep_agent/cli.py:19–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18
19def _build_parser() -> argparse.ArgumentParser:
20 parser = argparse.ArgumentParser(
21 prog="deep-agent",
22 description="Run a question through LangChain deep-agents with AssetOpsBench MCP servers.",
23 formatter_class=argparse.RawDescriptionHelpFormatter,
24 epilog="""
25model-id format:
26 litellm_proxy/<model> LiteLLM proxy (e.g. litellm_proxy/aws/claude-opus-4-6)
27 <provider>:<model> Native provider (e.g. anthropic:claude-sonnet-4-6)
28
29environment variables:
30 LITELLM_API_KEY LiteLLM API key (required for litellm_proxy/* models)
31 LITELLM_BASE_URL LiteLLM base URL (required for litellm_proxy/* models)
32 TOKENROUTER_API_KEY TokenRouter API key (for tokenrouter/* models)
33 TOKENROUTER_BASE_URL TokenRouter base URL (e.g. https://api.tokenrouter.com/v1)
34
35examples:
36 deep-agent "What assets are at site MAIN?"
37 deep-agent --model-id litellm_proxy/aws/claude-opus-4-6 "List sensors on Chiller 6"
38 deep-agent --show-trajectory "What are the failure modes for a chiller?"
39 deep-agent --json "What is the current time?"
40""",
41 )
42 add_common_args(parser, default_model=_DEFAULT_MODEL)
43 parser.add_argument(
44 "--recursion-limit",
45 type=int,
46 default=100,
47 metavar="N",
48 help="Maximum graph recursion steps (default: 100).",
49 )
50 return parser
51
52
53async def _run(args: argparse.Namespace) -> None:

Callers

nothing calls this directly

Calls 1

add_common_argsFunction · 0.85

Tested by

no test coverage detected