# ServerConfig

> **Class** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/_server_config/ServerConfig)

Full configuration payload passed from the CLI to the server subprocess.

Serialized to/from `DEEPAGENTS_CLI_SERVER_*` environment variables so
that the server
graph (which runs in a separate Python interpreter) can reconstruct the
CLI's intent without sharing memory.

## Signature

```python
ServerConfig(
    self,
    model: str | None = None,
    model_params: dict[str, Any] | None = None,
    assistant_id: str = _DEFAULT_ASSISTANT_ID,
    system_prompt: str | None = None,
    auto_approve: bool = False,
    interrupt_shell_only: bool = False,
    shell_allow_list: list[str] | None = None,
    interactive: bool = True,
    enable_shell: bool = True,
    enable_ask_user: bool = False,
    enable_memory: bool = True,
    enable_skills: bool = True,
    sandbox_type: str | None = None,
    sandbox_id: str | None = None,
    sandbox_setup: str | None = None,
    cwd: str | None = None,
    project_root: str | None = None,
    mcp_config_path: str | None = None,
    no_mcp: bool = False,
    trust_project_mcp: bool | None = None,
)
```

## Constructors

```python
__init__(
    self,
    model: str | None = None,
    model_params: dict[str, Any] | None = None,
    assistant_id: str = _DEFAULT_ASSISTANT_ID,
    system_prompt: str | None = None,
    auto_approve: bool = False,
    interrupt_shell_only: bool = False,
    shell_allow_list: list[str] | None = None,
    interactive: bool = True,
    enable_shell: bool = True,
    enable_ask_user: bool = False,
    enable_memory: bool = True,
    enable_skills: bool = True,
    sandbox_type: str | None = None,
    sandbox_id: str | None = None,
    sandbox_setup: str | None = None,
    cwd: str | None = None,
    project_root: str | None = None,
    mcp_config_path: str | None = None,
    no_mcp: bool = False,
    trust_project_mcp: bool | None = None,
) -> None
```

| Name | Type |
|------|------|
| `model` | `str \| None` |
| `model_params` | `dict[str, Any] \| None` |
| `assistant_id` | `str` |
| `system_prompt` | `str \| None` |
| `auto_approve` | `bool` |
| `interrupt_shell_only` | `bool` |
| `shell_allow_list` | `list[str] \| None` |
| `interactive` | `bool` |
| `enable_shell` | `bool` |
| `enable_ask_user` | `bool` |
| `enable_memory` | `bool` |
| `enable_skills` | `bool` |
| `sandbox_type` | `str \| None` |
| `sandbox_id` | `str \| None` |
| `sandbox_setup` | `str \| None` |
| `cwd` | `str \| None` |
| `project_root` | `str \| None` |
| `mcp_config_path` | `str \| None` |
| `no_mcp` | `bool` |
| `trust_project_mcp` | `bool \| None` |


## Properties

- `model`
- `model_params`
- `assistant_id`
- `system_prompt`
- `auto_approve`
- `interrupt_shell_only`
- `shell_allow_list`
- `interactive`
- `enable_shell`
- `enable_ask_user`
- `enable_memory`
- `enable_skills`
- `sandbox_type`
- `sandbox_id`
- `sandbox_setup`
- `cwd`
- `project_root`
- `mcp_config_path`
- `no_mcp`
- `trust_project_mcp`

## Methods

- [`to_env()`](https://reference.langchain.com/python/deepagents-cli/_server_config/ServerConfig/to_env)
- [`from_env()`](https://reference.langchain.com/python/deepagents-cli/_server_config/ServerConfig/from_env)
- [`from_cli_args()`](https://reference.langchain.com/python/deepagents-cli/_server_config/ServerConfig/from_cli_args)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/88c2b5cb874dc1d093acf54d2a967ba6e085c99b/libs/cli/deepagents_cli/_server_config.py#L105)