Skip to main content

Naiyue Test Agent

本地运行的通用编程与测试 Agent,提供浏览器界面和终端交互。通过配置的模型、项目提示词、Skills 和工具读取项目、修改文件、执行命令,并保留会话历史。

  • 本地 Web:流式 Markdown、工具执行过程、权限审批、会话管理和历史滚动加载;首任务自动标题、文件差异预览/patch 下载、可见思考和最后任务重新生成。
  • 终端 CLI:多轮对话、恢复历史、审批、停止、Steering 和 Follow-up。
  • 模型接入:OpenAI、兼容 OpenAI 的接口、Anthropic、Ollama。
  • 工具:Read、Ls、Find、Grep、Write、Edit、Bash、PowerShell,以及一层前台子 Agent。
  • 0.1.1 新增 aitest_kit、百度/Tavily 回退的 web_search 和 web_fetch,配置见工具说明。
  • Find/Grep 使用安装包内的 fd / rg;前端已经构建,使用发行包无需 Node.js 或 npm。

安装

需要 Python 3.12 或更高版本;当前 CI 基线为 Python 3.12。建议使用独立虚拟环境。

python -m venv .venv

激活环境:

  • macOS / Linux:source .venv/bin/activate
  • Windows PowerShell:.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install naiyue-test-agent
nyt --version

首版发行目标:macOS Apple Silicon / Intel、Linux x86_64 / ARM64、Windows x64。每个平台分别提供 wheel,pip 自动选择。Linux 目标为 glibc 环境;Windows ARM 和 Alpine 暂未列入支持范围。macOS 标签标识内置程序的最低系统要求,Python 和第三方依赖可能有更高要求。跨平台运行结果以相应 CI 为准。

配置模型

默认读取用户目录下的 ~/.naiyue-test-agent/models.json,Windows 对应 %USERPROFILE%\.naiyue-test-agent\models.json。自行创建目录和 JSON 文件,或启动时用 --config 指定已有配置。

下面是配置格式示例,将尖括号占位项替换为自己的值:

{
  "schema_version": 1,
  "default_model_id": "main",
  "providers": {
    "gateway": {
      "kind": "openai_compatible",
      "base_url": "https://example.invalid/v1",
      "api_key": "<your-api-key>"
    }
  },
  "models": {
    "main": {
      "provider_id": "gateway",
      "model": "<your-model-name>",
      "api": "chat_completions"
    }
  }
}

OpenAI / 兼容接口的 api 可选 chat_completions 或 responses,应与实际端点能力一致。其他供应商、思考参数、缓存和工具预算的配置说明见仓库中的 模型示例 与 应用设置示例。

对于使用 reasoning_content 返回可见思考的兼容网关,可在对应模型的 profile 中声明 "reasoning_output": "reasoning_content";Responses 可在 request 中配置 "reasoning_summary": "auto"(或 concise / detailed)。未配置时不额外请求思考摘要;模型没有返回可见思考时,界面不显示该区域。重新生成会重新执行最后一次任务及其工具,工作区文件不会回滚。

模型凭证由用户保管,不随包提供。使用远程模型时,发送给模型的消息和工具结果会交给所配置的供应商;本地应用不代表模型也在本地运行。

启动 Web

在需要操作的项目目录执行:

nyt

终端会输出本地访问链接,在浏览器中打开即可。默认绑定回环地址并自动选择端口。访问链接含本次服务的访问凭证,请按私有链接保管。

nyt --workspace /path/to/project
nyt --config /path/to/models.json
nyt --port 8080
nyt --help

--port 为显式覆盖示例;默认端口不固定。Ctrl+C 请求退出并等待必要收尾。

使用终端 CLI

nyt chat
nyt chat --workspace /path/to/project
nyt chat --resume
nyt chat --resume <session-id>
nyt chat --no-session
nyt chat --help

常用交互命令::quit 退出、:stop 停止、:approve / :deny 处理审批。完整交互说明以终端提示为准。

