()
| 17 | |
| 18 | |
| 19 | def _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=""" |
| 25 | model-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 | |
| 29 | environment 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 | |
| 35 | examples: |
| 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 | |
| 53 | async def _run(args: argparse.Namespace) -> None: |
nothing calls this directly
no test coverage detected