from_cli_args(
cls,
*,
project_context: ProjectContext | None,
model_name: str || 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 | |
assistant_id* | str | |
auto_approve* | bool | |
interrupt_shell_only | bool | Default: False |
shell_allow_list | list[str] | None | Default: None |
sandbox_type | str | Default: 'none' |
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 |
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.
Extra model kwargs.
Agent identifier.
Auto-approve all tools.
Validate shell commands via middleware instead of HITL.
Restrictive shell allow-list to forward to the
server subprocess for ShellAllowListMiddleware.
Sandbox type.
Existing sandbox ID to reuse.
Path to setup script for the sandbox.
Enable shell execution tools.
Enable ask_user tool.
Path to MCP config.
Disable MCP.
Trust project MCP servers.
Whether the agent is interactive.