Web 与终端各自启动应用实例,同一工作区数据库由一个实例持有。切换入口前先关闭正在占用该数据库的服务。

工具、权限与数据

有工作区时默认启用文件工具。Bash / PowerShell 需要启用,并受权限规则及审批控制;解释器需由操作系统环境提供。命令使用当前用户的宿主文件和网络权限,当前不提供沙箱隔离。

会话、checkpoint、聊天归档和用量等保存在工作区关联的用户数据目录中,默认位于 ~/.naiyue-test-agent/data/。模型上下文压缩保留独立聊天归档。安装或升级应用不迁移或清理这些数据。

升级前关闭应用,再执行:

python -m pip install --upgrade naiyue-test-agent

开发与发行

从源码开发时安装 requirements.txt 和 requirements-web.txt,并在 PATH 中提供 rg / fd。前端开发使用仓库 frontend/ 下的 npm 配置。源码入口仍支持 python -m naiyue_test_agent.web 和 python -m naiyue_test_agent.application.cli。

发布维护、五平台构建和 PyPI 首次授权步骤见 发行指南。项目设计与开发记录保留在 GitHub 仓库,不进入 wheel。

许可证

本项目使用 MIT。发行包内的第三方软件保留各自许可证和版权声明。

Metadata

Release files for naiyue-test-agent 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for naiyue-test-agent 0.1.1
File
naiyue_test_agent-0.1.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
naiyue_test_agent-0.1.1-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
naiyue_test_agent-0.1.1-py3-none-manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
naiyue_test_agent-0.1.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
naiyue_test_agent-0.1.1-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 19.5 MB

Release files / naiyue_test_agent-0.1.1-py3-none-win_amd64.whl

Download URL naiyue_test_agent-0.1.1-py3-none-win_amd64.whl
Size 3.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
d4a35dad81d8699bc800cf6248b171c3bd6bbd38902ed9b49f61e9a5b2302d0c
BLAKE2b-256 checksum
How to use checksums
9d31fd3876df876a83f53fccc9b36d90c8f1c2a354c453e00c165217c883be8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / naiyue_test_agent-0.1.1-py3-none-manylinux_2_17_x86_64.whl

Download URL naiyue_test_agent-0.1.1-py3-none-manylinux_2_17_x86_64.whl
Size 4.3 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
9a7ddeea5e5bdf6d88de86c7bbbf0024c7067851644758c70f78109882a074f5
BLAKE2b-256 checksum
How to use checksums
9014cd4ac3429817696ea51ea8e4c098a9edd8fe2d76f5de6c8000e1453412e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / naiyue_test_agent-0.1.1-py3-none-manylinux_2_17_aarch64.whl

Download URL naiyue_test_agent-0.1.1-py3-none-manylinux_2_17_aarch64.whl
Size 3.9 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
9bf0b8599937d8702fdf2d178704a5a9d5daa0f08789e33fdd31b284f9614caf
BLAKE2b-256 checksum
How to use checksums
482699316351a888a7934aad7daef250c4c53e9b966cd69dc007242b9f89f311
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / naiyue_test_agent-0.1.1-py3-none-macosx_11_0_arm64.whl

Download URL naiyue_test_agent-0.1.1-py3-none-macosx_11_0_arm64.whl
Size 3.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7db98ecd4c44e0c7b1cbdd3841a8029e60e619d4754f59bc031f0211a9520a8a
BLAKE2b-256 checksum
How to use checksums
bff4e872945777f806d995f1884dc6088542156dbe05452b44fbeb5d9d18f987
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / naiyue_test_agent-0.1.1-py3-none-macosx_10_12_x86_64.whl

Download URL naiyue_test_agent-0.1.1-py3-none-macosx_10_12_x86_64.whl
Size 3.8 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
efa1969aef75b829c9166f943eb31b69e12eacab80c29601306eccf3995e30e6
BLAKE2b-256 checksum
How to use checksums
b05102d0469e62a8655e94b0d4a1a524dc92218a328647440aff01a8a0334699
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

5 release files

0.1.0

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page