> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skrmir.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 配置参考

> AiOS 平台与 Agent 访问相关的关键配置项、默认值与推荐范围。

# 配置参考

本文汇总 AiOS 常用配置项，便于在部署、调优和排障时快速检索。

## 当前 bootstrap/server 入口配置

当前仓库里真正会被 `go run ./cmd/aios` 读取的运行时配置只有以下几项：

| 配置键                | 环境变量                     | 默认值         | 说明                                    |
| ------------------ | ------------------------ | ----------- | ------------------------------------- |
| `server.address`   | `AIOS_SERVER__ADDRESS`   | `:8080`     | HTTP 服务监听地址                           |
| `server.log_level` | `AIOS_SERVER__LOG_LEVEL` | `info`      | `slog` 日志级别                           |
| `runtime.mode`     | `AIOS_RUNTIME__MODE`     | `bootstrap` | 当前运行模式；只有 `bootstrap` 允许无 DSN 启动      |
| `postgres.dsn`     | `AIOS_POSTGRES__DSN`     | 空           | PostgreSQL 连接串；`dev/prod/...` 模式下必须提供 |

如果你要在本地开发中收口到外部状态路径，直接参考 [本地 PostgreSQL 开发环境](/getting-started/local-postgres-dev)。

## 全局配置

| 配置键         | 说明       | 默认值       | 建议                       |
| ----------- | -------- | --------- | ------------------------ |
| `profile`   | 运行环境配置集合 | `default` | 按 `dev/staging/prod` 拆分  |
| `output`    | CLI 输出格式 | `table`   | 自动化场景使用 `json`           |
| `log.level` | 日志级别     | `info`    | 生产建议 `info`，排障临时 `debug` |

## Infrastructure 关键配置

| 配置键                      | 说明        | 默认值       | 建议                 |
| ------------------------ | --------- | --------- | ------------------ |
| `infra.namespace`        | 默认命名空间    | `default` | 为每个环境单独设置          |
| `infra.replicas`         | 默认副本数     | `1`       | 生产起步 `2`           |
| `infra.resources.cpu`    | CPU 请求/限制 | 无         | 明确 requests/limits |
| `infra.resources.memory` | 内存请求/限制   | 无         | 依据压测结果设置           |

## Agent 关键配置

| 配置键                    | 说明             | 默认值   | 建议        |
| ---------------------- | -------------- | ----- | --------- |
| `agent.maxConcurrency` | 单工作区并发 Agent 数 | `2`   | 按机器资源逐步放量 |
| `agent.defaultTool`    | 默认执行工具         | 无     | 按任务类型设置   |
| `agent.timeout`        | 单任务超时时间        | `30m` | 长任务按需提高   |

## 规划中的 CLI 配置检查命令（尚未实现）

当前仓库尚未交付这些 `config` 子命令；本页中的配置语义仍可作为未来 CLI 与 API 的共享契约方向。

```bash theme={null}
aios config show
aios config validate
```

## 相关页面

* [平台总览](/platform/index)
* [应用交付总览](/platform/application-delivery)
* [本地 PostgreSQL 开发环境](/getting-started/local-postgres-dev)
* [CLI 参考](/reference/cli-reference)
