Token导航 LogoToken导航TokenDH.com
rustyhand (Ginkida) logo
AI代理stdio官方级别未说明来源级核验

rustyhand (Ginkida)

MCP Server

RustyHand 是一个开源的代理操作系统,专为自主代理设计,支持多通道通信、多种LLM提供商和丰富的内置工具。

工具数

0

提示词数

0

GitHub Stars

17

资源数

0
开源RustClaudeClaude DesktopClaudeCursorWindsurf

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

ginkida

提供方

ginkida

最后核验

2026/5/17 20:20

运行时

Docker

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

docker run -p 4200:4200 \

详细介绍

RustyHand

The Agent Operating System

Open-source Agent OS built in Rust. 124K LOC. 10 crates. 1,577 tests. Zero clippy warnings.

One binary. Autonomous Telegram agent. Agents that actually work for you.

Quick Start • CLI Reference • API Docs

______________________________________________________________________

v0.7.33–v0.7.41--演示模式+持久性+产品抛光(2026年5月) 克隆→ cargo run --release start → 打开仪表板→ 与代理人交谈。 不需要API密钥。 当在环境中找不到提供者密钥时, RustyHand回归到确定性模拟驱动程序,并播种了四个样本 资源,因此每个主要的仪表板页面在首次访问时都是交互式的: - rusty 欢迎代理(聊天就绪) - demo-pipeline 工作流(两步示例,单击运行) - 样本代理生成触发器 - demo-daily-ping cron作业(已注册,默认禁用) 首次访问时的欢迎模式通过一键导航列出了所有四个选项。 CLI启动横幅和Docker入口点都宣布了演示模式 作为一项功能,而不是缺少按键警告。集 ANTHROPIC_API_KEY (或其他26个受支持提供商的环境变量中的任何一个)并重新启动 LLM回复,或 RUSTYHAND_DISABLE_DEMO_MODE=1 迫使失败。 自v0.7.27以来新增: - 审核日志持续存在 --Merkle哈希链位于 ~/.rustyhand/data/audit.jsonl, 在启动时重放并验证。 - 触发器和工作流持续存在 --webhook触发器和管道 定义在守护进程重启后仍然存在,包括微妙的状态,如 max_fires 自动禁用和触发火灾计数。 - 31 API响应形状合同测试 --仪表板上的每个端点 或者CLI读取被固定到其JSON形状,因此服务器端重命名失败 大声CI,而不是产生一个无声的空小部件。 - 6次模拟驾驶员e2e测试 --完整HTTP→ 内核→ 驾驶员→ 结果 管道在CI中运行,而不会燃烧真正的LLM学分,包括代理 消息往返、工作流运行、所有三个CronAction变体,以及 演示模式自动生成流。 - 时间42→ 44 为了 防锈-2026-0114.

______________________________________________________________________

起源

该项目基于 OpenFang 由RightNow AI开发,针对自定义用例进行了修改和扩展。

目录

______________________________________________________________________

RustyHand是什么?

RustyHand是一个 开源代理操作系统 --不是聊天机器人框架,也不是围绕LLM的Python包装器。它是一个完整的自主代理操作系统,用Rust从头开始构建。

传统的代理框架等待您键入内容。RustyHand跑步 为您工作的自主代理 --按计划,24/7,构建知识图,监控目标,生成潜在客户,管理社交媒体,并将结果直接报告给您的 电报聊天.

Telegram第一自主代理

Telegram是RustyHand代理的主要接口。您的代理人可以:

能力它是如何工作的
查看照片通过视觉API自动描绘图像
听到声音通过Whisper自动转录语音信息
接收文件下载文档,转发给代理
发送文件/照片/语音将生成的内容发送回聊天室
请求许可自动按下内联键盘按钮(批准/拒绝)
显示进度实时工具使用更新:“⚙️ 网络搜索。.." → "✅ 完成”
自主报告后台任务将结果推送到您的聊天中,而不会提示
61个内置工具Shell、网络/新闻搜索、浏览器(等待、JS exec、滚动、下载)、RAG、知识图谱
Markdown格式粗体、斜体、代码块在Telegram中原生呈现
回复线程响应回复用户的消息,以实现干净的对话流
贴纸/GIF/位置Agent了解贴纸、动画和共享位置

整个系统编译为 单个~32MB二进制文件一个安装,一个命令,你的代理就上线了。

______________________________________________________________________

安装

单行程序(Linux/macOS/WSL)

curl -fsSL https://raw.githubusercontent.com/ginkida/rustyhand/main/scripts/install.sh | sh

环境变量:

  • RUSTY_HAND_INSTALL_DIR --自定义安装路径(默认: ~/.rustyhand/bin)
  • RUSTY_HAND_VERSION --固定一个特定的版本标签

Windows(PowerShell)

irm https://raw.githubusercontent.com/ginkida/rustyhand/main/scripts/install.ps1 | iex

来源

git clone https://github.com/ginkida/rustyhand.git
cd rustyhand
cargo build --release -p rusty-hand-cli
# Binary: target/release/rustyhand (or rustyhand.exe on Windows)

需要Rust 1.75+(稳定)。这 rust-toolchain.toml 在repo中会自动选择正确的工具链。

码头工人

docker compose up --build
# Dashboard at http://localhost:4200

或者直接使用env-vars运行(不需要config.toml):

docker run -p 4200:4200 \
  -e ANTHROPIC_API_KEY=your-key \
  -e RUSTYHAND_API_KEY=my-secret-bearer-token \
  -v rustyhand-data:/data \
  ghcr.io/ginkida/rustyhand:latest

所有配置都可以通过以下方式设置 RUSTYHAND_* 环境变量--请参见 .

______________________________________________________________________

快速开始

选项零:30秒后试用,无API密钥

最快的首次运行,无需凭据,无需配置:

git clone https://github.com/ginkida/rustyhand
cd rustyhand
cargo run --release -- start
# In another tab: open http://localhost:4200

仪表板横幅将显示 “演示模式——在确定性上运行 模拟司机。" 生成代理,发送消息,观察代理循环运行, 会话增长,审计日志填满。每个回复都是 [mock] — 毫无疑问是演示,但完整的流程(会话、持久性、工作流、, cron jobs)是真实的。集 ANTHROPIC_API_KEY (或其他26种支持中的任何一种 提供程序的env变量)并重新启动以获得真正的LLM响应。

选项A:Docker(最快)

docker run -d --name rustyhand \
  -p 4200:4200 \
  -e ANTHROPIC_API_KEY=your-key \
  -v rustyhand-data:/data \
  ghcr.io/ginkida/rustyhand:latest

# Dashboard: http://localhost:4200
# API:       http://localhost:4200/api/health

