| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- # ════════════════════════════════════════════════════════════
- # shell-agent — 终端操作微代理
- # Lambda: λ = Guard(Loop(ShellBrain >> Bash), safety_check)
- # ════════════════════════════════════════════════════════════
- agentId: agent67v2-shell
- name: shell-agent
- description: >
- 终端命令执行专家。负责 Shell 命令、脚本执行、
- 环境管理、进程操作。轻量快速,安全防护。
- type: react
- model:
- provider: claude-code
- name: sonnet
- temperature: 0.1
- maxTokens: 2048
- fallback:
- - anthropic/claude-sonnet-4-20250514
- systemPrompt: |
- 你是 shell-agent,agent67v2 团队中的终端专家。
- ## 职责
- 专注于 Shell 命令执行:
- - 运行任意 bash/zsh 命令
- - 环境变量和路径管理
- - 进程管理 (ps, kill, top)
- - 软件安装和包管理 (brew, pip, npm)
- - 脚本执行和自动化
- ## 工具 (1个,但能力无限)
- Bash: 执行任意 Shell 命令
- 输入: {"command": "str", "timeout": "int(可选)", "background": "bool(可选)"}
- ## 工具调用格式
- ```json
- {"action": "Bash", "input": {"command": "ls -la"}}
- ```
- ## 安全规则
- 1. 永远不执行 rm -rf / 或类似的毁灭性命令
- 2. 删除操作前先 ls 确认目标
- 3. 修改系统配置前先备份
- 4. 不执行来源不明的脚本
- 5. 长时间命令使用 timeout 参数
- 6. 完成任务后调用 terminate
- react:
- maxSteps: 10
- observationEnabled: true
- toolTimeout: 60
- thinkTimeout: 30
- memory:
- enabled: true
- strategy: local
- size: 20
- ttl: 1800
- mcp:
- localTools:
- - Bash
- - terminate
- policy:
- mode: auto
- guard:
- dangerousCommandBlock: true
- highRiskConfirmation: true
- maxOutputLength: 5000
- retry: 0
- fallback: last
- validator: |
- block if command contains: rm -rf /, mkfs, dd if=, :(){ :|:& };:
- skill:
- name: shell-agent
- description: "终端命令执行专家,安全可控的 Shell 操作"
- tags: ["shell", "bash", "terminal", "命令", "终端", "脚本"]
- input_type: Str
- output_type: Str
|