Rust 原生 · 终端优先 · 可嵌入的 AI Agent Runtime
Mink 既可在终端(REPL / TUI)与 Web 工作台中直接运行,也可嵌入到 Rust 或 Python 应用中;多端共享同一套运行时内核、工具协议与会话语义。
核心优势
- 轻量与高性能:Rust 原生低开销,
AgentRuntime毫秒级启动与单轮调度、低内存占用;结合非破坏式前缀缓存与 PTC 编排,显著降低长任务输入成本。 - 单内核多端复用:Rust 通过
mink::runtime进程内调用;Python SDK(mink-agent)与 Web 服务复用同一 Rust 内核。 - 长任务可控:显式上下文压缩、跨轮 Goal 编排与原子化 Plan/Todo 状态管理,长链路运行不失控。
- 可靠编辑与沙箱:Hashline / Replace 双模式编辑、Python 宿主 PTC(
RunCode)以及 macOS / Linux / WASI 多级沙箱隔离。
快速开始
前置:Rust
1.99+,设置DEEPSEEK_API_KEY(或自定义 OpenAI-compatible 端点)。
1. 终端 CLI
cargo build --release
./target/release/mink -m flash --tui # Full TUI(--tui=inline 为原生滚动,-i 为 REPL)
./target/release/mink -m flash --continue -i # 恢复最近会话
2. Rust 嵌入
[dependencies]
mink = { package = "mink-core", version = "0.10.0", default-features = false, features = ["runtime"] }
let rt = mink::prelude::AgentRuntime::start(
mink::prelude::AgentOptions::new("/tmp/mink-home", ".")
.with_api_key(std::env::var("DEEPSEEK_API_KEY")?)
.with_model("flash"),
).await?;
println!("{}", rt.run_turn("hello").await?.text);
rt.shutdown().await?;
3. Python SDK
pip install mink-agent
from mink_agent import AgentSession, SandboxConfig
with AgentSession(SandboxConfig(api_key="sk-...", read_dirs=["src"])) as session:
print(session.run("scan this repo and summarize")["text"])
性能实测(v0.10.0)
在 Apple M4 Pro(macOS 15.7.7、rustc 1.99.0、release / bench 构建)下的实测数据:
| 类别 | 指标 | 实测值 | 口径 | 报告 |
|---|---|---|---|---|
| 运行时 | runtime_start P50 |
9.17 ms |
Mock | v0.10.0 |
| 运行时 | tool_loop_50 均值 |
0.873 ms/round(总 43.64 ms) |
Mock | v0.10.0 |
| 并发(50×10) | tool / warm 延迟 / 吞吐 |
Avg 58.57 ms · 48.47 rps |
Mock | 并发 Mock |
| 并发(50×10) | 进程 Peak RSS | 12.33 MB |
Mock | 并发 Mock |
| TUI 渲染 | 1 万条消息暖输入帧 P95 | 0.022–0.143 ms(冷布局 15.66–16.46 ms) |
Release | v0.10.0 |
| PTC 收益 | 工具回传 / 总 prompt | −76.3% / −56.0%(tool vs off) |
云 API | PTC 对比 |
仓库结构与文档
| 包路径 | 职责 |
|---|---|
| crates/mink-core | 核心库 mink-core(库名 mink):运行时、工具、PTC、会话与沙箱 |
| crates/mink-cli | 终端二进制 mink 与 SDK 协议二进制 mink-core(REPL / TUI) |
| mink_agent | Python SDK(wheel 内置 mink-core 二进制) |
| crates/mink-server | Web 工作台服务端(REST + SSE + 内嵌前端) |
Metadata
Release files for mink-agent 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mink_agent-0.10.0-py3-none-musllinux_1_2_x86_64.whl | Python 3 | none | Linux musl 1.2+ x86-64 | Details for mink_agent-0.10.0-py3-none-musllinux_1_2_x86_64.whl |
| mink_agent-0.10.0-py3-none-manylinux_2_35_x86_64.whl | Python 3 | none | Linux glibc 2.35+ x86-64 | Details for mink_agent-0.10.0-py3-none-manylinux_2_35_x86_64.whl |
| mink_agent-0.10.0-py3-none-macosx_26_0_arm64.whl | Python 3 | none | macOS 26.0+ ARM64 | Details for mink_agent-0.10.0-py3-none-macosx_26_0_arm64.whl |
Total release size: 12.4 MB
Release files / mink_agent-0.10.0-py3-none-musllinux_1_2_x86_64.whl
| Download URL | mink_agent-0.10.0-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.3 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
b0b9afec7861ab62a8ee2836932bdbb8fd9d0d909939d49a478839bd882b4340
|
|
BLAKE2b-256 checksum How to use checksums |
8fefcc913f78201e2c44d68b33eb684e57412f8bb1e70acab737776108235635
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 27, 2026.
Transparency logRelease files / mink_agent-0.10.0-py3-none-manylinux_2_35_x86_64.whl
| Download URL | mink_agent-0.10.0-py3-none-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 4.3 MB |
| Tags | Linux glibc 2.35+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
a481a67968cf9a9a459680bd8f47537389f5b3ca326577a7239ec8351f2ce2df
|
|
BLAKE2b-256 checksum How to use checksums |
bb2d3450052e9a130c67d7d1fb80cd91cbafab2a6d3fcafaad3e440a7d48b9c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 27, 2026.
Transparency logRelease files / mink_agent-0.10.0-py3-none-macosx_26_0_arm64.whl
| Download URL | mink_agent-0.10.0-py3-none-macosx_26_0_arm64.whl |
|---|---|
| Size | 3.7 MB |
| Tags | Python 3 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
701fd87b7634944e6e064dd027b5b00f93176ed44dd412b7a4eab77d6bfb6623
|
|
BLAKE2b-256 checksum How to use checksums |
0c81448f1dbbe9ffbcb384754bfd8d45c0395ff360c5cda17efe42b4297b4da0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 27, 2026.
Transparency logSecurity for mink-agent 0.10.0
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.
Full provenance
All 3 files in this release have been uploaded with provenance metadata.
Attestation for mink_agent-0.10.0-py3-none-musllinux_1_2_x86_64.whl
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 Nov 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.