Hope Agent is a cross-device personal AI assistant that remembers context, uses tools, and continues working toward goals through dynamically organized workflows. Individuals use it from desktop, web, server, or messaging environments to manage projects, knowledge, designs, and long-running tasks. The catalogue add-ons extend its agent workflows and capabilities.
Borrowing it
Nothing to install: this file belongs to shiwenwen/hope-agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shiwenwen/hope-agent/main/AGENTS.mdgit clone --depth 1 https://github.com/shiwenwen/hope-agentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/shiwenwen/hope-agent/agents-md)<a href="https://agentmods.dev/instructions/shiwenwen/hope-agent/agents-md"><img src="https://agentmods.dev/badge/instructions/shiwenwen/hope-agent/agents-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.16995 | $0.16995 |
| Opus 5 | $0.08497 | $0.08497 |
| Sonnet 5 | $0.03399 | $0.03399 |
| Haiku 4.5 | $0.01699 | $0.01699 |
Grade C, and why
hope-agent AGENTS.md scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
- **删除级联**:`rm -rf projects/{id}/` **绝不波及用户显式选的外部 working_dir**;跨 db 项目记忆单独删、启动期 reconciler 兜底 How it starts
The opening of the file, as written. The whole thing — 349 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Hope Agent
基于 Tauri 2 + React 19 + Rust 的本地 AI 助手桌面应用,内置 Provider 模板与预设模型,GUI 傻瓜式配置。三种运行模式:桌面 GUI(Tauri)、HTTP/WS 守护进程(hope-agent server)、ACP stdio(hope-agent acp)。技术栈见 package.json / Cargo.toml。
本文只放跨 PR 必守的红线、同步契约与唯一入口——实现细节、数据结构、迁移逻辑、边角行为一律在 docs/architecture/(索引 docs/README.md)。加内容前先问:删掉它会让 agent 犯错吗?不会就别加。前端 / UI 风格规范见 src/AGENTS.md(src/ 嵌套 AGENTS.md,改前端时自动生效)。
安全红线
- API Key / OAuth Token 禁止出现在任何日志中
- Server Owner Token 只许走 Bearer header 或同源登录 body,禁止进 URL;同源浏览器换 HttpOnly Cookie,跨源 WebSocket / iframe 只用短时、scope 受限票据,资源票据入口必须保持只读 allowlist
tauri.conf.jsonCSP 不要放行外部域名- OAuth token 在
~/.hope-agent/credentials/auth.json,登出时必须clear_token() - OAuth 保存只走安全目录与
write_secure_file_outcome,异步写经save_token_async;写入未发布不得报登录成功,已发布的令牌轮换不得按旧凭据重试
提交前检查(强制)
.husky/pre-push push 时自动跑全套门禁,与 CI required check 一一对应、改一边同步另一边;Agent 勿重跑。clippy / cargo test 覆盖 ha-base + ha-agent-loop + ha-agent-runtime + ha-memory + ha-goal + ha-workflow + ha-config-schema + ha-core + ha-acp + ha-browser + ha-channel + ha-cron + ha-dash + ha-design + ha-eval-runtime + ha-improve + ha-knowledge + ha-mac + ha-local-llm + ha-mcp + ha-media + ha-pet + ha-skills + ha-updater + ha-vcs + ha-weather + ha-server,src-tauri 不在门禁内、须 --workspace 自查。
- 开发中只单点验证(
cargo check -p <crate>/pnpm typecheck);跑 clippy / cargo test / pnpm {test,lint} 须先问用户等回复,例外限跨 crate / 多文件收尾,跑前说明 - 应急跳过:
HA_SKIP_PREPUSH=1(限纯.md/ 弱网)/HA_SKIP_PREPUSH_TEST=1(只跳 cargo test)。禁止--no-verify(会绕过 GPG 等钩子) - i18n 无 CI 兜底:当次改动涉及的 key 提交时须全语言齐全(存量缺失不强制),
node scripts/sync-i18n.mjs --check自查 - 评测不进 CI / PR / pre-push:完整专项评测只本地显式跑(
hope-agent-eval),默认cargo test只留快速契约测试;GitHub CI 不构建 ha-eval、不跑评测 smoke。详见 capability-eval
分支与发布
- 外部 Actions 固定完整提交摘要;R2 密钥只在读写步骤环境中可见,rclone 先验固定摘要再执行;守卫在
scripts/check-workflow-supply-chain.mjs(pre-push / CI 同源)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today Changed · +2 lines · +164 tokens per session 5da2bd340f30
- yesterday Changed · +2 lines · +56 tokens per session 18bc555cf131
- 5d ago Changed · +5 lines · +148 tokens per session efda68d7bdeb
- 8d ago First seen · 340 lines · 16,627 tokens per session scan C 335b753ea1e8
hope-agent AGENTS.md is an instructions file published in the GitHub repository shiwenwen/hope-agent (1,553 stars, last pushed today), licensed MIT. It adds 16,995 tokens to every session, about $0.0850 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.