Skip to main content

Mink

Crates.io MIT licensed Rust 1.99+ Python SDK

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.11.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

要求 Python ≥ 3.10。

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"])

性能实测

以下数据来自已归档的发布测量记录;报告链接保留原始测量版本。

在 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-goal 可选跨轮 Goal 编排(GoalPlugin / GoalEngine,通过公开扩展接缝接入)
crates/mink-rim 可选声明式外环装配(Scope / SeatRegistry / RimProfile / RuntimeAssembler)
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.11.0

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 mink-agent 0.11.0
File Interpreter ABI Platform Actions
mink_agent-0.11.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for mink_agent-0.11.0-py3-none-musllinux_1_2_x86_64.whl
mink_agent-0.11.0-py3-none-manylinux_2_35_x86_64.whl Python 3 none Linux glibc 2.35+ x86-64 Details for mink_agent-0.11.0-py3-none-manylinux_2_35_x86_64.whl
mink_agent-0.11.0-py3-none-macosx_26_0_arm64.whl Python 3 none macOS 26.0+ ARM64 Details for mink_agent-0.11.0-py3-none-macosx_26_0_arm64.whl

Total release size: 15.0 MB

Release files / mink_agent-0.11.0-py3-none-musllinux_1_2_x86_64.whl

Download URL mink_agent-0.11.0-py3-none-musllinux_1_2_x86_64.whl
Size 5.1 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
0b4bd6f529a8a85d95991ba234693c98d94b61c87e622c9c6840e5cd7bde6185
BLAKE2b-256 checksum
How to use checksums
e20b90cdfd286421e0fbff886ea2382df60dbeaaa8d880c43ef61f1f1f1031ed
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 30, 2026.

Transparency log

Release files / mink_agent-0.11.0-py3-none-manylinux_2_35_x86_64.whl

Download URL mink_agent-0.11.0-py3-none-manylinux_2_35_x86_64.whl
Size 5.1 MB
Tags Linux glibc 2.35+ x86-64 Python 3
SHA-256 checksum
How to use checksums
fe4f4ebcd34da313d0eba4c68227d5df1233b3b1ec4a5581707d650936d035cd
BLAKE2b-256 checksum
How to use checksums
ec4eb10a6902357475c17f593beb73f7057ab36a0bbde978749d0c05632d0133
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 30, 2026.

Transparency log

Release files / mink_agent-0.11.0-py3-none-macosx_26_0_arm64.whl

Download URL mink_agent-0.11.0-py3-none-macosx_26_0_arm64.whl
Size 4.7 MB
Tags Python 3 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
18c84dae48e0bf35267ee08c25b209d3bf60bedfda9cc99ce1043b743dc0fc34
BLAKE2b-256 checksum
How to use checksums
289cad93cf2b818d99fad69cf97c8314d2309624a2add268d1e1f65bd6f277a6
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 30, 2026.

Transparency log

Security for mink-agent 0.11.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.

Select from 3 files

Attestation for mink_agent-0.11.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 30, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.11.0 This release

3 release files Full provenance

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