要使用承载令牌保护API,请执行以下操作:

docker run -d --name rustyhand \
  -p 4200:4200 \
  -e ANTHROPIC_API_KEY=your-key \
  -e RUSTYHAND_API_KEY=my-secret-token \
  -v rustyhand-data:/data \
  ghcr.io/ginkida/rustyhand:latest

# Now all API calls require: -H "Authorization: Bearer my-secret-token"

看 对于所有选项。

选项B:从二进制

# 1. Initialize — creates ~/.rustyhand/ and walks you through provider setup
rustyhand init

# 2. Start the daemon (API + kernel)
rustyhand start
# Dashboard is live at http://localhost:4200

# 3. Chat with the default agent
rustyhand chat

# 4. Spawn a pre-built agent
rustyhand agent new coder

# 5. Send a one-shot message
rustyhand message researcher "What are the emerging trends in AI agent frameworks?"

# 6. Launch the interactive TUI dashboard
rustyhand tui

# 7. Run diagnostics
rustyhand doctor

______________________________________________________________________

电报设置

Telegram是 主渠道 用于与RustyHand代理进行交互。安装需要2分钟:

1.创建Telegram Bot

  1. 消息 @植物学家 在Telegram上
  2. 发送 /newbot,按照提示,获取您的bot令牌
  3. 设置令牌: export TELEGRAM_BOT_TOKEN=123456:ABC-DEF...

2.配置RustyHand

# ~/.rustyhand/config.toml
[channels.telegram]
bot_token_env = "TELEGRAM_BOT_TOKEN"
allowed_users = []    # Empty = allow anyone. Set [123456] for specific user IDs.

3.开始聊天

rustyhand start
# Open Telegram, message your bot
# /agents — list agents
# /agent assistant — select an agent
# Send text, photos, voice messages — the agent handles all of them

你的代理人可以在Telegram上做什么

You:     [send a voice message]
Agent:   [auto-transcribes via Whisper, processes your request]

You:     [send a photo]
Agent:   [auto-describes the image, responds based on what it sees]

You:     "Search for Rust 2024 edition changes"
Agent:   ⚙️ web_search...
         ✅ web_search
         Here are the key changes in Rust 2024...

Agent:   ⚠️ Agent "coder" wants to execute:
         `shell_exec: rm -rf /tmp/cache`
         [✅ Approve] [❌ Reject]    ⏱️ 60s

You:     [click ✅ Approve]
Agent:   Done! Cache cleared.

自主模式

代理商与 schedule_mode = "continuous""periodic" 在后台运行 将结果自动推送到您的Telegram聊天 --不需要提示。

# agent.toml
[schedule]
mode = "periodic"
cron = "0 9 * * *"    # Every day at 9 AM

代理醒来,执行任务,并将结果发送到它上次使用的Telegram聊天。

______________________________________________________________________

配置

RustyHand可以通过两种方式进行配置:

  • 配置文件 (~/.rustyhand/config.toml)--用于二进制安装
  • 环境变量 (RUSTYHAND_*)--关于Docker,请参阅

API身份验证

api_key 已设置,所有端点(除 /api/health)需要一个Bearer令牌:

# In config.toml:
api_key = "my-secret-token"

# Or via env var (Docker):
RUSTYHAND_API_KEY=my-secret-token

# Clients must include the header:
curl -H "Authorization: Bearer my-secret-token" http://localhost:4200/api/agents

没有 api_key,API是开放的(适合本地开发)。

配置文件

地点: ~/.rustyhand/config.toml

# API server settings
api_key = "your-bearer-token"          # Recommended for non-localhost access
api_listen = "127.0.0.1:4200"          # HTTP bind address

[default_model]
provider = "anthropic"                 # anthropic, kimi, deepseek, zhipu, minimax, openrouter, ollama
model = "claude-sonnet-4-20250514"     # Model identifier
api_key_env = "ANTHROPIC_API_KEY"      # Env var holding the API key
# base_url = "https://api.anthropic.com"  # Optional: override endpoint

[memory]
decay_rate = 0.05                      # Memory confidence decay
# sqlite_path = "~/.rustyhand/data/rustyhand.db"

[network]
listen_addr = "127.0.0.1:4200"        # RHP P2P listen address
# shared_secret = ""                  # Required for P2P authentication

# Session compaction (LLM-based context management)
[compaction]
threshold = 80                         # Compact when messages exceed this count
keep_recent = 20                       # Keep this many recent messages
max_summary_tokens = 1024

# Usage display in chat responses
# usage_footer = "Full"               # Off, Tokens, Cost, Full

# Channel adapters (tokens via env vars)
[telegram]
bot_token_env = "TELEGRAM_BOT_TOKEN"
allowed_users = []                     # Empty = allow all

[discord]
bot_token_env = "DISCORD_BOT_TOKEN"
# guild_ids = []

[slack]
bot_token_env = "SLACK_BOT_TOKEN"
app_token_env = "SLACK_APP_TOKEN"

# MCP server connections
[[mcp_servers]]
name = "filesystem"
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]

环境变量

复制 .env.example~/.rustyhand/.env 并填写您需要的密钥:

# LLM providers — set ANY key and RustyHand auto-detects the provider.
# Priority order: Anthropic → Kimi → DeepSeek → Zhipu → MiniMax → OpenRouter.
ANTHROPIC_API_KEY=sk-ant-...       # Claude Opus / Sonnet / Haiku (default)
KIMI_API_KEY=sk-kimi-...            # Kimi Code — Anthropic-compat, 256K ctx
DEEPSEEK_API_KEY=sk-...             # DeepSeek V4 Flash / V4 Pro (V3/R1 legacy, deprecated 2026-07-24)
ZHIPU_API_KEY=...                   # Zhipu GLM-4.6
MINIMAX_API_KEY=eyJ...              # MiniMax M1 / M2.7 (1M context)
OPENROUTER_API_KEY=sk-or-...        # Universal gateway (GPT/Gemini/Grok/etc.)

# Local LLM — no key needed, just run `ollama serve`
# (Base URL defaults to http://localhost:11434/v1 — override only if needed)

# Embedding-only upstreams (independent of LLM provider)
VOYAGE_API_KEY=pa-...                # Voyage AI (voyage-3-lite, code, legal, ...)
# OPENAI_API_KEY can also be used for text-embedding-3-* — not for LLM completion.

# Channel tokens
TELEGRAM_BOT_TOKEN=123456:ABC-...
DISCORD_BOT_TOKEN=...
SLACK_BOT_TOKEN=xoxb-...
SLACK_APP_TOKEN=xapp-...

