A self-evolving AI agent with dynamic toolkit management.
Project description
Tea Agent v0.9.21
一个自进化 AI 编程助手 — 工具驱动、自我进化、多界面形态
Tea Agent 是一款会自我进化的 AI 编程助手,拥有 60+ 可调用的工具,能自主编写代码、调试、搜索、文件操作、浏览器操控,并能在运行中动态加载新工具。支持 GUI / TUI / CLI 三种界面。
✨ 核心特性
- 🧠 自进化引擎 — Agent 可以修改自身代码、创建新工具、优化提示词,实现自主进化
- 🧰 60+ 内置工具 — 涵盖文件操作、代码编辑、搜索、截图、OCR、包管理、Git 等
- 🖥️ 三态界面 — GUI(Tkinter)、TUI(Textual)、CLI,按需切换
- 📚 项目知识库 — 自动构建符号索引、调用图,支持代码影响分析
- 🔄 断点续聊 — 聊天记录持久化,重启后恢复上下文
- 📋 Plan / TODO — 内置任务规划与追踪系统
- 🌐 MCP 协议 — 支持连接外部 MCP Server,扩展第三方工具
- 🎯 模式切换 — design / develop / test / review / docs / devops 六阶段工作流
📦 安装
# 从 PyPI 安装
pip install tea_agent
# 或从源码
git clone https://github.com/sunkwei/tea_agent
cd tea_agent
pip install -e .
Playwright 浏览器(可选,用于 JS 渲染页面抓取):
playwright install chromium
🚀 快速开始
# 启动 GUI(默认)
tea_agent
# 启动 TUI
tea-agent-tui
# 启动 CLI
tea-agent-cli
🧰 工具概览(60+)
| 类别 | 工具 |
|---|---|
| 📁 文件操作 | toolkit_file, toolkit_save_file, toolkit_explr |
| ✏️ 代码编辑 | toolkit_edit, toolkit_diff, toolkit_self_evolve |
| 🔍 搜索 | toolkit_search, toolkit_lsp, toolkit_query_chat_history |
| 📸 截图/OCR | toolkit_screenshot, toolkit_ocr, toolkit_screen_read |
| 🖱️ 操控 | toolkit_input, toolkit_browser_tab, toolkit_js_fetch |
| 📦 包管理 | toolkit_pkg, toolkit_build, toolkit_format_code |
| 🧪 测试 | toolkit_run_tests, toolkit_test_gui |
| 🗓️ 工具 | toolkit_lunar, toolkit_weather_my, toolkit_gettime |
| 🔧 系统 | toolkit_exec, toolkit_config, toolkit_os_info |
| 🧠 记忆/知识 | toolkit_memory, toolkit_kb, toolkit_reflection |
完整列表见
docs/TOOLS.md(每小时自动更新)
🏗️ 项目结构
tea_agent/
├── gui.py # GUI 主界面(Tkinter)
├── tui.py # TUI 界面(Textual)
├── cli.py / tlk.py # CLI 交互
├── agent.py # Agent 核心引擎
├── config.py # 配置管理
├── memory.py # 长期记忆
├── prompt_manager.py # 提示词版本管理
├── toolkit/ # 60+ 工具模块
├── session/ # 会话管理(Tool/Schemata)
├── multi_agent/ # 多 Agent 协作
├── lsp/ # LSP 语言服务
├── store/ # 数据存储
└── _gui/ # GUI 资源(图标、字体)
🔧 配置
配置文件 ~/.tea_agent/config.yaml:
model:
provider: openai
model: gpt-4o
embedding:
provider: openai
model: text-embedding-3-small
Agent 可在运行时通过 toolkit_config 自主调优参数。
📄 许可证
MIT License © 2024-2026 sunkw
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tea_agent-0.9.21.tar.gz.
File metadata
- Download URL: tea_agent-0.9.21.tar.gz
- Upload date:
- Size: 425.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc6f41ba1221ccd5a7de52909561aa18ab0efc45ef5580f28e88c2f9b53596d7
|
|
| MD5 |
52767555f18e079cb57c4b5ff7fe0cfc
|
|
| BLAKE2b-256 |
19a0020c20b75c3c7f2f27e41fcb1058e0229fc15f87190843f31df99b804057
|
File details
Details for the file tea_agent-0.9.21-py3-none-any.whl.
File metadata
- Download URL: tea_agent-0.9.21-py3-none-any.whl
- Upload date:
- Size: 517.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54f64fd20c4d014dc2a2a5f50c7b00d17cd85817f31140d4a77ff477c23c984c
|
|
| MD5 |
b0775798f66ee90ab2dfb37800d85d0d
|
|
| BLAKE2b-256 |
5e21b00f8a1540605bf625bcd3833200ab944816e6f46b32dcf74b3d081d6d74
|