Build a ServerConfig from parsed CLI arguments.
Handles path normalization (e.g. resolving relative MCP config paths against the user's working directory) so that the raw serialized values are always absolute and unambiguous.
from_cli_args(
cls,
*,
project_context: ProjectContext | None,
model_name: str | None,
model_params: dict[str, Any] | None,
assistant_id: str,
auto_approve: bool,
sandbox_type: str,
sandbox_id: str | None,
sandbox_setup: str | None,
enable_shell: bool,
enable_ask_user: bool,
mcp_config_path: str | None,
no_mcp: bool,
trust_project_mcp: bool | None,
interactive: bool
) -> ServerConfig| Name | Type | Description |
|---|---|---|
project_context* | ProjectContext | None | Explicit user/project path context. |
model_name* | str | None | Model spec string. |
model_params* | dict[str, Any] | None | Extra model kwargs. |
assistant_id* | str | Agent identifier. |
auto_approve* | bool | Auto-approve all tools. |
sandbox_type* | str | Sandbox type. |
sandbox_id* | str | None | Existing sandbox ID to reuse. |
sandbox_setup* | str | None | Path to setup script for the sandbox. |
enable_shell* | bool | Enable shell execution tools. |
enable_ask_user* | bool | Enable ask_user tool. |
mcp_config_path* | str | None | Path to MCP config. |
no_mcp* | bool | Disable MCP. |
trust_project_mcp* | bool | None | Trust project MCP servers. |
interactive* | bool | Whether the agent is interactive. |