# Log level
RUST_LOG=info
# RUST_LOG=rusty_hand=debug            # Debug RustyHand only

从CLI管理配置

rustyhand config show                              # Print current config
rustyhand config edit                              # Open in $EDITOR
rustyhand config get default_model.provider        # Read a key
rustyhand config set default_model.provider kimi   # Switch provider
rustyhand config set-key kimi                      # Interactively save API key
rustyhand config test-key kimi                     # Verify connectivity

______________________________________________________________________

CLI参考

核心命令

命令描述
rustyhand init初始化 ~/.rustyhand/ 和默认配置
rustyhand start启动守护进程(API服务器+内核)
rustyhand stop停止正在运行的守护进程
rustyhand status [--json]显示内核状态
rustyhand health [--json]快速守护进程健康检查
rustyhand doctor [--repair]运行诊断检查
rustyhand tui启动交互式TUI仪表板
rustyhand dashboard在浏览器中打开web仪表板
rustyhand chat [agent]与客服快速聊天
rustyhand message 发送一次性消息
rustyhand logs [--follow] [--lines N]跟踪日志文件
rustyhand reset [--confirm]重置本地配置和状态

代理

命令描述
rustyhand agent new [template]从模板生成(如果省略,则使用交互式选择器)
rustyhand agent spawn 从清单文件生成
rustyhand agent list [--json]列出正在运行的代理
rustyhand agent chat 通过ID与代理进行交互式聊天
rustyhand agent kill 杀死一名特工

频道

命令描述
rustyhand channel list列出已配置的通道和状态
rustyhand channel setup [name]交互式频道设置向导
rustyhand channel test 发送测试消息
rustyhand channel enable 启用频道
rustyhand channel disable 禁用频道

模型

命令描述
rustyhand models list [--provider X]浏览可用型号
rustyhand models aliases显示模型简写名称
rustyhand models providers列出提供者及其身份验证状态
rustyhand models set [model]设置默认模型

技能

命令描述
rustyhand skill install 从ClawHub、本地路径或git URL安装
rustyhand skill list列出已安装的技能
rustyhand skill search 搜索ClawHub市场
rustyhand skill remove 删除技能
rustyhand skill create掌握一项新技能

工作流程和日程安排

命令描述
rustyhand workflow list列出工作流
rustyhand workflow create 从JSON创建
rustyhand workflow run 运行工作流
rustyhand trigger list [--agent-id X]列出事件触发器
`rustyhand trigger create
`创建触发器
rustyhand cron list列出计划作业

集成(MCP)

命令描述
rustyhand add [--key TOKEN]安装集成(例如。, github, notion)
rustyhand remove 删除集成
rustyhand integrations [query]列表/搜索集成

安保和保险库

命令描述
rustyhand vault init初始化凭证库(AES-256-GCM)
rustyhand vault set 存储凭据
rustyhand vault list列出存储的密钥(隐藏值)
rustyhand vault remove 删除凭据
rustyhand security audit查看审计跟踪
rustyhand security rbac管理访问控制

其他

命令描述
rustyhand mcp通过stdio启动MCP服务器
rustyhand sessions [agent]列出对话会话
rustyhand approvals list列出待批准的请求
rustyhand qr生成设备配对二维码
rustyhand onboard交互式入职向导
rustyhand completion 生成shell补全(bash/zsh/fish/powershell)
`rustyhand new skill\integration`构建新技能或整合

支持所有列表/状态命令 --json 用于脚本编写。

______________________________________________________________________

自主模板

RustyHand将自主模板作为代理预设发布在仪表板中。它们不是一个单独的运行时实体:每个模板都会创建一个普通的代理,您可以在创建过程中附加一个cron计划。

每个自主模板捆绑:

  • 代理预设 --模型、配置文件、提示和功能
  • 计划默认值 --建议的cron表达式和触发消息
  • 作战手册 --重复性工作的多阶段提示
  • 护栏 --必要时的批准和工具限制

捆绑式自主模板

Template它做什么
GitHub监视器按计划监控存储库、运行测试、检测回归和文件问题。
网络研究员运行定期研究扫描,交叉引用来源,并生成结构化报告。
内容剪辑器将长视频处理成带有字幕和包装的短片。
引线发生器定期发现并丰富合格的潜在客户。
英特尔收集器监控目标、检测变化并更新实时知识库。
预测器收集信号、更新预测并跟踪预测准确性。
推特管理员使用审批控件创建、安排和查看社交内容。
网页浏览器执行具有严格购买审批权限的重复浏览器自动化任务。

使用仪表板启动一个: 代理→ 模板创建代理→ 启用计划.

______________________________________________________________________

40个预构建的代理模板

生成任何模板 rustyhand agent new :

模板说明
analyst数据分析和报告
api-monitorAPI端点监控
architect系统设计和架构
assistant通用助理
capability-builder元代理 --通过特权在运行时写入新技能 skill_install 工具
ci-monitorCI/CD管道监控
code-reviewer代码审查和反馈
coder软件开发
coordinator元代理 --代表们通过以下方式跨其他代理工作 agent_send
customer-support客户支持
dag-monitorDAG/工作流监控
data-scientist数据科学与机器学习
db-reporter数据库报告
debuggerBug调查
devops-leadDevOps和基础设施
diagnostic元代理 --只读可观察性(自我历史、指标、审计日志)
doc-writer文件
email-assistant电子邮件起草和管理
health-tracker健康和健身跟踪
hello-world新用户的启动代理
home-automation智能家居控制
legal-assistant法律文件审查
log-analyzer日志分析和警报
meeting-assistant会议记录和后续行动
ops运营管理
orchestrator多代理编排
personal-finance财务跟踪
planner项目规划
recruiter招聘和筛选
researcher研究和分析
sales-assistant销售支持
security-auditor安全分析
slack-notifierSlack通知自动化
social-media社交媒体管理
test-engineer测试和质量保证
translator多语言翻译
travel-planner旅行计划
tutor教育和辅导
weekly-digest每周总结报告
writer内容写作

代理清单格式(agent.toml)

name = "hello-world"
version = "0.1.0"
description = "A friendly greeting agent"
author = "rusty-hand"
module = "builtin:chat"

[model]
provider = "anthropic"
model = "claude-sonnet-4-20250514"
max_tokens = 4096
temperature = 0.6
system_prompt = """Your system prompt here..."""

[resources]
max_llm_tokens_per_hour = 100000

[capabilities]
tools = ["file_read", "file_list", "web_fetch", "web_search", "memory_store", "memory_recall"]
network = ["*"]
memory_read = ["*"]
memory_write = ["self.*"]
agent_spawn = false

______________________________________________________________________

通道适配器

