From 6bef4fe0436184f6be393fcf1f549b2941f97b83 Mon Sep 17 00:00:00 2001 From: yetone Date: Wed, 4 Nov 2026 22:49:56 +0800 Subject: [PATCH] docs: a Library page in en, zh and ja, linked from every docs page luckymanjc. on Discord asked for one place that says how the Library works underneath and how to set it up. site/public/docs/library.html (and zh/, ja/) covers each tab: where it is kept (library.json, library/, backups/ with the last 30), instructions and their markers, MCP servers (per-agent files, ${NAME} variables, SSE limits, single tools off, OAuth through /mcp/, link to the MCP router page), skills (folders per agent, links vs copies and how a copy's edit is taken back, editing, the 12h update check, ~/.agents/skills, off here), subagents (file per agent, which agents bind skills/MCP servers, agents with none), the subagent model (written for Codex only, laid over the spawn; the Agents page's Codex subagent model with Lead's pick / Same as the lead / a model, which wins over the Library's; default_subagent_model; the ChatGPT-sealed exception; Claude Code's own order), hooks and RTK. Every fact was read from internal/library, internal/gateway and internal/provider codex_subagent.go, internal/agent/codex.go and the Library page's client.js and i18n, not guessed. The nav (toc-only) and footer of all 32 docs pages and the sitemap link the three pages. Run (mote, through mote-run): - a Playwright script serving site/public, in Chromium and WebKit at 1280px and 400px, on all three pages: h1, docs.css loaded, 4 tables, no sideways scroll (scrollWidth - innerWidth = 0), every toc and in-page anchor has its id, no 4xx on any asset, no page errors, no left border or gradient in the article, the language menu goes to the sibling pages; every local link on the pages resolves to a file (except /zh/ and /ja/, which the worker serves; checked live after deploy), and every docs page links /docs//library twice. ok. Screenshots looked at for desktop en and 400px zh. - node --test site/worker.test.mjs: 30 pass, 0 fail (it includes the sitemap-lists-every-docs-page-with-its-own-canonical test). Broken by hand: the first script run had a wrong toc selector and counted the toc-only nav links as missing anchors; fixed the script, not the page. Not tried: no Go code changed, so no go test. The Library page's "Copies" note still says "edits made in a copy are replaced", while skill_edits.go takes the newest edit into the library; the docs follow the code. --- site/public/docs/contributors.html | 2 + site/public/docs/docker.html | 2 + site/public/docs/import.html | 2 + site/public/docs/integrate.html | 2 + site/public/docs/intent.html | 2 + site/public/docs/ja/contributors.html | 2 + site/public/docs/ja/docker.html | 2 + site/public/docs/ja/import.html | 2 + site/public/docs/ja/intent.html | 2 + site/public/docs/ja/library.html | 282 ++++++++++++++++++++++++++ site/public/docs/ja/masking.html | 2 + site/public/docs/ja/mcp-router.html | 2 + site/public/docs/ja/plugins.html | 2 + site/public/docs/ja/privacy.html | 2 + site/public/docs/ja/remote.html | 2 + site/public/docs/ja/start.html | 2 + site/public/docs/library.html | 282 ++++++++++++++++++++++++++ site/public/docs/masking.html | 2 + site/public/docs/mcp-router.html | 2 + site/public/docs/plugins.html | 2 + site/public/docs/privacy.html | 2 + site/public/docs/remote.html | 2 + site/public/docs/start.html | 2 + site/public/docs/zh/contributors.html | 2 + site/public/docs/zh/docker.html | 2 + site/public/docs/zh/import.html | 2 + site/public/docs/zh/integrate.html | 2 + site/public/docs/zh/intent.html | 2 + site/public/docs/zh/library.html | 282 ++++++++++++++++++++++++++ site/public/docs/zh/masking.html | 2 + site/public/docs/zh/mcp-router.html | 2 + site/public/docs/zh/plugins.html | 2 + site/public/docs/zh/privacy.html | 2 + site/public/docs/zh/remote.html | 2 + site/public/docs/zh/start.html | 2 + site/public/sitemap.xml | 3 + 36 files changed, 913 insertions(+) create mode 100644 site/public/docs/ja/library.html create mode 100644 site/public/docs/library.html create mode 100644 site/public/docs/zh/library.html diff --git a/site/public/docs/contributors.html b/site/public/docs/contributors.html index 536d16013..f0ca074ed 100644 --- a/site/public/docs/contributors.html +++ b/site/public/docs/contributors.html @@ -54,6 +54,7 @@ Privacy Privacy masking MCP router + Library Add to magpie Integrate Releases @@ -115,6 +116,7 @@ Privacy Privacy masking MCP router + Library Add to magpie Integrate GitHub diff --git a/site/public/docs/docker.html b/site/public/docs/docker.html index 4f417c0b4..bbeb48f85 100644 --- a/site/public/docs/docker.html +++ b/site/public/docs/docker.html @@ -54,6 +54,7 @@ Privacy Privacy masking MCP router + Library Add to magpie Integrate Releases @@ -230,6 +231,7 @@ docker logs magpie Privacy Privacy masking MCP router + Library Add to magpie Integrate GitHub diff --git a/site/public/docs/import.html b/site/public/docs/import.html index 5956c360e..29273f93f 100644 --- a/site/public/docs/import.html +++ b/site/public/docs/import.html @@ -54,6 +54,7 @@ Privacy Privacy masking MCP router + Library Add to magpie Integrate Releases @@ -270,6 +271,7 @@ href = "https://usemagpie.ai/import#" + urlencode({ Privacy Privacy masking MCP router + Library GitHub Discord Contributors diff --git a/site/public/docs/integrate.html b/site/public/docs/integrate.html index 9dba16ba7..780585a69 100644 --- a/site/public/docs/integrate.html +++ b/site/public/docs/integrate.html @@ -53,6 +53,7 @@ Privacy Privacy masking MCP router + Library Add to magpie Integrate Releases @@ -163,6 +164,7 @@ curl -s http://127.0.0.1:3425/v1/models -H "Authorization: Bearer magpie-acme"Privacy Privacy masking MCP router + Library Add to magpie Integrate GitHub diff --git a/site/public/docs/intent.html b/site/public/docs/intent.html index 56cf4428a..ab63e90a4 100644 --- a/site/public/docs/intent.html +++ b/site/public/docs/intent.html @@ -54,6 +54,7 @@ Privacy Privacy masking MCP router + Library Add to magpie Integrate Releases @@ -333,6 +334,7 @@ The number of its kind (0 for none): Privacy Privacy masking MCP router + Library Add to magpie Integrate GitHub diff --git a/site/public/docs/ja/contributors.html b/site/public/docs/ja/contributors.html index d3364af68..5ec20afe7 100644 --- a/site/public/docs/ja/contributors.html +++ b/site/public/docs/ja/contributors.html @@ -54,6 +54,7 @@ プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 リリース @@ -115,6 +116,7 @@ プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 GitHub diff --git a/site/public/docs/ja/docker.html b/site/public/docs/ja/docker.html index e516098af..65c76c2fd 100644 --- a/site/public/docs/ja/docker.html +++ b/site/public/docs/ja/docker.html @@ -54,6 +54,7 @@ プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 リリース @@ -230,6 +231,7 @@ docker logs magpie プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 GitHub diff --git a/site/public/docs/ja/import.html b/site/public/docs/ja/import.html index 134638fb6..53cd11460 100644 --- a/site/public/docs/ja/import.html +++ b/site/public/docs/ja/import.html @@ -54,6 +54,7 @@ プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 リリース @@ -270,6 +271,7 @@ href = "https://usemagpie.ai/import#" + urlencode({ プライバシー プライバシーマスキング MCP ルーター + ライブラリ GitHub Discord コントリビューター diff --git a/site/public/docs/ja/intent.html b/site/public/docs/ja/intent.html index d544fdd66..5ae9c6355 100644 --- a/site/public/docs/ja/intent.html +++ b/site/public/docs/ja/intent.html @@ -54,6 +54,7 @@ プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 リリース @@ -333,6 +334,7 @@ The number of its kind (0 for none): プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 GitHub diff --git a/site/public/docs/ja/library.html b/site/public/docs/ja/library.html new file mode 100644 index 000000000..2cd46fd03 --- /dev/null +++ b/site/public/docs/ja/library.html @@ -0,0 +1,282 @@ + + + + + +ライブラリ · magpie ドキュメント + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+

ドキュメント · ライブラリ

+

ライブラリ

+

magpie の ライブラリ は、指示、MCP サーバー、スキル、フック、サブエージェントを一か所にまとめ、チェックしたエージェントそれぞれに、そのエージェント自身のファイルと形式で書き込みます。エージェントはいつもどおりそのファイルを読みます。magpie はエージェントと渡したものの間に層を挟みません。スキル、MCP ツール、サブエージェントをいつ使うかは、エージェント自身が決めます。

+

ページには 指示、MCP サーバー、スキル、フック、サブエージェント、RTK の 6 つのタブがあります。各項目にはエージェントの列があり、チェックすると渡し、外すと取り除きます。エージェントは次に起動したときに変更を読みます。

+ +

保存場所

+
    +
  • ライブラリ本体は magpie の設定フォルダにある library.json です(~/.config/magpie。$XDG_CONFIG_HOME があれば $XDG_CONFIG_HOME/magpie)。指示のテキストとスキルのフォルダは隣の library/ にあります。
  • +
  • 変更のたびにライブラリを保存し、すぐにすべてのエージェントへ書き込みます。magpie は自分が書いたものを記録するので、取り除くのは自分のエントリだけで、あなたのものには触れません。
  • +
  • バックアップ。変更の前に、置き換わるファイルを同じフォルダの backups/ にコピーします。直近 30 件が残ります。各タブの上の バックアップ ボタンで開けます。
  • +
  • 書き直し。エージェントを入れたあとや、そのファイルを手で編集したあとは、magpie library sync でライブラリをすべてのエージェントに書き直します。
  • +
+
+ ターミナル + +
magpie library          # 各エージェントに何を渡しているか
+magpie library sync     # エージェントに書き直す
+
+ +

指示

+

指示は、エージェントの各セッションが最初に読むテキストです(チームのルールやコーディングスタイルなど)。magpie はエージェントの指示ファイルの 2 行のマーカーの間に自分の分を書きます。

+
+ CLAUDE.md、AGENTS.md… + +
<!-- magpie:begin · written by magpie from its Library -->
+…ライブラリの指示…
+<!-- magpie:end -->
+
+

マーカーの外はすべてあなたのもので、変更されません。名前付きのセットを複数持ち、それぞれ別のエージェントに渡せます。セットを自分のファイルに置くこともできます。

+
+ + + + + + + + + + +
エージェントファイル
Claude Code~/.claude/CLAUDE.md
Codex~/.codex/AGENTS.md(AGENTS.override.md を使っていればそちら)
Gemini CLI~/.gemini/GEMINI.md
Antigravity~/.gemini/config/GEMINI.md
OpenCode設定フォルダの AGENTS.md
Copilot CLI~/.copilot/copilot-instructions.md
Goose、Crush、Qwen Code、CodeBuddy.goosehints、CRUSH.md、QWEN.md、CODEBUDDY.md
Droid、Grok、dsh、ompそれぞれのフォルダの AGENTS.md
Pi、OmOAGENTS.md と CLAUDE.md のうち先にあるもの
+

フォルダはエージェント自身の設定に従います。CLAUDE_CONFIG_DIR や CODEX_HOME を設定していれば、既定の場所の代わりにそれを使います。

+ +

MCP サーバー

+

MCP サーバーはコマンド(npx … のようにエージェントが起動するプログラム)か URL(HTTP または SSE)です。magpie はチェックした各エージェントの MCP 設定にサーバーごとに 1 つのエントリを、そのエージェントの形式で書きます。エントリにあなたが足したフィールドは残ります。

+
+ + + + + + + + + +
エージェントファイル
Claude Code~/.claude.json
Codex~/.codex/config.toml
Gemini CLI~/.gemini/settings.json
Antigravity~/.gemini/config/mcp_config.json
OpenCodeopencode.json
Cursor~/.cursor/mcp.json
Copilot CLI~/.copilot/mcp-config.json
Zedsettings.json の context_servers
+
    +
  • 変数。ヘッダーや環境変数の値にある ${NAME} は、各エージェントの書き方で書き込まれます。その書き方を持たないエージェントにはそのサーバーを渡さず、ページに理由が出ます。
  • +
  • SSE。Codex、Goose、dsh、Grok、Command Code、Zed は SSE のサーバーを使えません。Claude Desktop はリモートのサーバーを一切受け付けません。
  • +
  • ツールごとのオフ。Codex、Gemini CLI、Crush、Hermes Agent、Claude Code、OpenCode では、ツールを 1 つずつオフにでき、それぞれの設定に書かれます。ほかのエージェントにはサーバー全体が渡ります。
  • +
  • サインイン。OAuth が必要なサーバーは magpie で一度だけサインインします。エージェントは magpie のゲートウェイの /mcp/<name> 経由で使います。
  • +
  • このコンピュータだけ。ここに置いておくサーバーは ほかのコンピュータと同期 をオフにします(magpie library mcp local <name> on)。
  • +
+

MCP ルーター をオンにすると、各エージェントにはこれらのエントリの代わりに magpie という 1 つのサーバーが渡り、コマンドのサーバーは magpie がすべてのエージェントのために 1 回だけ動かします。既定ではオフです。

+ +

スキル

+

スキルは SKILL.md の入ったフォルダです。エージェントは各スキルの名前と説明を読み、作業に必要になったときに残りを読みます。GitHub、任意の git リポジトリ、このコンピュータのフォルダ、または スキル タブのマーケットから追加できます。

+
+ + + + + + + + +
エージェントフォルダ
Claude Code~/.claude/skills
Codex~/.codex/skills
Gemini CLI~/.gemini/skills
OpenCode設定フォルダの skills
Cursor~/.cursor/skills
Copilot CLI~/.copilot/skills
Goose~/.agents/skills
+

リンクかコピーか

+

スキルの渡し方 で、スキルをエージェントにどう渡すかを、すべてのエージェントに、または エージェント別 で 1 つずつ決めます。

+
    +
  • リンク(既定)。エージェントのフォルダはライブラリのものへのリンクなので、更新はすぐにすべてのエージェントに届きます。Windows でリンクを作る権限がなければジャンクションを使います。
  • +
  • コピー。エージェントごとに自分のフォルダを持ちます。リンクをたどらないツール向けです。ライブラリのスキルが変わるとコピーを作り直します。エージェントやあなたがコピーを編集すると、次の同期でいちばん新しい編集をライブラリに取り込み、ほかのエージェントに渡します。より新しい編集に負けた編集はバックアップに残ります。
  • +
+

同じ名前のあなたのスキルフォルダは上書きしません。ページでライブラリのものを使うか、自分のものを残すかを尋ねます。

+

編集と更新

+
    +
  • 編集でスキルのファイルをページ上で開き、保存(または ⌘S)で書き込みます。コマンドラインにはエディタがありません。
  • +
  • 更新。スキルタブを開いたとき、前回の確認から 12 時間たっていれば、GitHub から入れたスキルの更新を確認します(magpie library skill update ですぐ確認)。あなたが変更したスキルは、尋ねずに置き換えません。
  • +
  • スキルの置き場所。チェックした各エージェントのフォルダ(既定)か、加えて ~/.agents/skills にも置きます。ここは Codex、Gemini CLI、OpenCode、Crush、Droid、Kimi Code などのツールが読みます。
  • +
  • このコンピュータだけオフ。スキルはこのコンピュータでだけオフにできます。ほかのコンピュータからの同期でオンに戻ることはありません。
  • +
+ +

サブエージェント

+

サブエージェントは、メインのエージェントが作業を任せられる助手です。名前、説明、プロンプトを持ちます。magpie はそれをファイルとして、チェックした各エージェントのサブエージェントフォルダに書きます。メインのエージェントは各サブエージェントの 説明 を読み、いつ呼ぶかを自分で決めます。説明には何のためのものか、いつ使うかをはっきり書いてください。

+
    +
  • 名前:小文字の英字、数字、- で 2〜50 文字。default や main などいくつかの名前は予約されています。
  • +
  • 説明:必須。1,000 文字まで。
  • +
  • プロンプト:必須。サブエージェントの指示になります。
  • +
  • モデル:任意。サブエージェントのモデル を参照。
  • +
+
+ + + + + + + + + + +
エージェントファイルスキル、MCP サーバー
Claude Code~/.claude/agents/<name>.md選んだもの
Codex~/.codex/agents/<name>.tomlエージェントのすべて
OpenCode設定フォルダの agents/<name>.mdエージェントのすべて
Gemini CLI~/.gemini/agents/<name>.mdエージェントのすべて
Qwen Codeそのフォルダの agents/<name>.mdエージェントのすべて
Droid~/.factory/droids/<name>.md選んだ MCP サーバー、すべてのスキル
Grokそのフォルダの agents/<name>.mdエージェントのすべて
Cursor~/.cursor/agents/<name>.mdエージェントのすべて
Copilot CLI~/.copilot/agents/<name>.agent.mdエージェントのすべて
+
    +
  • サブエージェントを選んだスキルに限れるのは Claude Code だけ、選んだ MCP サーバーに限れるのは Claude Code と Droid だけです。ほかではサブエージェントはエージェントの持つものをすべて使えます。
  • +
  • Cursor:~/.cursor/agents を読むのは Cursor アプリだけです。cursor-agent はプロジェクトの .cursor/agents しか読みません。
  • +
  • Kimi Code、Goose、Crush、Qoder、CodeBuddy、iFlow、Kiro にはユーザー全体のサブエージェントフォルダがないので、渡りません。WSL のエージェントにも渡りません。
  • +
  • magpie が書いたファイルを編集すると、それはあなたのものになり、magpie は変更しなくなります。同じ名前のあなたのファイルは上書きせず、ページに問題として出します。
  • +
+ +

サブエージェントのモデル

+

サブエージェントの モデル は Codex にだけ書かれます。ほかのエージェントのサブエージェントは、エージェント自身が選ぶモデルで動き、ページにもそう出ます。空のときは エージェントが選ぶ と表示されます。

+

Codex では、モデルはサブエージェントの .toml ファイルに入ります。Codex は起動時にこのファイルを重ねるので、リクエストはそのモデルを運び、magpie のゲートウェイはほかのリクエストと同じようにルーティングします。Codex の一覧にある任意のモデル、magpie の provider/model、ルーティンググループ(group/<id>)を選べます。

+

エージェントページの Codex のサブエージェントモデル

+

エージェント ページの Codex の行には、Codex が起動するすべてのサブエージェントに効く、独自のサブエージェントモデルがあります。

+
    +
  • リードが選ぶ(既定)。メインのエージェントが各サブエージェントのモデルを選びます(Codex 自身のモデルも含みます)。指定がなければメインのエージェントのモデルで動きます。再開したサブエージェントは最初のモデルのままです。
  • +
  • リードと同じ。すべてのサブエージェントがメインのエージェントのモデルで動きます。
  • +
  • モデルかグループ。メインのエージェントが別のモデルを指定しても、すべてのサブエージェントがそれで動きます。
  • +
+
エージェントページが優先です。この設定が リードが選ぶ 以外なら、ゲートウェイは Codex のサブエージェントのリクエストをすべてそれに送ります。ライブラリのサブエージェント自身のモデルより優先され、ライブラリのエディタにもそう表示されます。そこでモデルを選ぶと、Codex の設定から default_subagent_model も取り除きます。
+

Codex 自身の config.toml にある [agents] default_subagent_model は別物で、メインのエージェントがモデルを指定しなかったときにサブエージェントが始めるモデルにすぎません。ここまでの話には例外が 1 つあります。ChatGPT のバックエンドが封じたタスクは、この設定が ChatGPT アカウントのモデルでない限り、要求したモデルのままです。

+

Claude Code には独自の順序があります。メインのエージェントが呼び出しで指定したモデル、次にサブエージェントファイルの model:、次に CLAUDE_CODE_SUBAGENT_MODEL(エージェントページの Claude Code の行で設定可能)、最後にセッションのモデルです。

+ +

フック

+

フックは、エージェントがターンのある時点で実行するコマンドです。終わったときの通知、ファイル編集後のフォーマッタなど。共通のイベント(ターン終了、ツールの後、ツールの前、プロンプト受信時、セッション開始時)を選ぶと、magpie は各エージェントでのそのイベントの名前で書き込みます。フックを受け付けるのは Claude Code、Codex、Gemini CLI、Cursor、Grok Build、Grok App だけです。あなたが変更したフックのエントリはあなたのものになります。

+ +

RTK

+

RTK タブでは RTK をエージェントごとにオンにします。エージェントのシェルコマンドが RTK を通り、出力が短くなってトークンを節約します。magpie は RTK をインストールでき、RTK がなくてもオフにできます。

+ +

magpie が触るもの

+
    +
  • 自分が書いたものだけ:マーカーの間のテキスト、記録したエントリ、自分のものと印を付けたファイル。
  • +
  • 同じ名前のあなたのファイル、エントリ、スキルには触れません。ページに衝突を出し、選ばせます。
  • +
  • 置き換えるものは先にバックアップに入ります。
  • +
+

プロジェクトにもスキルと MCP サーバーを渡せます。プロジェクト自身のフォルダ(.claude/skills、.agents/skills、.mcp.json、.codex/config.toml など)に置かれます。

+
+
+ + + + + + + diff --git a/site/public/docs/ja/masking.html b/site/public/docs/ja/masking.html index 1d1e7405f..95391f94a 100644 --- a/site/public/docs/ja/masking.html +++ b/site/public/docs/ja/masking.html @@ -54,6 +54,7 @@ プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 リリース @@ -177,6 +178,7 @@ プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 GitHub diff --git a/site/public/docs/ja/mcp-router.html b/site/public/docs/ja/mcp-router.html index 4d0a9a750..2262fcec7 100644 --- a/site/public/docs/ja/mcp-router.html +++ b/site/public/docs/ja/mcp-router.html @@ -54,6 +54,7 @@ プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 リリース @@ -140,6 +141,7 @@ magpie library mcp router off プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 GitHub diff --git a/site/public/docs/ja/plugins.html b/site/public/docs/ja/plugins.html index 653664d15..ce866d005 100644 --- a/site/public/docs/ja/plugins.html +++ b/site/public/docs/ja/plugins.html @@ -54,6 +54,7 @@ プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 リリース @@ -1030,6 +1031,7 @@ document.getElementById("calls").textContent = `${s.calls プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 GitHub diff --git a/site/public/docs/ja/privacy.html b/site/public/docs/ja/privacy.html index ebc06ef59..71872fa77 100644 --- a/site/public/docs/ja/privacy.html +++ b/site/public/docs/ja/privacy.html @@ -54,6 +54,7 @@ プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 リリース @@ -222,6 +223,7 @@ プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 GitHub diff --git a/site/public/docs/ja/remote.html b/site/public/docs/ja/remote.html index fa20e5e9f..d84af89f7 100644 --- a/site/public/docs/ja/remote.html +++ b/site/public/docs/ja/remote.html @@ -54,6 +54,7 @@ プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 リリース @@ -236,6 +237,7 @@ curl -s http://127.0.0.1:3425/v1/magpie/concurrency プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 GitHub diff --git a/site/public/docs/ja/start.html b/site/public/docs/ja/start.html index fd29a1d9e..720f3eb49 100644 --- a/site/public/docs/ja/start.html +++ b/site/public/docs/ja/start.html @@ -54,6 +54,7 @@ プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 リリース @@ -350,6 +351,7 @@ IP-CIDR6,::1/128,DIRECT,no-resolve プライバシー プライバシーマスキング MCP ルーター + ライブラリ magpie に追加 アプリ連携 GitHub diff --git a/site/public/docs/library.html b/site/public/docs/library.html new file mode 100644 index 000000000..13a1f099c --- /dev/null +++ b/site/public/docs/library.html @@ -0,0 +1,282 @@ + + + + + +Library · magpie docs + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+

Docs · Library

+

Library

+

magpie’s Library keeps instructions, MCP servers, skills, hooks and subagents in one place, and writes each of them into every agent you tick for it, in that agent’s own files and format. The agents read those files as they always do. magpie adds no layer between an agent and what it is given: the agent itself decides when to use a skill, an MCP tool or a subagent.

+

The page has six tabs: Instructions, MCP servers, Skills, Hooks, Subagents and RTK. Each item has a row of agents; tick an agent to give it the item, untick it to take it away. An agent reads the change when it starts again.

+ +

Where it is kept

+
    +
  • The library is library.json in magpie’s config folder (~/.config/magpie, or $XDG_CONFIG_HOME/magpie when that is set). Instruction texts and skill folders are in library/ next to it.
  • +
  • Every change saves the library and writes it into every agent at once. magpie records what it wrote, so it only ever takes away its own entries and leaves yours alone.
  • +
  • Backups. Before a change, the files it replaces are copied to backups/ in the same folder. The last 30 are kept. The Backups button at the top of each tab opens them.
  • +
  • Write it again. After you install an agent, or edit its files by hand, magpie library sync writes the library into every agent again.
  • +
+
+ Terminal + +
magpie library          # what the library gives each agent
+magpie library sync     # write it into the agents again
+
+ +

Instructions

+

Instructions are text every session of an agent starts with, such as house rules or a coding style. magpie writes its part between two marker lines in the agent’s instructions file:

+
+ CLAUDE.md, AGENTS.md… + +
<!-- magpie:begin · written by magpie from its Library -->
+…the Library's instructions…
+<!-- magpie:end -->
+
+

Everything outside the markers is yours and is never changed. You can keep several named sets and give each set to different agents, and a set can live in a file of your own.

+
+ + + + + + + + + + +
AgentFile
Claude Code~/.claude/CLAUDE.md
Codex~/.codex/AGENTS.md (or AGENTS.override.md when you use one)
Gemini CLI~/.gemini/GEMINI.md
Antigravity~/.gemini/config/GEMINI.md
OpenCodeAGENTS.md in its config folder
Copilot CLI~/.copilot/copilot-instructions.md
Goose, Crush, Qwen Code, CodeBuddy.goosehints, CRUSH.md, QWEN.md, CODEBUDDY.md
Droid, Grok, dsh, ompAGENTS.md in the agent’s own folder
Pi, OmOthe first one there of AGENTS.md and CLAUDE.md
+

Folders follow the agent’s own setting: a custom CLAUDE_CONFIG_DIR or CODEX_HOME is used in place of the default.

+ +

MCP servers

+

An MCP server is either a command (a program the agent starts, such as npx …) or a URL (HTTP or SSE). magpie writes one entry per server into each ticked agent’s MCP config, in that agent’s format, and keeps any fields you added to the entry yourself.

+
+ + + + + + + + + +
AgentFile
Claude Code~/.claude.json
Codex~/.codex/config.toml
Gemini CLI~/.gemini/settings.json
Antigravity~/.gemini/config/mcp_config.json
OpenCodeopencode.json
Cursor~/.cursor/mcp.json
Copilot CLI~/.copilot/mcp-config.json
Zedcontext_servers in its settings.json
+
    +
  • Variables. ${NAME} in a header or an env value is written in each agent’s own syntax. An agent that has no such syntax is not given that server, and the page says why.
  • +
  • SSE. Codex, Goose, dsh, Grok, Command Code and Zed can’t use an SSE server. Claude Desktop takes no remote servers at all.
  • +
  • Single tools off. You can turn off tools one by one for Codex, Gemini CLI, Crush, Hermes Agent, Claude Code and OpenCode, each in its own setting. Every other agent gets the whole server.
  • +
  • Sign-in. A server that needs OAuth is signed in to once, in magpie. Agents then reach it through magpie’s gateway at /mcp/<name>.
  • +
  • This computer only. Turn off Sync to your other computers for a server that should stay here (magpie library mcp local <name> on).
  • +
+

With the MCP router on, each agent gets one server named magpie in place of these entries, and magpie runs each command server once for all of them. It is off by default.

+ +

Skills

+

A skill is a folder with a SKILL.md in it. The agent reads each skill’s name and description and loads the rest when a task needs it. Add one from GitHub, any git repository, a folder on this computer, or the market on the Skills tab.

+
+ + + + + + + + +
AgentFolder
Claude Code~/.claude/skills
Codex~/.codex/skills
Gemini CLI~/.gemini/skills
OpenCodeskills in its config folder
Cursor~/.cursor/skills
Copilot CLI~/.copilot/skills
Goose~/.agents/skills
+

Links or copies

+

Give skills as sets how a skill reaches an agent, for every agent or, under By agent, for one:

+
    +
  • Links (the default). The agent’s folder links to the library’s copy, so an update reaches every agent at once. On Windows without the right to make links, a junction is used.
  • +
  • Copies. Each agent gets a folder of its own, for tools that don’t follow links. A copy is made again when the library’s skill changes. If the agent, or you, edit a copy, the next sync takes the newest edit into the library and gives it to the other agents. An edit that loses to a newer one is kept with the backups.
  • +
+

A skill folder of your own with the same name is never written over: the page asks whether to use the library’s or keep yours.

+

Editing and updates

+
    +
  • Edit opens a skill’s files on the page; Save (or ⌘S) writes them. The command line has no editor.
  • +
  • Updates. When you open the Skills tab, skills from GitHub are checked for updates if 12 hours have passed since the last check (magpie library skill update checks now). A skill you changed is never replaced without asking.
  • +
  • Put skills in. Skills go to each ticked agent’s own folder (the default), or also into ~/.agents/skills, which Codex, Gemini CLI, OpenCode, Crush, Droid, Kimi Code and other tools read.
  • +
  • Off here. A skill can be turned off on this computer only; a sync from another computer doesn’t turn it back on.
  • +
+ +

Subagents

+

A subagent is a helper the main agent can hand a task to. It has a name, a description and a prompt. magpie writes it as a file in each ticked agent’s subagent folder. The main agent reads every subagent’s description and decides itself when to call one, so the description should say plainly what it is for and when to use it.

+
    +
  • Name: 2 to 50 lowercase letters, digits and -. A few names are reserved, such as default and main.
  • +
  • Description: required, up to 1,000 characters.
  • +
  • Prompt: required. It becomes the subagent’s instructions.
  • +
  • Model: optional. See Subagent models.
  • +
+
+ + + + + + + + + + +
AgentFileSkills, MCP servers
Claude Code~/.claude/agents/<name>.mdthe ones you pick
Codex~/.codex/agents/<name>.tomlall the agent has
OpenCodeagents/<name>.md in its config folderall the agent has
Gemini CLI~/.gemini/agents/<name>.mdall the agent has
Qwen Codeagents/<name>.md in its folderall the agent has
Droid~/.factory/droids/<name>.mdMCP servers you pick; all skills
Grokagents/<name>.md in its folderall the agent has
Cursor~/.cursor/agents/<name>.mdall the agent has
Copilot CLI~/.copilot/agents/<name>.agent.mdall the agent has
+
    +
  • Only Claude Code limits a subagent to the skills you pick, and only Claude Code and Droid to the MCP servers you pick. Elsewhere a subagent has everything its agent has.
  • +
  • Cursor: only the Cursor app reads ~/.cursor/agents. cursor-agent reads only a project’s .cursor/agents.
  • +
  • Kimi Code, Goose, Crush, Qoder, CodeBuddy, iFlow and Kiro have no user-wide subagent folder, so they get none. Agents in WSL get none either.
  • +
  • If you edit a file magpie wrote, it becomes yours and magpie stops changing it. A file of your own with the same name is never written over; the page shows a problem instead.
  • +
+ +

Subagent models

+

A subagent’s Model field is written only for Codex. Every other agent runs its subagents on the model it picks itself, and the page says so. Left empty, the field reads Picked by the agent.

+

For Codex, the model goes into the subagent’s .toml file. Codex lays that file over the spawn, so requests carry that model and magpie’s gateway routes them like any other request. You can pick any model in Codex’s list, a magpie provider/model, or a routing group (group/<id>).

+

Codex’s subagent model on the Agents page

+

Codex’s row on the Agents page has a subagent model of its own, for every subagent Codex starts:

+
    +
  • Lead’s pick (the default). The main agent picks each subagent’s model, one of Codex’s own too. A subagent it names no model for runs on the main agent’s model. A resumed subagent stays on the model it started on.
  • +
  • Same as the lead. Every subagent runs on the main agent’s model.
  • +
  • A model or a group. Every subagent runs on it, even when the main agent names another.
  • +
+
The Agents page wins. When that setting is anything but Lead’s pick, the gateway sends every Codex subagent request to it, over a Library subagent’s own model too. The Library editor then says so. Picking a model there also removes default_subagent_model from Codex’s config.
+

Codex’s own [agents] default_subagent_model in config.toml is a different thing: only the model a subagent starts on when the main agent names none. One exception to all of the above: a task the ChatGPT backend has sealed stays on the model it asked for, unless the setting is a ChatGPT account’s model.

+

Claude Code has its own order: the model the main agent names in its call, then the subagent file’s model:, then CLAUDE_CODE_SUBAGENT_MODEL (which Claude Code’s row on the Agents page can set), then the session’s model.

+ +

Hooks

+

A hook is a command an agent runs at a point in its turn: a notification when it finishes, a formatter after it edits a file. Pick a portable event (turn end, after a tool, before a tool, on a prompt, at session start) and magpie writes it under each agent’s own name for that event. Only Claude Code, Codex, Gemini CLI, Cursor, Grok Build and Grok App take hooks. A hook entry you change becomes yours.

+ +

RTK

+

The RTK tab turns on RTK per agent: the agent’s shell commands run through RTK, which shortens their output to save tokens. magpie can install RTK for you; turning it off works with RTK gone.

+ +

What magpie touches

+
    +
  • Only what it wrote: the text between its markers, entries it recorded, files it marked as its own.
  • +
  • Never a file, entry or skill of yours with the same name. The page shows the clash and lets you choose.
  • +
  • Anything it replaces goes to the backups first.
  • +
+

Projects can get skills and MCP servers too, in the project’s own folders (such as .claude/skills, .agents/skills, .mcp.json or .codex/config.toml).

+
+
+ + + + + + + diff --git a/site/public/docs/masking.html b/site/public/docs/masking.html index 3fdded302..7669413ac 100644 --- a/site/public/docs/masking.html +++ b/site/public/docs/masking.html @@ -54,6 +54,7 @@ Privacy Privacy masking MCP router + Library Add to magpie Integrate Releases @@ -177,6 +178,7 @@ Privacy Privacy masking MCP router + Library Add to magpie Integrate GitHub diff --git a/site/public/docs/mcp-router.html b/site/public/docs/mcp-router.html index c85f9fee2..9fda2872f 100644 --- a/site/public/docs/mcp-router.html +++ b/site/public/docs/mcp-router.html @@ -54,6 +54,7 @@ Privacy Privacy masking MCP router + Library Add to magpie Integrate Releases @@ -140,6 +141,7 @@ magpie library mcp router off Privacy Privacy masking MCP router + Library Add to magpie Integrate GitHub diff --git a/site/public/docs/plugins.html b/site/public/docs/plugins.html index d9b6f283b..211ac9751 100644 --- a/site/public/docs/plugins.html +++ b/site/public/docs/plugins.html @@ -54,6 +54,7 @@ Privacy Privacy masking MCP router + Library Add to magpie Integrate Releases @@ -1030,6 +1031,7 @@ document.getElementById("calls").textContent = `${s.calls Privacy Privacy masking MCP router + Library Add to magpie Integrate GitHub diff --git a/site/public/docs/privacy.html b/site/public/docs/privacy.html index a020f9fa1..495dc6618 100644 --- a/site/public/docs/privacy.html +++ b/site/public/docs/privacy.html @@ -54,6 +54,7 @@ Privacy Privacy masking MCP router + Library Add to magpie Integrate Releases @@ -222,6 +223,7 @@ Privacy Privacy masking MCP router + Library Add to magpie Integrate GitHub diff --git a/site/public/docs/remote.html b/site/public/docs/remote.html index fca2d9f0c..bf90b0b79 100644 --- a/site/public/docs/remote.html +++ b/site/public/docs/remote.html @@ -54,6 +54,7 @@ Privacy Privacy masking MCP router + Library Add to magpie Integrate Releases @@ -236,6 +237,7 @@ curl -s http://127.0.0.1:3425/v1/magpie/concurrency Privacy Privacy masking MCP router + Library Add to magpie Integrate GitHub diff --git a/site/public/docs/start.html b/site/public/docs/start.html index 54d6b33e4..b67a6ab06 100644 --- a/site/public/docs/start.html +++ b/site/public/docs/start.html @@ -54,6 +54,7 @@ Privacy Privacy masking MCP router + Library Add to magpie Integrate Releases @@ -350,6 +351,7 @@ IP-CIDR6,::1/128,DIRECT,no-resolve Privacy Privacy masking MCP router + Library Add to magpie Integrate GitHub diff --git a/site/public/docs/zh/contributors.html b/site/public/docs/zh/contributors.html index 626a0be57..04f9715bc 100644 --- a/site/public/docs/zh/contributors.html +++ b/site/public/docs/zh/contributors.html @@ -54,6 +54,7 @@ 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 版本发布 @@ -115,6 +116,7 @@ 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 GitHub diff --git a/site/public/docs/zh/docker.html b/site/public/docs/zh/docker.html index 334822ceb..9b09d2dc9 100644 --- a/site/public/docs/zh/docker.html +++ b/site/public/docs/zh/docker.html @@ -54,6 +54,7 @@ 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 版本发布 @@ -230,6 +231,7 @@ docker logs magpie 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 GitHub diff --git a/site/public/docs/zh/import.html b/site/public/docs/zh/import.html index 56c06b864..6f4475e97 100644 --- a/site/public/docs/zh/import.html +++ b/site/public/docs/zh/import.html @@ -54,6 +54,7 @@ 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 版本发布 @@ -270,6 +271,7 @@ href = "https://usemagpie.ai/import#" + urlencode({ 隐私 本地脱敏 MCP 路由 + 资源库 GitHub Discord 贡献墙 diff --git a/site/public/docs/zh/integrate.html b/site/public/docs/zh/integrate.html index 8c425a268..c2669a149 100644 --- a/site/public/docs/zh/integrate.html +++ b/site/public/docs/zh/integrate.html @@ -53,6 +53,7 @@ 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 版本发布 @@ -163,6 +164,7 @@ curl -s http://127.0.0.1:3425/v1/models -H "Authorization: Bearer magpie-acme"隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 GitHub diff --git a/site/public/docs/zh/intent.html b/site/public/docs/zh/intent.html index 745038d76..85079cb01 100644 --- a/site/public/docs/zh/intent.html +++ b/site/public/docs/zh/intent.html @@ -54,6 +54,7 @@ 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 版本发布 @@ -333,6 +334,7 @@ The number of its kind (0 for none): 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 GitHub diff --git a/site/public/docs/zh/library.html b/site/public/docs/zh/library.html new file mode 100644 index 000000000..7c498d14c --- /dev/null +++ b/site/public/docs/zh/library.html @@ -0,0 +1,282 @@ + + + + + +资源库 · magpie 文档 + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+

文档 · 资源库

+

资源库

+

magpie 的 资源库 把指令、MCP 服务器、技能、Hooks 和子代理放在一处,再把每一项写进你勾选的每个 Agent,用的是那个 Agent 自己的文件和格式。Agent 像平常一样读这些文件。magpie 不在 Agent 和这些内容之间加任何一层:什么时候用某个技能、某个 MCP 工具或某个子代理,由 Agent 自己决定。

+

页面有六个标签:指令、MCP 服务器、技能、Hooks、子代理 和 RTK。每一项下面有一排 Agent;勾上就给它,取消勾选就拿走。Agent 重启后读到改动。

+ +

存放位置

+
    +
  • 资源库本身是 magpie 配置目录里的 library.json(~/.config/magpie,设置了 $XDG_CONFIG_HOME 时是 $XDG_CONFIG_HOME/magpie)。指令文本和技能文件夹在旁边的 library/ 里。
  • +
  • 每次改动都会保存资源库,并立刻写进所有 Agent。magpie 记下自己写了什么,所以只会拿走自己写的条目,不动你的。
  • +
  • 备份。改动前,被替换的文件会复制到同一目录的 backups/,保留最近 30 份。每个标签顶部的 备份 按钮可以打开它们。
  • +
  • 重新写入。装了新 Agent,或者手动改过它的文件后,magpie library sync 会把资源库重新写进所有 Agent。
  • +
+
+ 终端 + +
magpie library          # 资源库给了每个 Agent 什么
+magpie library sync     # 重新写进各个 Agent
+
+ +

指令

+

指令是 Agent 每次会话开头都会读到的文字,比如团队规则或代码风格。magpie 把自己的部分写在 Agent 指令文件里的两行标记之间:

+
+ CLAUDE.md、AGENTS.md… + +
<!-- magpie:begin · written by magpie from its Library -->
+…资源库里的指令…
+<!-- magpie:end -->
+
+

标记以外的内容都是你的,magpie 从不修改。你可以有多组命名的指令,各自给不同的 Agent;一组指令也可以放在你自己的文件里。

+
+ + + + + + + + + + +
Agent文件
Claude Code~/.claude/CLAUDE.md
Codex~/.codex/AGENTS.md(用了 AGENTS.override.md 时写它)
Gemini CLI~/.gemini/GEMINI.md
Antigravity~/.gemini/config/GEMINI.md
OpenCode配置目录里的 AGENTS.md
Copilot CLI~/.copilot/copilot-instructions.md
Goose、Crush、Qwen Code、CodeBuddy.goosehints、CRUSH.md、QWEN.md、CODEBUDDY.md
Droid、Grok、dsh、omp各自目录里的 AGENTS.md
Pi、OmOAGENTS.md 和 CLAUDE.md 中先存在的那个
+

目录跟随 Agent 自己的设置:设置了 CLAUDE_CONFIG_DIR 或 CODEX_HOME 时,用它代替默认目录。

+ +

MCP 服务器

+

MCP 服务器要么是一条命令(Agent 启动的程序,比如 npx …),要么是一个 URL(HTTP 或 SSE)。magpie 在每个勾选的 Agent 的 MCP 配置里为每个服务器写一个条目,用那个 Agent 的格式,你在条目里自己加的字段会保留。

+
+ + + + + + + + + +
Agent文件
Claude Code~/.claude.json
Codex~/.codex/config.toml
Gemini CLI~/.gemini/settings.json
Antigravity~/.gemini/config/mcp_config.json
OpenCodeopencode.json
Cursor~/.cursor/mcp.json
Copilot CLI~/.copilot/mcp-config.json
Zed它的 settings.json 里的 context_servers
+
    +
  • 变量。请求头或环境变量里的 ${NAME} 会按每个 Agent 自己的写法写入。不支持这种写法的 Agent 不会拿到这个服务器,页面会说明原因。
  • +
  • SSE。Codex、Goose、dsh、Grok、Command Code 和 Zed 用不了 SSE 服务器。Claude Desktop 完全不接受远程服务器。
  • +
  • 单独关掉工具。Codex、Gemini CLI、Crush、Hermes Agent、Claude Code 和 OpenCode 可以逐个关掉工具,各自写进自己的设置。其他 Agent 拿到的是整个服务器。
  • +
  • 登录。需要 OAuth 的服务器只在 magpie 里登录一次,之后 Agent 通过 magpie 网关的 /mcp/<name> 访问它。
  • +
  • 只在这台电脑。不想同步到别处的服务器,关掉 同步到其他电脑(magpie library mcp local <name> on)。
  • +
+

打开 MCP 路由 后,每个 Agent 只拿到一个名为 magpie 的服务器来代替这些条目,命令型服务器由 magpie 为所有 Agent 只运行一份。它默认关闭。

+ +

技能

+

一个技能(Skill)就是一个带 SKILL.md 的文件夹。Agent 先读每个技能的名字和描述,任务用得到时再读其余部分。可以从 GitHub、任意 git 仓库、本机文件夹,或 技能 标签里的市场添加。

+
+ + + + + + + + +
Agent目录
Claude Code~/.claude/skills
Codex~/.codex/skills
Gemini CLI~/.gemini/skills
OpenCode配置目录里的 skills
Cursor~/.cursor/skills
Copilot CLI~/.copilot/skills
Goose~/.agents/skills
+

链接还是副本

+

Skills 启用方式 决定技能怎么到达 Agent,可以对所有 Agent 设置,也可以在 按 Agent 里单独设置:

+
    +
  • 符号链接(默认)。Agent 的目录链接到资源库里的那份,更新立刻到达所有 Agent。在 Windows 上没有创建链接的权限时,用目录联接(junction)。
  • +
  • 副本。每个 Agent 拿到一份自己的文件夹,适合不跟随链接的工具。资源库里的技能变了,副本会重新生成。如果 Agent 或你改了某个副本,下次同步会把最新的修改收进资源库,再给其他 Agent。被更新的修改盖过的那份会放进备份。
  • +
+

你自己有同名的技能文件夹时,magpie 不会覆盖它:页面会问你用资源库的还是保留你的。

+

编辑和更新

+
    +
  • 编辑会在页面上打开技能的文件;保存(或 ⌘S)写入。命令行没有编辑器。
  • +
  • 更新。打开技能标签时,如果距上次检查已过 12 小时,会检查来自 GitHub 的技能有没有更新(magpie library skill update 立即检查)。你改过的技能不会不问就被替换。
  • +
  • Skills 放在。技能放进每个勾选的 Agent 自己的目录(默认),或者同时放进 ~/.agents/skills,Codex、Gemini CLI、OpenCode、Crush、Droid、Kimi Code 等工具都会读这里。
  • +
  • 仅本机关闭。一个技能可以只在这台电脑上关闭;从别的电脑同步过来也不会把它重新打开。
  • +
+ +

子代理

+

子代理是主 Agent 可以把任务交给它的帮手,有名字、描述和提示词。magpie 把它写成一个文件,放进每个勾选的 Agent 的子代理目录。主 Agent 读每个子代理的 描述,自己决定什么时候调用,所以描述要直白地写清它做什么、什么时候该用它。

+
    +
  • 名字:2 到 50 个小写字母、数字和 -。有几个名字保留不能用,比如 default 和 main。
  • +
  • 描述:必填,最多 1000 个字符。
  • +
  • 提示词:必填,成为子代理的指令。
  • +
  • 模型:可选,见 子代理的模型。
  • +
+
+ + + + + + + + + + +
Agent文件技能、MCP 服务器
Claude Code~/.claude/agents/<name>.md你选的那些
Codex~/.codex/agents/<name>.toml该 Agent 的全部
OpenCode配置目录里的 agents/<name>.md该 Agent 的全部
Gemini CLI~/.gemini/agents/<name>.md该 Agent 的全部
Qwen Code其目录里的 agents/<name>.md该 Agent 的全部
Droid~/.factory/droids/<name>.md你选的 MCP 服务器;全部技能
Grok其目录里的 agents/<name>.md该 Agent 的全部
Cursor~/.cursor/agents/<name>.md该 Agent 的全部
Copilot CLI~/.copilot/agents/<name>.agent.md该 Agent 的全部
+
    +
  • 只有 Claude Code 能把子代理限定在你选的技能上,只有 Claude Code 和 Droid 能限定在你选的 MCP 服务器上。其他 Agent 的子代理能用该 Agent 的一切。
  • +
  • Cursor:只有 Cursor 应用读 ~/.cursor/agents。cursor-agent 只读项目里的 .cursor/agents。
  • +
  • Kimi Code、Goose、Crush、Qoder、CodeBuddy、iFlow 和 Kiro 没有用户级的子代理目录,所以拿不到子代理。WSL 里的 Agent 也拿不到。
  • +
  • 你改了 magpie 写的文件,它就归你,magpie 不再改它。你自己的同名文件永远不会被覆盖,页面会显示一个问题。
  • +
+ +

子代理的模型

+

子代理的 模型 只会写给 Codex。其他 Agent 的子代理都用 Agent 自己选的模型,页面上会注明。留空时显示 由 Agent 选择。

+

对 Codex,模型写进子代理的 .toml 文件。Codex 启动子代理时会叠上这个文件,所以请求带的就是这个模型,magpie 网关像路由其他请求一样路由它。可以选 Codex 列表里的任何模型、magpie 的 provider/model,或一个路由组(group/<id>)。

+

Agent 页面上 Codex 的子代理模型

+

Agent 页面上 Codex 那一行有一个自己的子代理模型设置,管 Codex 启动的所有子代理:

+
    +
  • 由主代理自选(默认)。主 Agent 为每个子代理选模型,也可能选 Codex 自带的模型。没指定模型的子代理用主 Agent 的模型。恢复的子代理仍用它最初的模型。
  • +
  • 跟主代理一样。所有子代理都用主 Agent 的模型。
  • +
  • 某个模型或路由组。所有子代理都用它,主 Agent 指定了别的也一样。
  • +
+
Agent 页面的设置优先。只要它不是 由主代理自选,网关就把 Codex 的每个子代理请求都发到它,资源库里子代理自己的模型也会被取代,资源库的编辑器里会注明这一点。在那里选定模型时,还会把 Codex 配置里的 default_subagent_model 去掉。
+

Codex 自己 config.toml 里的 [agents] default_subagent_model 是另一回事:它只是主 Agent 没指定模型时子代理起步用的模型。以上都有一个例外:ChatGPT 后端封装过的任务保持它要求的模型,除非这个设置本身就是某个 ChatGPT 账号的模型。

+

Claude Code 有自己的顺序:先看主 Agent 调用时指定的模型,再看子代理文件里的 model:,再看 CLAUDE_CODE_SUBAGENT_MODEL(Agent 页面上 Claude Code 那一行可以设置),最后是会话的模型。

+ +

Hooks

+

Hook 是 Agent 在一轮对话中某个时刻运行的命令:结束时发个通知,改完文件后跑格式化。选一个通用事件(一轮结束、工具之后、工具之前、收到提示词、会话开始),magpie 会按每个 Agent 自己对这个事件的叫法写入。只有 Claude Code、Codex、Gemini CLI、Cursor、Grok Build 和 Grok App 支持 Hooks。你改过的 Hook 条目就归你。

+ +

RTK

+

RTK 标签可以按 Agent 打开 RTK:Agent 的 shell 命令经过 RTK 运行,输出被压短以节省 token。magpie 可以帮你安装 RTK;RTK 卸掉后也能关闭。

+ +

magpie 会改什么

+
    +
  • 只改它自己写的:标记之间的文字、它记录过的条目、它标记为自己的文件。
  • +
  • 从不碰你自己的同名文件、条目或技能。页面会显示冲突,让你选择。
  • +
  • 被替换的内容都会先进备份。
  • +
+

项目也可以拿到技能和 MCP 服务器,放在项目自己的目录里(比如 .claude/skills、.agents/skills、.mcp.json 或 .codex/config.toml)。

+
+
+ + + + + + + diff --git a/site/public/docs/zh/masking.html b/site/public/docs/zh/masking.html index a2ad42a2e..ffa544efb 100644 --- a/site/public/docs/zh/masking.html +++ b/site/public/docs/zh/masking.html @@ -54,6 +54,7 @@ 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 版本发布 @@ -177,6 +178,7 @@ 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 GitHub diff --git a/site/public/docs/zh/mcp-router.html b/site/public/docs/zh/mcp-router.html index 83dd84da2..437f7c645 100644 --- a/site/public/docs/zh/mcp-router.html +++ b/site/public/docs/zh/mcp-router.html @@ -54,6 +54,7 @@ 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 版本发布 @@ -140,6 +141,7 @@ magpie library mcp router off 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 GitHub diff --git a/site/public/docs/zh/plugins.html b/site/public/docs/zh/plugins.html index 8360d7066..583459a48 100644 --- a/site/public/docs/zh/plugins.html +++ b/site/public/docs/zh/plugins.html @@ -54,6 +54,7 @@ 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 版本发布 @@ -1030,6 +1031,7 @@ document.getElementById("calls").textContent = `${s.calls 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 GitHub diff --git a/site/public/docs/zh/privacy.html b/site/public/docs/zh/privacy.html index b7ac74e60..bcd59edd8 100644 --- a/site/public/docs/zh/privacy.html +++ b/site/public/docs/zh/privacy.html @@ -54,6 +54,7 @@ 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 版本发布 @@ -222,6 +223,7 @@ 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 GitHub diff --git a/site/public/docs/zh/remote.html b/site/public/docs/zh/remote.html index 669a0fe2b..17a2edca5 100644 --- a/site/public/docs/zh/remote.html +++ b/site/public/docs/zh/remote.html @@ -54,6 +54,7 @@ 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 版本发布 @@ -236,6 +237,7 @@ curl -s http://127.0.0.1:3425/v1/magpie/concurrency 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 GitHub diff --git a/site/public/docs/zh/start.html b/site/public/docs/zh/start.html index 7a5c1fa6e..474a24531 100644 --- a/site/public/docs/zh/start.html +++ b/site/public/docs/zh/start.html @@ -54,6 +54,7 @@ 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 版本发布 @@ -350,6 +351,7 @@ IP-CIDR6,::1/128,DIRECT,no-resolve 隐私 本地脱敏 MCP 路由 + 资源库 Add to magpie 接入应用 GitHub diff --git a/site/public/sitemap.xml b/site/public/sitemap.xml index 5bbbca1d5..d8ad0a195 100644 --- a/site/public/sitemap.xml +++ b/site/public/sitemap.xml @@ -9,6 +9,7 @@ https://usemagpie.ai/docs/import https://usemagpie.ai/docs/integrate https://usemagpie.ai/docs/intent +https://usemagpie.ai/docs/library https://usemagpie.ai/docs/masking https://usemagpie.ai/docs/mcp-router https://usemagpie.ai/docs/plugins @@ -20,6 +21,7 @@ https://usemagpie.ai/docs/zh/import https://usemagpie.ai/docs/zh/integrate https://usemagpie.ai/docs/zh/intent +https://usemagpie.ai/docs/zh/library https://usemagpie.ai/docs/zh/masking https://usemagpie.ai/docs/zh/mcp-router https://usemagpie.ai/docs/zh/plugins @@ -30,6 +32,7 @@ https://usemagpie.ai/docs/ja/docker https://usemagpie.ai/docs/ja/import https://usemagpie.ai/docs/ja/intent +https://usemagpie.ai/docs/ja/library https://usemagpie.ai/docs/ja/masking https://usemagpie.ai/docs/ja/mcp-router https://usemagpie.ai/docs/ja/plugins