DeepSeek AI Agent - 智能终端助手,支持 JSON 模式工具调用、文件精确编辑、后台任务处理、对话历史
Project description
DeepSeek AI Agent v3.1
智能终端助手 —— 专为 Termux 环境设计的 AI Agent,基于 DeepSeek API。
功能特性
- JSON 模式工具调用 —— 自动执行 shell 命令、读写文件、访问网页
- 文件精确编辑 —— replace_in_file 只替换需要改的部分
- 后台任务处理 —— 自动识别服务启动命令并加
&后台运行 - 对话历史 —— 实时保存,下次启动可继续对话
- 用户自定义规则 —— 嵌入系统提示词,个性化 AI 行为
- 国内镜像源 —— 支持阿里云/清华源/中科大/自定义四种模式
- Termux 环境检测 —— 启动时自动验证运行环境
安装
第一步:换国内镜像源(加速下载)
echo "deb https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable main" > $PREFIX/etc/apt/sources.list && apt update
第二步:安装 Python
pkg install python -y
第三步:安装 deepseek-agent-2026
python -m pip install deepseek-agent-2026
第四步:启动脚本
deepseek-agent-2026
从源码安装
git clone https://github.com/user/deepseek-agent.git
cd deepseek-agent
pip install -e .
快速开始
安装后直接运行:
deepseek-agent-2026
或者作为 Python 模块运行:
python -m deepseek_agent
首次运行需要:
- 同意用户协议与隐私政策
- 输入 DeepSeek API Key(可从 https://platform.deepseek.com 获取)
可用工具
| 工具 | 功能 |
|---|---|
| run_shell | 执行系统命令 |
| read_file | 读取文件(带行号) |
| write_file | 安全写入文件 |
| replace_in_file | 精确替换文件内容 |
| mkdir | 创建目录 |
| fetch_webpage | 访问网页(Lynx) |
| ask_user | 向用户提问 |
特殊命令
| 命令 | 功能 |
|---|---|
| help / 帮助 | 显示帮助信息 |
| setting / 设置 | 打开设置菜单 |
| clear | 清屏 |
| reset | 重置对话并删除历史 |
| exit / 退出 | 保存并退出 |
系统要求
更新日志
v3.1.1 (2026-06-24)
- 修复:README.md 格式问题,优化 PyPI 页面显示
- 优化:完善项目文档,新增从零开始安装步骤
v3.1.0 (2026-06-23)
- 新增:首次发布到 PyPI,包名 deepseek-agent-2026
- 新增:支持 pip install deepseek-agent-2026 安装
- 新增:命令行启动方式 deepseek-agent-2026
- 功能:JSON 模式工具调用(run_shell、read_file、write_file、replace_in_file、mkdir、fetch_webpage、ask_user)
- 功能:用户自定义规则系统
- 功能:对话历史实时保存
- 功能:国内镜像源切换(阿里云/清华源/中科大)
- 功能:Termux 环境自动检测
v3.0.0 (2026-05-09)
- 新增:用户自定义规则系统
- 新增:reset 命令,重置对话并清除历史
- 新增:关于页面(版本信息、更新日志、用户协议、隐私政策)
- 优化:规则即时生效,系统规则始终优先
v2.9.0 (2026-05)
- 新增:文件读取带行号(read_file 返回 行号| 内容 格式)
- 新增:安全文件写入(write_file 不受特殊字符影响)
- 优化:动态输出规则,AI 根据回复复杂度调整输出长度
- 优化:Token 显示修复
v2.8.0 (2026-04)
- 新增:对话历史记录,下次启动可继续对话
- 新增:后台任务智能识别,服务启动命令自动加 & 后台运行
- 优化:搜索引擎优化,使用必应国内版
- 优化:最大轮次扩展至 64 轮,输出上限扩展至 60000 tokens
v2.7.0 及更早
- 新增:JSON 模式工具调用
- 新增:自动安装依赖(pip/pkg 镜像源自动切换)
- 新增:彩色终端输出
- 新增:设置中心(命令超时/最大轮次/AI输出/AI模型/API Key 管理)
许可证
MIT License
Project details
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 deepseek_agent_2026-3.1.2.tar.gz.
File metadata
- Download URL: deepseek_agent_2026-3.1.2.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25dc9ea75396e6fb4d159ef3d0601fd6710cd1fae11ce0b789531b160f83ca78
|
|
| MD5 |
4c0d548eb947232d5b3627946ed46248
|
|
| BLAKE2b-256 |
3ad818a39c7f17f4de6a8bfabfbd10f19897dce3dacf354485566f1fe8920d8b
|
File details
Details for the file deepseek_agent_2026-3.1.2-py3-none-any.whl.
File metadata
- Download URL: deepseek_agent_2026-3.1.2-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e6fd4173c26c8885c6fd6422a776d25f892072a63915ddfff9ec642b6636d94
|
|
| MD5 |
f3dec9fe2a38b8afc7bde5c8f17fb69f
|
|
| BLAKE2b-256 |
8c6a120e7b67ee294a2c6c90b3d601bfa3f7ab74f13579e67cea3aaf1fe886f5
|