RustyHand提供了三个消息传递适配器——这些适配器的API在没有 公共webhook URL,这是大多数用户实际运行的URL:

  • 电报 -长轮询Bot API(@BotFather 令牌)。
  • Discord 的中文翻译是“不和谐”或“纷争”。 --网关WebSocket(开发人员门户机器人令牌)。
  • Slack --插座模式(xapp- 应用程序令牌+ xoxb- bot令牌)。

每个适配器支持每通道模型覆盖、DM/组策略、速率 限制和输出格式化。

v0.7.4及更早版本共提供了38个适配器(Matrix、WhatsApp、Signal、Teams、, IRC。..).它们在v0.7.5版本中被丢弃了——大多数只是webhook,已经损坏 在典型的localhost/home Docker设置中,许多都是sprint填充器 没有实际使用。如果需要,请固定到v0.7.4,或者打开问题并 我们将讨论一条路线。

渠道政策

配置下的每个通道 [channels.*] 桌子在 config.toml:

[channels.telegram]
bot_token_env = "TELEGRAM_BOT_TOKEN"
allowed_users = [123456789]            # Restrict to specific users
default_agent = "assistant"            # Route inbound messages here

[channels.telegram.overrides]
dm_policy = "Respond"                  # Respond | AllowedOnly | Ignore
group_policy = "MentionOnly"           # All | MentionOnly | CommandsOnly | Ignore
output_format = "TelegramHtml"         # Markdown | TelegramHtml | SlackMrkdwn | PlainText

Docker上的零配置电报

从v0.7.10开始,Docker入口点生成 default_agent = "assistant" 每个下面 [channels.*] 部分自动(用覆盖 RUSTYHAND_{TELEGRAM,DISCORD,SLACK}_DEFAULT_AGENT env var,或将其设置为 空字符串使其为空)。捆绑 assistant 清单用途 provider = "anthropic",所以一个新鲜的容器 ANTHROPIC_API_KEY 另外,bot令牌会在不进行任何额外配置的情况下回复第一条消息,或者 rustyhand init 步骤。

如果路由器在消息时间无法解析目标(否 default_agent,没有绑定,没有直接路由),网桥试图 首先自动路由到正在运行的代理,然后生成一个捆绑的代理 元代理(assistantcoordinatorcoder).用户只能看到 每次回退失败时显示配置指向错误消息。

______________________________________________________________________

7 LLM提供商

RustyHand v0.7.0配备了一套精心精简的7家提供商,由2线协议驱动(Anthropic Messages API+OpenAI兼容聊天功能)。人类学和 基米代码 是两个一流的编码提供商:

提供者环境变量角色
人类 (默认)ANTHROPIC_API_KEY克劳德·奥普/十四行诗/俳句——一流的工具使用+扩展思维
基米(Moonshot)KIMI_API_KEYKimi Code——人类兼容,256K ctx,视觉,推理
深度求索DEEPSEEK_API_KEYV4 Flash+V4 Pro——快速和推理(V3/R1于2026年7月24日弃用)。还公开了一个与Anthropic兼容的端点 /anthropic
吉普 GLMZHIPU_API_KEYGLM-4.6--中国边境
最小最大MINIMAX_API_KEYM1/M2--1M上下文
开放路由OPENROUTER_API_KEY通用网关——任何型号只需一键
奥拉玛(无键)本地开启 localhost:11434

默认自动检测顺序:Anthropic→ Kimi → 深度求索→ 智浦→ 最小最大→ OpenRouter。设置您拥有的任何密钥;RustyHand挑选了第一个发现的。

喜欢基米?集 KIMI_API_KEY 自动检测将路由到 kimi-for-coding 在Kimi Code端点上(api.kimi.com/coding).随时更改 rustyhand config set default_model.provider .

v0.6.x出货了27家提供商(OpenAI、Gemini、Groq、xAI、Copilot、Mistral、Together、Fireworks、Perplexity、Cohere、AI21、Cerebras、SambaNova、HuggingFace、Replicate、vLLM、LM Studio、Moonshot、Qwen、Qianfan、Bedrock)。它们在v0.7.0中被删除了——使用 openrouter 通过一个网关访问这些模型中的任何一个。

特征:

  • 具有任务复杂性评分的智能路由
  • 提供者之间的自动回退
  • 按型号定价和成本跟踪
  • 每个代理的预算限制

嵌入提供者

向量嵌入有助于语义记忆回忆。目录独立于 LLM提供者列表-- OPENAI_API_KEY 仍然可用于文本嵌入-3-\* 尽管OpenAI在v0.7.0中不是一流的LLM提供商。

启动时自动检测到(第一个可用获胜):

提供者型号需要密钥
Voyage AI航行3、航行3-lite、航行代码-3、航行财务-2、航行法律-2、航行多语言-2VOYAGE_API_KEY
开放人工智能 (仅嵌入)文本嵌入-3小,文本嵌入-3大,文本嵌入-ada-002OPENAI_API_KEY
奥拉玛nomic嵌入文本,全MiniLM-L6-v2,mxbai嵌入大
任何OpenAI兼容端点无论服务器公开什么特定于提供者

在中明确配置 config.toml:

[memory]
embedding_provider = "voyage"              # or "openai", "ollama", ""
embedding_api_key_env = "VOYAGE_API_KEY"

或者让RustyHand自动检测:它探测Voyage→ 开放人工智能→ Ollama启动并使用第一个可用的提供商。当找不到嵌入驱动程序时,回退到文本搜索(SQLite LIKE)。

rustyhand models list                 # Browse all models
rustyhand models list --provider kimi # Filter by provider
rustyhand models set claude-sonnet    # Set default model

______________________________________________________________________

建筑

10个模块化内核设计的Rust机箱:

rusty-hand-types       Core types, traits, config, taint tracking, Ed25519 manifest signing
    |
    +-- rusty-hand-memory      SQLite persistence, vector embeddings (Voyage/OpenAI/Ollama), session compaction
    +-- rusty-hand-wire        RHP P2P protocol (JSON-RPC over TCP, HMAC-SHA256 auth)
    +-- rusty-hand-channels    Telegram + Discord + Slack adapters with rate limiting
    +-- rusty-hand-skills      Skill system + ClawHub marketplace
    +-- rusty-hand-extensions  25 MCP integrations, AES-256-GCM credential vault, OAuth2
    |
    +-- rusty-hand-runtime     Agent loop, 2 LLM drivers (Anthropic + OpenAI-compat), 53+ tools, WASM sandbox, MCP, A2A
    |
    +-- rusty-hand-kernel      Orchestration: lifecycle, scheduling, metering, RBAC, workflows
    |
    +-- rusty-hand-api         Axum HTTP daemon, 120+ endpoints, WebSocket, SSE, OpenAI-compat
    |
    +-- rusty-hand-cli         CLI binary + TUI dashboard (ratatui)

