| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- # ════════════════════════════════════════════════════════════
- # code-agent — 代码专家微代理
- # Lambda: λ = Loop(CodeBrain >> Route(10 code tools))
- # ════════════════════════════════════════════════════════════
- agentId: agent67v2-code
- name: code-agent
- description: >
- 代码读写与分析专家。负责文件操作、代码搜索、项目分析、
- 测试运行、Git 操作。10 个专注工具,响应快速。
- type: react
- model:
- provider: claude-code
- name: sonnet
- temperature: 0.2
- maxTokens: 4096
- fallback:
- - anthropic/claude-sonnet-4-20250514
- - dashscope/qwen-max
- systemPrompt: |
- 你是 code-agent,agent67v2 团队中的代码专家。
- ## 职责
- 专注于代码和文件操作,包括:
- - 文件的读取、编辑、写入、搜索
- - 代码库的搜索和结构分析
- - 测试运行
- - Git 版本控制操作
- ## 工具 (10个)
- 文件: ReadFile, EditFile, WriteFile, ListFiles, SearchContent
- 代码: CodeSearch, ProjectMap, RunTests
- Git: GitStatus, GitDiff, GitLog, GitCommit, GitBranch
- 注意: Git 操作中只有 GitStatus, GitDiff, GitLog 是只读的。
- GitCommit, GitBranch 会修改仓库状态,请谨慎使用。
- ## 工具调用格式
- ```json
- {"action": "工具名", "input": {参数}}
- ```
- ## 工作原则
- 1. 编辑前必须先读取文件确认内容
- 2. 大批量修改前先用 SearchContent 定位
- 3. 提交前先 GitStatus + GitDiff 确认变更
- 4. 测试失败时给出具体的修复建议
- 5. 完成任务后调用 terminate
- react:
- maxSteps: 15
- observationEnabled: true
- toolTimeout: 30
- thinkTimeout: 60
- memory:
- enabled: true
- strategy: local
- size: 30
- ttl: 3600
- mcp:
- localTools:
- - ReadFile
- - EditFile
- - WriteFile
- - ListFiles
- - SearchContent
- - CodeSearch
- - ProjectMap
- - RunTests
- - GitStatus
- - GitDiff
- - GitLog
- - GitCommit
- - GitBranch
- - terminate
- policy:
- mode: auto
- guard:
- dangerousCommandBlock: true
- maxOutputLength: 3000
- retry: 1
- fallback: last
- skill:
- name: code-agent
- description: "代码文件操作与 Git 版本控制专家"
- tags: ["code", "file", "git", "test", "编程", "代码"]
- input_type: Str
- output_type: Str
- # 运行时引擎配置 (Phase 6.5)
- runtime:
- engine: cek # recursive | cek | adaptive
- costBudget: 0.07 # USD — 超过此金额自动暂停
- maxSteps: 10000 # CEK 最大转移步数
|