apiVersion: langbot/v1 kind: Runner metadata: name: default label: en_US: Local Agent zh_Hans: 本地 Agent description: en_US: Built-in agent with model fallback, tools, and knowledge retrieval. zh_Hans: 内置 Agent,支持模型 fallback、工具调用和知识库检索。 spec: usages: [agent] config: - name: model description: en_US: Choose a primary model and optional fallback models, and set the reasoning level for each model. zh_Hans: 选择主模型和备用模型,并设置各模型的推理等级。 label: en_US: Model zh_Hans: 模型 type: model-fallback-selector required: true default: primary: '' fallbacks: [] reasoning: {} - name: prompt label: en_US: Prompt zh_Hans: 提示词 type: prompt-editor required: true default: - role: system content: "You are a helpful assistant." - name: knowledge-bases label: en_US: Knowledge Bases zh_Hans: 知识库 type: knowledge-base-multi-selector required: false default: [] - name: box-enabled label: en_US: Sandbox zh_Hans: 沙箱 description: en_US: Use Box for code execution and file processing. zh_Hans: 使用 Box 执行代码和处理文件。 type: boolean required: false default: true - name: box-session-id-template label: en_US: Sandbox reuse zh_Hans: 沙箱复用范围 description: en_US: 'Choose how sandbox files and environments are shared. Custom templates substitute {variable_name}, for example {launcher_type}_{launcher_id}_{sender_id}. Equal results reuse the same sandbox; {global} shares one sandbox throughout the workspace. Available variables: {launcher_type}, {launcher_id}, {sender_id}, {conversation_id}, {bot_id}, {query_id}, {run_id}, {event_id}, {event_type}, and public request variables. Only named variables are supported, not expressions or attribute access; unavailable variables cause an error.' zh_Hans: 选择沙箱文件和环境的共享方式。自定义模板使用 {变量名} 插值,如 {launcher_type}_{launcher_id}_{sender_id};插值结果相同就复用同一个沙箱,{global} 表示在工作区内全局共享。可用变量:{launcher_type}(会话类型)、{launcher_id}(会话 ID)、{sender_id}(用户 ID)、{conversation_id}(对话上下文 ID)、{bot_id}(机器人 ID)、{query_id}(请求 ID)、{run_id}(运行 ID)、{event_id}(事件 ID)、{event_type}(事件类型),也可引用公开请求变量。仅支持变量名,不支持运算或属性访问;变量不可用时会报错。 type: select allow_custom: true required: true default: '{launcher_type}_{launcher_id}' options: - name: '{global}' label: en_US: Global (shared by all) zh_Hans: 全局(所有人共享) zh_Hant: 全域(所有人共用) ja_JP: グローバル(全員共有) vi_VN: Toàn cục (chia sẻ cho tất cả) th_TH: ทั่วไป (แชร์ทั้งหมด) es_ES: Global (compartido por todos) ru_RU: Глобальный (общий для всех) - name: '{launcher_type}_{launcher_id}' label: en_US: Per chat (Recommended) zh_Hans: 每个会话(推荐) zh_Hant: 每個會話(推薦) ja_JP: チャットごと(推奨) vi_VN: Mỗi cuộc trò chuyện (Khuyến nghị) th_TH: ต่อแชท (แนะนำ) es_ES: Por chat (Recomendado) ru_RU: По чату (Рекомендуется) - name: '{launcher_type}_{launcher_id}_{sender_id}' label: en_US: Per user in chat zh_Hans: 会话中每个用户 zh_Hant: 會話中每個用戶 ja_JP: チャット内のユーザーごと vi_VN: Mỗi người dùng trong cuộc trò chuyện th_TH: ต่อผู้ใช้ในแชท es_ES: Por usuario en chat ru_RU: По пользователю в чате - name: '{launcher_type}_{launcher_id}_{conversation_id}' label: en_US: Per conversation context zh_Hans: 每个对话上下文 zh_Hant: 每個對話上下文 ja_JP: 会話コンテキストごと vi_VN: Mỗi ngữ cảnh hội thoại th_TH: ต่อบริบทการสนทนา es_ES: Por contexto de conversación ru_RU: По контексту разговора - name: '{query_id}' label: en_US: Per message (isolated) zh_Hans: 每条消息(完全隔离) zh_Hant: 每條訊息(完全隔離) ja_JP: メッセージごと(隔離) vi_VN: Mỗi tin nhắn (cách ly) th_TH: ต่อข้อความ (แยกส่วน) es_ES: Por mensaje (aislado) ru_RU: По сообщению (изолированно) show_if: field: box-enabled operator: eq value: true - name: advanced-settings label: en_US: Advanced Settings zh_Hans: 高级设置 description: en_US: Show tuning controls for retrieval, tools, timeouts, and context management. zh_Hans: 显示检索、工具、超时和上下文管理的调优选项。 type: boolean required: false default: false - name: date-grounding label: en_US: Current Date Grounding zh_Hans: 当前日期锚定 description: en_US: Add the current UTC date and a reminder to verify time-sensitive facts with available search tools. zh_Hans: 注入当前 UTC 日期,并提醒使用可用搜索工具核实有时效性的信息。 type: boolean required: false default: true show_if: field: advanced-settings operator: eq value: true - name: timeout label: en_US: Timeout zh_Hans: 执行超时 type: integer required: false default: 300 show_if: field: advanced-settings operator: eq value: true - name: remove-think label: en_US: Remove Thinking Output zh_Hans: 移除思考内容 type: boolean required: false default: false show_if: field: advanced-settings operator: eq value: true - name: retrieval-top-k label: en_US: Retrieval Top K zh_Hans: 知识库检索数量 type: integer required: false default: 5 show_if: field: advanced-settings operator: eq value: true - name: rerank-model label: en_US: Rerank Model zh_Hans: 重排序模型 type: rerank-model-selector required: false default: '' show_if: field: advanced-settings operator: eq value: true - name: rerank-top-k label: en_US: Rerank Top K zh_Hans: 重排序保留数量 type: integer required: false default: 5 show_if: field: advanced-settings operator: eq value: true - name: max-tool-iterations label: en_US: Max Tool Iterations zh_Hans: 最大工具调用轮数 type: integer required: false default: 100 show_if: field: advanced-settings operator: eq value: true - name: tool-execution-mode description: en_US: Parallel is faster for independent tools. Use serial for dependent or side-effecting actions; result order does not guarantee execution order. zh_Hans: 并行适合独立工具;有依赖或副作用的操作请选择串行。结果排列不保证执行顺序。 label: en_US: Tool Execution Mode zh_Hans: 工具执行模式 type: select required: false default: parallel options: - name: parallel label: en_US: Parallel zh_Hans: 并行 - name: serial label: en_US: Serial zh_Hans: 串行 show_if: field: advanced-settings operator: eq value: true - name: max-tool-result-chars label: en_US: Max Tool Result Characters zh_Hans: 最大工具结果字符数 type: integer required: false default: 20000 show_if: field: advanced-settings operator: eq value: true - name: context-history-fetch-limit label: en_US: History Fetch Limit zh_Hans: 历史消息拉取数量 type: integer required: false default: 50 show_if: field: advanced-settings operator: eq value: true - name: context-window-tokens label: en_US: Context Window Tokens zh_Hans: 上下文窗口 Token 数 type: integer required: false default: 200000 show_if: field: advanced-settings operator: eq value: true - name: context-reserve-tokens label: en_US: Reserved Output Tokens zh_Hans: 输出保留 Token 数 type: integer required: false default: 16384 show_if: field: advanced-settings operator: eq value: true - name: context-keep-recent-tokens label: en_US: Recent Context Tokens zh_Hans: 最近上下文 Token 数 type: integer required: false default: 20000 show_if: field: advanced-settings operator: eq value: true - name: context-summary-tokens label: en_US: Summary Tokens zh_Hans: 摘要 Token 数 type: integer required: false default: 8000 show_if: field: advanced-settings operator: eq value: true capabilities: streaming: true tool_calling: true knowledge_retrieval: true multimodal_input: true skill_authoring: true interrupt: true steering: true permissions: models: - count_tokens - invoke - stream - rerank tools: - detail - call knowledge_bases: - list - retrieve history: - page execution: python: path: default.py attr: DefaultRunner