()
| 18 | |
| 19 | |
| 20 | def _build_parser() -> argparse.ArgumentParser: |
| 21 | parser = argparse.ArgumentParser( |
| 22 | prog="stirrup-agent", |
| 23 | description="Run a question through a Stirrup agent with AssetOpsBench MCP servers.", |
| 24 | formatter_class=argparse.RawDescriptionHelpFormatter, |
| 25 | epilog=""" |
| 26 | model-id format: |
| 27 | litellm_proxy/<model> LiteLLM proxy (e.g. litellm_proxy/aws/claude-opus-4-6) |
| 28 | <provider>/<model> Native via Stirrup's LiteLLMClient. watsonx works |
| 29 | directly here, e.g. |
| 30 | watsonx/meta-llama/llama-4-maverick-17b-128e-instruct-fp8 |
| 31 | |
| 32 | tracks: |
| 33 | --code-enabled (default) Add a sandboxed code-execution tool (code track). |
| 34 | --no-code Tools-only: directly comparable to the other runners. |
| 35 | |
| 36 | environment variables: |
| 37 | LITELLM_API_KEY LiteLLM API key (required for litellm_proxy/* models) |
| 38 | LITELLM_BASE_URL LiteLLM base URL (required for litellm_proxy/* models) |
| 39 | TOKENROUTER_API_KEY TokenRouter API key (for tokenrouter/* models) |
| 40 | TOKENROUTER_BASE_URL TokenRouter base URL (e.g. https://api.tokenrouter.com/v1) |
| 41 | WATSONX_APIKEY/... Standard LiteLLM watsonx vars (for watsonx/* models) |
| 42 | STIRRUP_CODE_IMAGE Docker image for the code track (default python:3.12-slim) |
| 43 | |
| 44 | examples: |
| 45 | stirrup-agent "What assets are at site MAIN?" |
| 46 | stirrup-agent --no-code --show-trajectory "List sensors on Chiller 6" |
| 47 | stirrup-agent --json "Cross-reference open work orders against forecasted anomalies" |
| 48 | """, |
| 49 | ) |
| 50 | add_common_args(parser, default_model=_DEFAULT_MODEL) |
| 51 | code_group = parser.add_mutually_exclusive_group() |
| 52 | code_group.add_argument( |
| 53 | "--code-enabled", |
| 54 | dest="code_enabled", |
| 55 | action="store_true", |
| 56 | default=True, |
| 57 | help="Enable a sandboxed code-execution tool so the agent can run code (default).", |
| 58 | ) |
| 59 | code_group.add_argument( |
| 60 | "--no-code", |
| 61 | dest="code_enabled", |
| 62 | action="store_false", |
| 63 | help="Tools-only run; disable code execution for 1:1 comparison.", |
| 64 | ) |
| 65 | parser.add_argument( |
| 66 | "--code-backend", |
| 67 | choices=["docker", "local", "e2b"], |
| 68 | default="docker", |
| 69 | help="Code-execution sandbox backend (default: docker).", |
| 70 | ) |
| 71 | parser.add_argument( |
| 72 | "--max-turns", |
| 73 | type=int, |
| 74 | default=30, |
| 75 | metavar="N", |
| 76 | help="Maximum agent turns (default: 30).", |
| 77 | ) |
nothing calls this directly
no test coverage detected