文章
25
标签
4
分类
4
Home
Wiki
Life
Link
About
Johnny-Zhao's TechBlog
雅思听力直播课2
返回首页
Home
Wiki
Life
Link
About
雅思听力直播课2
发表于
2026-03-28
|
更新于
2026-03-28
|
浏览量:
take a stroll 散步
文章作者:
Johnny-Zhao
文章链接:
https://zjncs.github.io/2026/03/28/2026-03-28-%E9%9B%85%E6%80%9D%E5%90%AC%E5%8A%9B%E7%9B%B4%E6%92%AD%E8%AF%BE2/
版权声明:
本博客所有文章除特别声明外,均采用
CC BY-NC-SA 4.0
许可协议。转载请注明来源
Johnny-Zhao's TechBlog
!
上一篇
tool use
只有 bash 时, 所有操作都走 shell。cat 截断不可预测, sed 遇到特殊字符就崩, 每次 bash 调用都是不受约束的安全面。专用工具 (read_file, write_file) 可以在工具层面做路径沙箱。 123456789101112def safe_path(p: str) -> Path: path = (WORKDIR / p).resolve() if not path.is_relative_to(WORKDIR): raise ValueError(f"Path escapes workspace: {p}") return pathdef run_read(path: str, limit: int = None) -> str: text = safe_path(path).read_text() lines = text.splitlines() if limit and limit < len(lines): lin...
下一篇
agent loop
12345678+--------+ +-------+ +---------+| User | ---> | LLM | ---> | Tool || prompt | | | | execute |+--------+ +---+---+ +----+----+ ^ | | tool_result | +----------------+ (loop until stop_reason != "tool_use") 12345678910111213141516171819202122def agent_loop(query): messages = [{"role": "user", "content&quo...
Johnny-Zhao
Full Stack Developer
Architecture Enthusiast
文章
25
标签
4
分类
4
Github
公告
LAB
这里记录 Agent、系统设计和一些有意思的折腾。
最近在做 GUI 自动化、RAG 和记忆系统。
最新文章
规划与协调-todowrite
2026-03-28
tool use
2026-03-28
雅思听力直播课2
2026-03-28
agent loop
2026-03-27
learn claude code
2026-03-27