关键内部构件

概念实施
代理循环rusty-hand-runtime --迭代LLM调用→ 工具执行→ 响应周期
内核RustyHandKernel struct(40+字段)——所有子系统的中央编排
AppState通过以下方式将内核连接到HTTP路由 Arc 阿克苏姆州
沙盒WASM(wasmtime),带燃油计量+纪元中断+监视线程
记忆SQLite+向量嵌入(Voyage AI、OpenAI、Ollama)用于语义搜索+知识图
计量每个代理的令牌/成本跟踪,包括预算执行和警报
对等网络RHP(RustyHand协议)——基于TCP的JSON-RPC,Ed25519身份,基于随机数的身份验证
A2A用于跨实例代理通信的代理到代理协议

______________________________________________________________________

API终点

违约: http://127.0.0.1:4200。所有端点都返回JSON。通过以下方式进行身份验证 Authorization: Bearer api_key 在config中设置。

健康与状态

端点方法描述
/api/healthGET健康检查
/api/statusGET完整内核状态

代理

端点方法描述
/api/agentsGET列出所有代理
/api/agentsPOST生成新代理
/api/agents/{id}GET代理详细信息
/api/agents/{id}DELETE杀死代理
/api/agents/{id}/messagePOST发送消息(触发LLM)

预算

端点方法描述
/api/budgetGET全球预算状态
/api/budgetPUT更新预算设置
/api/budget/agentsGET每个代理的成本排名
/api/budget/agents/{id}GET单代理预算明细

网络和P2P

端点方法描述
/api/network/statusGETRHP网络状态
/api/peersGET已连接的对等体

A2A(代理人对代理人)

端点方法描述
/api/a2a/agentsGET外部A2A代理
/api/a2a/discoverPOST在URL处发现代理
/api/a2a/sendPOST将任务发送给外部代理
/api/a2a/tasks/{id}/statusGET检查任务状态

OpenAI兼容

OpenAI API的插入式替换:

curl -X POST http://localhost:4200/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "researcher",
    "messages": [{"role": "user", "content": "Analyze Q4 market trends"}],
    "stream": true
  }'

完整的REST/WS/SE端点涵盖代理、内存、工作流、通道、模型、技能、会话、批准、触发器、cron、安全性等(共120多个)。

______________________________________________________________________

仪表板

web仪表板位于 http://localhost:4200 当守护进程运行时。从v0.7.45开始,它是一个React 18控制面板(工业防锈调色板,15页);React+ReactDOM UMD包和预编译的JSX在编译时内联到二进制文件中,因此仪表板像以前一样只提供单个二进制文件——没有CDN,没有 node_modules 在运行时。

章节

第节你看到了什么
概述实时互动程序(运行代理、成本、审计条目、错误)、最近的活动、等待批准、演示种子快捷方式、提供商、审计链负责人
代理生成(模板或自定义)、终止/重启、带信息/配置/身份/活动选项卡的抽屉,实时编辑代理的清单
聊天具有HTTP回退、markdown渲染、工具跟踪卡、每个代理的会话列表的WebSocket流
工作流可视化步骤构建器,具有HTML5拖放重新排序、扇出/收集/条件/循环模式、运行历史记录、使用JSON输入运行
自动化Cron作业(3个计划×3个动作变体)、触发器(9个模式变体)、切换/立即运行/删除
频道配置从生成的模态 /api/channels 字段元数据,测试/重新加载/断开连接
技能通过内联编辑器自定义安装,ClawHub浏览+搜索+安装,卸载
分析成本、请求、缓存命中率、p95延迟、顶级代理、提供者状态、CSV导出
知识实时图形可视化+迷你密码查询(source:foo relation:works_at depth:3 → POST /api/knowledge/query)
记忆会话列表,标签编辑+删除,导出到markdown,通过以下方式进行完全备份/还原 /api/memory/{export,import}
审批一键批准/拒绝待定决定
审核日志最近+链验证+JSON导出
MCP服务器配置+连接MCP网桥 /api/mcp/servers
网络RHP P2P状态+已知对等体(/api/network/status, /api/peers)
绑定代理商→ 通道/触发器绑定(/api/bindings)
设置提供程序密钥集/删除/测试、演示模式信息、构建信息

其他细节:⌘K/Ctrl-K命令调色板、烤面包通知、调整fab(主题暗/亮、强调锈/铜/琥珀/森林/电、密度), AuthGate + LoginScreen 对于远程部署,错误边界使组件崩溃显示恢复卡而不是空白 #root.

维护面板

