参考与 FAQ / 配置项

配置项

灵犀指内核的配置文件为 lxz.config.json(JSON 格式),内核启动时读取。以下按模块列出全部配置项的键、说明与默认值

!

修改须知server.auth_token 由内核自动生成,请勿手工修改或提交到版本库;privacy.exclude_filessafety.blocked_paths 涉及代码与凭据安全,清空前请确认后果。

Agent 与 LLM

说明默认值
agent.auto_executeAgent 自动执行,无需逐步确认false
agent.confirmation_timeout_sec危险操作确认超时(秒)300
agent.max_context_tokensAgent 上下文上限(tokens)128000
agent.max_iterations单任务最大迭代次数(硬上限)50
agent.parallel_max_workersRUSH 并行 Coder 智能体上限4
agent.subagent_max_iterations子智能体最大迭代次数20
llm.max_tokens单次请求最大输出 tokens4096
llm.temperature采样温度0.7
llm.timeout_sec请求超时(秒)60
llm.retry_count / llm.retry_delay_ms失败重试次数 / 间隔(毫秒)3 / 1000
llm.stream_chunk_size流式输出分块大小64
model_config.source模型配置来源"go"
model_config.server_url模型配置服务地址http://localhost:9527/api/v1
model_config.cache_ttl_seconds模型配置缓存 TTL(秒)300
model_config.offline_fallback_enabled离线兜底开关false

RUSH 相关:迭代行为由 agent.max_iterations(硬上限)与内置收敛阈值 0.95 共同决定——同一错误连续出现 3 次或达到上限即终止当前路线并重规划;并行度由 agent.parallel_max_workers 控制。详见 RUSH 指南

缓存与记忆

说明默认值
cache.enabled三层缓存总开关true
cache.l1_capacityL1 精确缓存容量(条)256
cache.l2_similarity_thresholdL2 相似缓存命中阈值0.92
cache.l3_max_templatesL3 模板缓存上限100
cache.preheat_on_startup / cache.preheat_top_files启动预热开关 / 预热文件数true / 20
cache.ttl_seconds缓存过期时间(秒)3600
memory.enabled持久化记忆开关true
memory.auto_learn自动学习项目模式true
memory.db_path记忆数据库路径.lxz/memory.db
memory.max_entries记忆条目上限10000
memory.context_assembly_max_tokens记忆注入上下文上限4000
memory.semantic_index_enabled / memory.wal_mode语义检索索引 / SQLite WAL 模式true / true

IDE 界面与语言

说明默认值
ide.theme主题(dark / light"dark"
ide.layout界面布局"trae_cn"
ide.chat_position / ide.sidebar_positionAI 对话 / 侧边栏位置"right_panel" / "right"
ide.model_selector_style模型选择器样式"trae_cup"
ide.completion_debounce_ms补全触发防抖(毫秒)150
ide.inline_edit_context_lines内联编辑携带的上下文行数5
ide.diagnostic_refresh_on_save保存时刷新诊断true
i18n.language / i18n.fallback_language界面语言 / 回退语言"zh" / "en"

LSP 语言服务

说明默认值
lsp.enabledLSP 总开关true
lsp.mode运行模式(内置优先、失败回退)"builtin_with_fallback"
lsp.builtin_servers_dir内置语言服务目录"lsp-servers"
lsp.max_concurrent_processes / lsp.max_per_workspace全局并发进程上限 / 单工作区上限10 / 5
lsp.cpu_limit_percentCPU 占用上限(%)50
lsp.memory_limit_mb内存上限(MB)1024
lsp.idle_timeout_minutes空闲回收时间(分钟)10
lsp.initialize_timeout_ms初始化超时(毫秒)30000
lsp.fallback_timeout_ms回退超时(毫秒)2000
lsp.disabled_languages禁用 LSP 的语言列表[]
lsp.disabled_for_remote远程工作区禁用true
lsp.language_overrides按语言覆盖服务配置{}
lsp.sandbox_mode沙箱模式运行语言服务false

安全与隐私

说明默认值
safety.enabled安全防护总开关true
safety.snapshot_before_edit编辑前自动快照true
safety.auto_recover_on_failure失败自动恢复true
safety.dangerous_commands_require_confirmation危险命令需确认true
safety.max_file_size_kb单文件处理上限(KB)512
safety.blocked_paths禁止 AI 读写的路径node_modules.gittarget__pycache__
privacy.mode隐私模式"standard"
privacy.exclude_files不上传的敏感文件.env.env.localcredentials.jsonsecrets.yaml
privacy.redact_patterns传输前脱敏的正则(密码、Key、Bearer、卡号、邮箱)内置 5 条

沙箱、成本与基准

说明默认值
sandbox.enabled本地沙箱开关false
sandbox.type沙箱类型"process"
sandbox.docker_imageDocker 沙箱镜像"lingxizhi/sandbox:latest"
sandbox.max_cpu_percent / sandbox.max_memory_mbCPU(%)/ 内存(MB)上限80 / 512
sandbox.network_enabled沙箱内联网false
sandbox.timeout_sec执行超时(秒)300
cost.budget_usd_daily / cost.budget_usd_monthly日 / 月成本预算(USD,BYOK 自管)10.0 / 200.0
cost.track_by_model按模型分别统计true
cost.warning_threshold_percent预算告警阈值(%)80
benchmark.categories基准测试类别filesystemcachememory
benchmark.output_dir基准结果输出目录.lxz/benchmarks
benchmark.run_on_startup启动时自动跑基准false

集成、插件与钩子

说明默认值
integrations.git_platform默认 Git 平台"gitee"
integrations.gitee_access_token / github_access_token / gitlab_access_token各平台访问令牌""
integrations.notifications通知渠道配置[]
plugins.enabled插件系统开关true
plugins.auto_update插件自动更新false
plugins.marketplace_url插件市场地址https://marketplace.lingxizhi.dev/api/v1
plugins.search_dirs插件搜索目录.lxz/extensions
hooks.enabled钩子开关true
hooks.pre_edit / post_edit编辑前 / 后钩子命令[]
hooks.pre_commit / post_commit提交前 / 后钩子命令[]
hooks.on_error出错时钩子命令[]

内核服务

说明默认值
server.host监听地址(仅本机回环)127.0.0.1
server.port监听端口(被占用时自动递增,最多 10 个)3721
server.auth_token本地调用令牌(自动生成)启动时生成
server.cors_origins允许的跨域来源http://localhost:*vscode-webview://*
server.max_body_size_mb请求体上限(MB)50
server.request_timeout_sec请求超时(秒)120

下一步