跳到正文
原文
Philipp Schmid·· 2025-11-21AI 评分52

用 Gemini 3 和 Python 从零构建 CLI Agent

Practical Guide on how to build an Agent from scratch with Gemini 3

AI 导读

文章用 Gemini 3 Pro 和 Python SDK 从零构建 CLI Agent,介绍模型调用、工具定义、上下文管理与迭代执行循环。实现包含 read_file、write_file 和 list_dir 等工具,并说明 Gemini 3 的 Thought signatures 需要在 API 调用中原样返回。指南还总结工具描述、上下文工程、停止条件、护栏和人工确认等工程实践。

来源:Philipp Schmid · philschmid.de