JSX来源于 crates/rusty-hand-api/static/js/panel/src/*.jsx;编译的输出位于上一级 static/js/panel/*.js.编辑JSX后,通过以下方式重新编译:

cd crates/rusty-hand-api/static/js/panel/src && ./build.sh

构建需要Node+esbuild(npm i -g esbuild 或使用 ESBUILD="npx --yes esbuild@0.24.0" ./build.sh).Rust构建本身并不涉及Node——它 include_str!.js 文件夹。A. build.rs 检查JSX/JS mtimes并发出 cargo:warning= 如果你忘记重新编译。

锁定面板合同的测试:

  • tests/panel_dashboard_test.rs --10个测试断言HTML响应,React内联,每个页面组件+端点连接,无Alpine残差,包大小100 KB≤x≤1 MB
  • tests/panel_jsx_smoke.rs --使用React填充程序在Node下运行编译后的包,并断言每个页面组件实例化而不抛出(捕获字符串匹配测试错过的JSX运行时错误)

______________________________________________________________________

安全

16个独立的安全层——深度防御,无单点故障。

#系统说明
1WASM双计量沙箱工具代码在WebAssembly中运行,带有燃油计量+纪元中断。看门狗杀死了失控的代码。
2Merkle哈希链审计追踪每一个动作都是加密连接的。篡改一个入口,链条就会断裂。
3Taint跟踪信息流标签在执行过程中传播——从源到汇跟踪秘密。
4Ed25519签名清单代理身份和功能是加密签名的。
5SSRF保护阻止私有IP、云元数据端点、DNS重新绑定。
6秘密归零Zeroizing 当不再需要时,自动从内存中清除API密钥。
7RHP相互认证基于HMAC-SHA256随机数的P2P恒定时间验证。
8能力门基于角色的访问控制——代理声明工具,内核强制执行。
9安全标头每个响应上都有CSP、X-Frame-Options、HSTS、X-Content-Type-Options。
10健康红公共卫生检查返回的信息很少。完整的诊断需要身份验证。
11子流程沙盒env_clear() +选择性通过。使用跨平台kill进行进程树隔离。
12快速注射扫描仪检测覆盖尝试、数据泄露模式、shell注入技能。
13环路保护基于SHA256的断路器工具调用回路检测。
14会话修复7阶段消息历史验证和自动恢复。
15路径穿越预防规范化,防止符号链接逃逸。
16GCRA速率限制器具有成本意识的令牌桶速率限制和每个IP跟踪。

______________________________________________________________________

部署

系统化

服务文件提供在 deploy/rustyhand.service:

sudo cp deploy/rustyhand.service /etc/systemd/system/rustyhand.service
# Edit ExecStart path and user as needed
sudo systemctl daemon-reload
sudo systemctl enable --now rustyhand

该服务包括安全强化: NoNewPrivileges, ProtectSystem=strict, ProtectHome, PrivateTmp以及资源限制。

Docker环境变量

Docker入口点生成 config.toml 自动从环境变量中提取——不需要配置文件。如果你自己安装 config.toml,环境变量被忽略。

RUSTYHAND_FORCE_ENV_CONFIG=1 始终从env-vars重新生成配置(覆盖挂载的文件)。

核心

环境变量默认值描述
RUSTYHAND_API_KEY*(无)*承载身份验证令牌。 设置后,所有API终结点都需要 Authorization: Bearer 头球强烈建议非本地访问。
RUSTYHAND_API_LISTEN0.0.0.0:4200HTTP绑定地址
RUSTYHAND_LOG_LEVELinfo日志级别: trace, debug, info, warn, error

大语言模型提供商

环境变量默认值描述
RUSTYHAND_PROVIDERanthropicLLM提供者: anthropic, kimi, deepseek, zhipu, minimax, openrouter, ollama
RUSTYHAND_MODELclaude-sonnet-4-20250514型号标识符
RUSTYHAND_MODEL_KEY_ENVANTHROPIC_API_KEY哪个env var持有LLM API密钥
RUSTYHAND_MODEL_BASE_URL*(自动)*覆盖提供程序API终结点
RUSTYHAND_FALLBACK_PROVIDER*(无)*如果主服务器失败,则返回提供程序
RUSTYHAND_FALLBACK_MODEL*(无)*回退模型
RUSTYHAND_FALLBACK_KEY_ENV*(无)* Env用于回退API键。

LLM API密钥(传递到代理)

Env-var提供者
ANTHROPIC_API_KEY拟人克劳德(默认)
KIMI_API_KEYKimi Code(登月计划)
DEEPSEEK_API_KEYDeepSeek V4 Flash/V4 Pro(V3/R1旧版,2026-07-24弃用)
ZHIPU_API_KEY 是GLM-4.6。
MINIMAX_API_KEYMiniMax M1/M2
OPENROUTER_API_KEYOpenRouter网关(任何上游型号)

预算

环境变量默认值描述
RUSTYHAND_BUDGET_HOURLY0.0每小时最高消费额(美元)(0=无限制)
RUSTYHAND_BUDGET_DAILY0.0每日最高消费额(美元)
RUSTYHAND_BUDGET_MONTHLY0.0每月最大支出(美元)

内存和嵌入

环境变量默认值描述
RUSTYHAND_MEMORY_DECAY0.05记忆置信度衰减率
RUSTYHAND_EMBEDDING_PROVIDER*(自动)*嵌入提供程序: voyage, openai, ollama
RUSTYHAND_EMBEDDING_KEY_ENV*(自动)*用于嵌入API密钥的环境变量
VOYAGE_API_KEY*(无)*Voyage AI嵌入密钥

频道

环境变量描述
TELEGRAM_BOT_TOKENTelegram机器人——自动启用 [telegram] 部分
DISCORD_BOT_TOKENDiscord机器人——自动启用 [discord] 部分
SLACK_BOT_TOKENSlack机器人——自动启用 [slack] 部分
SLACK_APP_TOKENSlack应用程序级别令牌(用于套接字模式)
RUSTYHAND_TELEGRAM_USERS允许使用逗号分隔的Telegram用户ID(例如。 123456789,987654321).括号和引号是可以容忍的。支持负ID(通道)。Unset=对任何Telegram用户开放-- 强烈建议设置.

其他

环境变量描述
RUSTYHAND_EXEC_MODE壳牌执行政策: deny, allowlist, full
RUSTYHAND_A2A_ENABLED启用A2A协议: true / 1
RUSTYHAND_USAGE_FOOTER响应页脚: Off, Tokens, Cost, Full
RUSTYHAND_FORCE_ENV_CONFIG设置为 1 始终从环境变量重新生成配置

示例:完全运行Docker

docker run -d --name rustyhand \
  -p 4200:4200 \
  -e RUSTYHAND_API_KEY=my-secret-token \
  -e RUSTYHAND_PROVIDER=anthropic \
  -e RUSTYHAND_MODEL=claude-sonnet-4-20250514 \
  -e RUSTYHAND_MODEL_KEY_ENV=ANTHROPIC_API_KEY \
  -e ANTHROPIC_API_KEY=sk-ant-... \
  -e RUSTYHAND_BUDGET_DAILY=5.0 \
  -e TELEGRAM_BOT_TOKEN=123456:ABC... \
  -v rustyhand-data:/data \
  ghcr.io/ginkida/rustyhand:latest

交叉编译

交叉编译到 aarch64-unknown-linux-gnu 通过支持 Cross.toml:

cross build --release --target aarch64-unknown-linux-gnu -p rusty-hand-cli

______________________________________________________________________

发展

先决条件

  • 锈蚀1.75+(稳定)-- rust-toolchain.toml 自动选择
  • 组件: rustfmt, clippy (包含在工具链中)

构建和验证

# Compile all crates (use --lib if the daemon binary is locked)
cargo build --workspace --lib

# Run all tests (1,481 as of v0.7.10)
cargo test --workspace

# Lint — must be 0 warnings
cargo clippy --workspace --all-targets -- -D warnings

# Format check
cargo fmt --all -- --check

发布版本

cargo build --release -p rusty-hand-cli
# Binary: target/release/rustyhand (~32 MB)
# LTO + single codegen unit + stripped symbols + opt-level 3

项目结构

rustyhand/
  Cargo.toml                # Workspace manifest (10 member crates)
  Cargo.lock
  rust-toolchain.toml       # Rust stable + rustfmt + clippy
  .env.example              # Environment variable template
  Dockerfile                # Multi-stage build
  docker-compose.yml
  Cross.toml                # Cross-compilation config
  agents/                   # 37 pre-built agent templates (agent.toml each)
  deploy/                   # systemd service, Docker scripts
  scripts/                  # install.sh, install.ps1
  crates/
    rusty-hand-types/       # Core types (config.rs is the master config struct)
    rusty-hand-memory/      # SQLite + vector embeddings (Voyage AI, OpenAI, Ollama)
    rusty-hand-runtime/     # Agent loop + LLM drivers + tools + sandbox
    rusty-hand-wire/        # RHP P2P protocol
    rusty-hand-api/         # Axum HTTP server + routes + dashboard
      src/
        server.rs           # Router setup, middleware, AppState
        routes.rs           # All API endpoint handlers (~7600 LOC)
      static/
        index_body.html     # Dashboard SPA (Alpine.js)
        index_head.html     # CSS + fonts
    rusty-hand-kernel/      # Central kernel (~5300 LOC, 40+ fields)
    rusty-hand-cli/         # CLI + TUI binary
    rusty-hand-channels/    # Telegram + Discord + Slack adapters
    rusty-hand-skills/      # Skill system + ClawHub + OpenClaw compat
    rusty-hand-extensions/  # MCP + vault + OAuth2

贡献者的关键文件

文件它的作用
crates/rusty-hand-kernel/src/kernel.rs内核——40多个字段,中央编排
crates/rusty-hand-api/src/routes.rs所有API处理程序(约7600 LOC)
crates/rusty-hand-api/src/server.rs路由器、中间件, AppState 结构体
crates/rusty-hand-types/src/config.rs主配置结构(KernelConfig)
crates/rusty-hand-api/static/index_body.html仪表板SPA
crates/rusty-hand-api/src/channel_bridge.rs通道适配器接线
crates/rusty-hand-runtime/src/drivers/LLM驱动程序(anthropic.rs用于anthropic+Kimi;openai.rs用于DeepSeek/Zhpu/MiniMax/OpenRouter/Ollama)

常见陷阱

  • rustyhand.exe 如果守护进程正在运行,则可能会被锁定--use --lib 先标记或杀死守护进程
  • 新的配置字段需要:struct字段+ #[serde(default)] + Default impl条目
  • 新路线必须在中注册 server.rs 路由器AND实现于 routes.rs
  • 仪表板选项卡需要同时使用HTML index_body.html JS数据/方法
  • AgentLoopResult 字段是 .response.response_text
  • CLI守护程序命令为 start (不是 daemon)

______________________________________________________________________

基准测试

所有数据来自官方文件和公共存储库——2026年4月。

度量RustyHandZeroClawLangGraphCrewAIAutoGenOpenClaw
冷启动180毫秒10毫秒2.5秒3.0秒4.0秒5.98秒
空闲内存40 MB5 MB180 MB200 MB250 MB394 MB
安装尺寸32 MB8.8 MB150 MB100 MB200 MB500 MB
安全层1662123
通道适配器31500013
LLM提供商7(+OpenRouter网关)281510810
语言RustRustPythonPythonTypeScript

______________________________________________________________________

MCP集成(用于AI代理)

RustyHand将自己暴露为 MCP服务器 通过stdio,任何兼容MCP的AI代理(Claude Desktop、Cursor、Windsurf、Claude Code等)都可以完全控制代理操作系统。

设置

添加到MCP客户端配置中(例如。 claude_desktop_config.json):

{
  "mcpServers": {
    "rustyhand": {
      "command": "rustyhand",
      "args": ["mcp"]
    }
  }
}

就是这样。人工智能代理现在有30多种工具来管理整个系统。

可用的MCP工具

工具它做什么
系统
rustyhand_system_health检查守护进程运行状况和数据库连接
rustyhand_system_status正常运行时间、代理计数、默认提供商/型号
rustyhand_config_get读取当前配置(机密已编辑)
rustyhand_config_set按虚线路径设置配置字段(例如。 default_model.provider)
rustyhand_config_reload从以下位置热重新加载配置 ~/.rustyhand/config.toml
代理
rustyhand_agent_list列出所有代理(ID、名称、州、型号)
rustyhand_agent_get按ID列出的完整代理详细信息
rustyhand_agent_spawn从TOML清单中生成新代理
rustyhand_agent_kill停止并删除代理
rustyhand_agent_message发送消息,获得LLM供电响应
rustyhand_agent_session获取对话历史记录
rustyhand_agent_set_model在运行时更改代理的LLM模型
rustyhand_agent_session_reset清除对话历史记录
模型和供应商
rustyhand_provider_list所有7个具有身份验证状态的提供商
rustyhand_model_list可用模型(层次、上下文窗口、成本)
预算
rustyhand_budget_status全球支出与限额(小时/日/月)
rustyhand_budget_agents每个代理的成本排名
工作流
rustyhand_workflow_list列出工作流定义
rustyhand_workflow_run使用输入执行工作流
rustyhand_workflow_runs列出过去的工作流运行
克龙
rustyhand_cron_list列出所有计划作业
rustyhand_cron_create计划定期代理任务(cron表达式)
rustyhand_cron_delete删除计划作业
审批
rustyhand_approval_list列出待处理/已批准/已拒绝的请求
rustyhand_approval_approve批准待执行
rustyhand_approval_reject拒绝未决执行
其他
rustyhand_channel_list通道适配器及其状态
rustyhand_template_list可用的代理模板
rustyhand_tool_list代理可用的所有内置工具

另外:每个正在运行的代理都会自动成为一个名为 rusty_hand_agent_{name},因此AI代理可以将任务委托给专门的RustyHand代理。

示例:通过MCP的AI代理工作流

AI代理(Claude、GPT等)可以自主地:

  1. rustyhand_agent_spawn --创建具有web访问权限的研究员代理
  2. rustyhand_agent_message --让它研究一个主题
  3. rustyhand_agent_spawn --创建writer代理
  4. rustyhand_agent_message --将研究成果传递给作者
  5. rustyhand_cron_create --安排研究人员每周更新一次
  6. rustyhand_budget_status --看看这一切花了多少钱

为什么AI代理应该使用RustyHand

  • 委派工作 --培养专业代理人,而不是自己做所有事情
  • 持久内存 --代理跨会话记住上下文(向量搜索+知识图)
  • 3个频道 --无需构建集成即可在Telegram、Discord和Slack上接触用户
  • 预算控制 --设定支出限额,这样代理人就不会增加成本
  • 7名法学硕士提供者 --Anthropic、Kimi、DeepSeek、智普、MiniMax、OpenRouter、Ollama——加上OpenRouter网关到任何其他模型
  • 自主调度 --cron作业按计划运行代理,不需要人工
  • 60项捆绑技能 --Kubernetes、AWS、PostgreSQL、Git、Python等方面的即时专业知识。
  • 审批门 --危险行为在执行前需要人工批准
  • 审计跟踪 --每个操作都记录在Merkle哈希链中

用于编程访问的REST API

api_key 已配置,添加 -H "Authorization: Bearer " 所有请求(除 /api/health).

# Health check (always public)
curl http://localhost:4200/api/health

# List agents
curl http://localhost:4200/api/agents

# Spawn an agent
curl -X POST http://localhost:4200/api/agents \
  -H "Content-Type: application/json" \
  -d '{"manifest_toml": "name = \"my-agent\"\nmodule = \"builtin:chat\"\n[model]\nprovider = \"kimi\"\nmodel = \"kimi-for-coding\"\napi_key_env = \"KIMI_API_KEY\"\nsystem_prompt = \"You are a helpful assistant.\""}'

# Send a message (triggers LLM call, returns full response)
curl -X POST http://localhost:4200/api/agents/{id}/message \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello, what can you do?"}'

# Stream a response (SSE)
curl -N -X POST http://localhost:4200/api/agents/{id}/message/stream \
  -H "Content-Type: application/json" \
  -d '{"message": "Write a haiku about Rust"}'

# OpenAI-compatible endpoint (drop-in replacement for any OpenAI client)
curl -X POST http://localhost:4200/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "coder", "messages": [{"role": "user", "content": "Fix this bug"}]}'

# Budget status
curl http://localhost:4200/api/budget

# Memory — store and recall
curl -X PUT http://localhost:4200/api/memory/agents/{id}/kv/project_name \
  -H "Content-Type: application/json" \
  -d '{"value": "rustyhand"}'
curl http://localhost:4200/api/memory/agents/{id}/kv/project_name

# With auth enabled:
curl -H "Authorization: Bearer my-secret-token" http://localhost:4200/api/agents

Python和JavaScript的SDK包含在 sdk/python/sdk/javascript/.

______________________________________________________________________

工作原理——数据流

User message (CLI / API / Telegram / Discord / ...)
    |
    v
[Channel Adapter] --- converts platform message to unified ChannelMessage
    |
    v
[Kernel Router] --- resolves target agent via bindings/broadcast rules
    |
    v
[Agent Registry] --- looks up AgentManifest + Session
    |
    v
[Agent Loop] (rusty-hand-runtime/src/agent_loop.rs)
    |
    +-- 1. Recall memories (vector similarity via Voyage/OpenAI/Ollama, or text LIKE)
    +-- 2. Build system prompt (SOUL.md + USER.md + TOOLS.md + MEMORY.md + recalled context)
    +-- 3. Call LLM (driver: Anthropic or OpenAI-compat)
    |       |-- retry on rate limit (3x, exponential backoff)
    |       |-- fallback to next provider on failure
    |       |-- model routing by complexity (simple/medium/complex)
    +-- 4. If tool_use → execute tool → append result → goto 3 (max 50 iterations)
    |       |-- built-in: file_read, file_write, shell_exec, web_search, web_fetch,
    |       |             memory_store, memory_recall, agent_send, agent_spawn, browser_*
    |       |-- MCP tools: GitHub, Notion, Slack, PostgreSQL, ... (25+ integrations)
    |       |-- skills: 60 prompt-only + Python/WASM/Node.js executable skills
    +-- 5. Extract response text + reply directives
    |
    v
[Metering] --- record token usage + cost, check budget limits
    |
    v
[Session Save] --- persist messages to SQLite, append daily memory log
    |
    v
[Channel Adapter] --- format response for platform, send back
    |
    v
User receives response

关键类型

类型文件目的
KernelConfigcrates/rusty-hand-types/src/config.rs主配置(50多个字段,全部带 #[serde(default)])
AgentManifestcrates/rusty-hand-types/src/agent.rs代理定义(模型、工具、功能、资源)
RustyHandKernelcrates/rusty-hand-kernel/src/kernel.rs中央编排器(40+子系统字段)
LlmDrivercrates/rusty-hand-runtime/src/llm_driver.rs特性: complete() + complete_stream()
KernelHandlecrates/rusty-hand-runtime/src/kernel_handle.rs特征:代理间操作(生成、发送、杀死、内存、任务)
AppStatecrates/rusty-hand-api/src/routes.rsAxum状态: Arc +桥梁经理
AgentLoopResultcrates/rusty-hand-runtime/src/agent_loop.rs结果: .response, .total_usage, .cost_usd, .silent
MemorySubstratecrates/rusty-hand-memory/src/substrate.rs统一内存API(结构化+语义+知识图)
Eventcrates/rusty-hand-types/src/event.rs事件总线有效负载(消息、工具结果、生命周期、系统)
ToolDefinitioncrates/rusty-hand-types/src/tool.rsLLM的工具模式(名称、描述、JSON模式输入)

伸出生锈的手

添加新的LLM提供程序:

  1. 将基本URL常量添加到 crates/rusty-hand-types/src/model_catalog.rs
  2. 添加匹配臂 crates/rusty-hand-runtime/src/drivers/mod.rs provider_defaults()
  3. 大多数提供商使用OpenAI兼容的驱动程序——不需要新的驱动程序代码

添加新的API终结点:

  1. 在中添加处理程序函数 crates/rusty-hand-api/src/routes.rs
  2. 在中注册路线 crates/rusty-hand-api/src/server.rs build_router()
  3. 在中添加请求/响应类型 crates/rusty-hand-api/src/types.rs 如有需要

添加新的配置字段:

  1. 添加字段 #[serde(default)] 在结构中 crates/rusty-hand-types/src/config.rs
  2. 将默认值添加到 Default 实现
  3. 添加到自定义 Debug impl(编辑机密)

添加一个新的内置工具:

  1. 添加 ToolDefinitionbuiltin_tool_definitions()crates/rusty-hand-runtime/src/tool_runner.rs
  2. 在同一文件中添加执行处理程序 execute_tool() 匹配

添加新的通道适配器:

  1. 创建 crates/rusty-hand-channels/src/.rs
  2. 添加 pub mod crates/rusty-hand-channels/src/lib.rs
  3. 接入 crates/rusty-hand-api/src/channel_bridge.rs

______________________________________________________________________

许可证

麻省理工学院——随心所欲地使用它。

______________________________________________________________________

链接

______________________________________________________________________

致谢

______________________________________________________________________

Built with Rust. Secured with 16 layers. Agents that actually work for you.

目录标签

目录标签

开源RustClaude自主代理本地部署LLM集成Telegram集成

支持客户端

Claude DesktopClaudeCursorWindsurf

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

api-key

运行时(runtime,运行环境)

Docker

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdioapi-key部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP