[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6992DBBTEPX4C3P6KREAR9H":3,"skill-same:01M6992DBBTEPX4C3P6KREAR9H":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":37,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M6992DBBTEPX4C3P6KREAR9H","agentmesh",null,"Use when local tools cannot provide a needed capability and an Agent Mesh network can: inspect mesh state, discover reachable services\u002Ftools, describe and call namespaced remote MCP tools, reach OpenAI-compatible inference models hosted by mesh peers, and hand work to A2A agents on the mesh through the official a2a CLI. Also use to set up, join, or reconnect a agentmesh-node when its MCP tools are not callable yet.","google\u002Fagentmesh","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M6992BMB066A5K04RVTNEEH2",1200,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fagentmesh\u002Fblob\u002Fmain\u002Fagents\u002Fskills\u002Fagentmesh\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[5,24,25,26],"MCP","cli","a2a","2026-11-10 10:12:30",false,"---\nname: agentmesh\ndescription: \"Use when local tools cannot provide a needed capability and an Agent Mesh network can: inspect mesh state, discover reachable services\u002Ftools, describe and call namespaced remote MCP tools, reach OpenAI-compatible inference models hosted by mesh peers, and hand work to A2A agents on the mesh through the official a2a CLI. Also use to set up, join, or reconnect a agentmesh-node when its MCP tools are not callable yet.\"\n---\n\n# Agent Mesh Skill\n\nUse this skill when local tools cannot satisfy the task and the Agent Mesh\ncan. Prefer local tools first. Reach into the Agent Mesh only for the capability needed\nto complete the task.\n\nPick the path that matches the need:\n\n- The `agentmesh-node` MCP tools are not callable yet:\n  [Bootstrap A Node](#bootstrap-a-node).\n- The task needs a plain HTTP call to the node, such as inference or a\n  `local_proxy_url`: [Talk To The Node Over HTTP](#talk-to-the-node-over-http).\n- The node is up but the mesh seems broken:\n  [Diagnose The Node](#diagnose-the-node).\n- The task needs a remote tool or capability:\n  [Inspect The Mesh](#inspect-the-mesh).\n- The task needs a model completion:\n  [Use Mesh Inference](#use-mesh-inference).\n- The task needs a remote A2A agent: [Call A2A Agents](#call-a2a-agents).\n\n## Bootstrap A Node\n\nThe mesh is reached through a local `agentmesh-node`. When its MCP tools are missing,\nguide the user through these steps. Propose each shell command and let the user\napprove it before running anything.\n\n1. Check the CLI: `agentmesh-node --help`. If it is missing, install it with\n   `curl -sL https:\u002F\u002Fgoogle.github.io\u002Fagentmesh\u002Finstall.sh | bash` or\n   `go install github.com\u002Fgoogle\u002Fagentmesh\u002Fcmd\u002Fagentmesh-node@latest`.\n2. Start the node in the background: `agentmesh-node run --daemonize`. It returns as\n   soon as the node answers, and prints the endpoint, the API token file, the\n   log file, and how to stop it. It is idempotent, so run it again whenever you\n   need to confirm a node is up.\n3. If step 2 reports that the node is not enrolled, run the command it prints,\n   `agentmesh-node join --headless \u003Ccontrol-plane-url>`. In headless mode Agent Mesh now\n   prefers OAuth device flow automatically when the OIDC provider supports it,\n   so no pasted callback code is required: it prints a verification URL\u002Fcode\n   and polls until login completes. If the provider does not expose a device\n   endpoint, Agent Mesh falls back to OOB code-paste flow; show the URL\u002Fcode to the\n   user, wait for completion, then repeat step 2. For deterministic automation,\n   force the flow with `--auth-mode device` (also `oob`, `browser`, or the\n   default `auto`); `--auth-mode device` fails fast if the provider has no\n   device endpoint. Enrollment is a one-time step per machine.\n4. Read the node API token from the file named in step 2, then register the MCP\n   endpoint `http:\u002F\u002F127.0.0.1:8080\u002Fmcp` with the header\n   `X-Mesh-Authentication: Bearer \u003Ctoken>`. Claude Code:\n   `claude mcp add --transport http agentmesh http:\u002F\u002F127.0.0.1:8080\u002Fmcp --header \"X-Mesh-Authentication: Bearer \u003Ctoken>\"`.\n   Antigravity: add the same URL as `serverUrl` with the same header to\n   `~\u002F.gemini\u002Fconfig\u002Fmcp_config.json`.\n5. Tell the user to restart the agent session, since MCP tools load at startup.\n\nMCP clients need that HTTP endpoint. For everything else — shell commands and\ndirect HTTP calls to the node — see\n[Talk To The Node Over HTTP](#talk-to-the-node-over-http): the Unix socket gets\nyou in without a token.\n\nIf setup is stuck in a half-configured state, ask the user before starting over:\nstop the node, run `agentmesh-node reset --all --yes` for a clean slate, then go back\nto step 2. That deletes the node's identity and its PeerID, and enrolling again\nneeds another login, so never do it to work around an unexplained error.\n\nPut the node API token only in the agent's MCP configuration. Do not echo it\ninto the transcript, and do not commit it.\n\n## Talk To The Node Over HTTP\n\nThe MCP tools need none of this. It applies when a task needs a plain HTTP\nrequest to the node: the OpenAI-compatible `\u002Fv1` endpoints, or a\n`local_proxy_url` returned by `discover_remote_services`.\n\nThere are two ways in. Try them in this order.\n\n**1. The Unix socket, whenever there is one.** `get_mesh_info` reports it as\n`local_api_socket`, by default `~\u002F.config\u002Fagentmesh\u002Fagentmesh.sock`. It serves the same\nAPI and takes no token at all: only the user who owns the socket can connect to\nit, so the filesystem has already done the authenticating. Prefer it, because no\nsecret reaches a command line, the shell history, or the transcript.\n\n```bash\ncurl --unix-socket ~\u002F.config\u002Fagentmesh\u002Fagentmesh.sock http:\u002F\u002Flocalhost\u002Fv1\u002Fmodels\n```\n\nThe host in the URL is a placeholder that curl ignores once it dials a socket.\n\n**2. The TCP endpoint, with the node API token.** Use this when `get_mesh_info`\nreports no `local_api_socket`, or when that path is not reachable from where you\nrun, for example a node inside a container. Do not read your MCP client\nconfiguration to recover it: those files hold the headers of every other server\nyou are connected to, and reading them puts all of those secrets into the\ntranscript. A daemonized node writes its token to\n`~\u002F.config\u002Fagentmesh\u002Fapi-token`; let curl read that file itself so the value\nnever appears in an argument, the shell history, or your output:\n\n```bash\ncurl http:\u002F\u002F127.0.0.1:8080\u002Fv1\u002Fmodels -H @\u003C(printf 'X-Mesh-Authentication: Bearer %s' \"$(cat ~\u002F.config\u002Fagentmesh\u002Fapi-token)\")\n```\n\n`\u003C(...)` needs bash or zsh; in a plain `sh`, write the header line to a file\nwith mode 0600 and pass `-H @that-file` instead.\n\nIf the node was started with `--api-token-path` or `AGENTMESH_API_TOKEN`, ask the\nuser where the token lives rather than searching for it.\n\nNever print the token or echo it into the transcript. `Authorization` is not the\nnode's credential: send it only when the destination service needs its own, and\nit passes through to that service untouched.\n\n## Diagnose The Node\n\nOperator diagnostics are not MCP tools, so they never appear in the tool list.\nA running node serves them under `\u002Fdebug`, and the `agentmesh-node` CLI wraps each\nendpoint over the node's Unix socket — no token involved:\n\n```bash\nagentmesh-node debug mesh-info                 # connected peers, attached routers, router peer ID\nagentmesh-node debug connectivity [peer-id]    # ping the Agent Mesh router, or a specific peer\nagentmesh-node debug network-info              # listen and announced addresses\nagentmesh-node debug token-info                # local auth token expiration and status\nagentmesh-node debug logs                      # recent log lines\nagentmesh-node debug connect-peer \u003Cmultiaddr>  # manually dial a peer\n```\n\nEach command prints the endpoint's raw JSON, so it composes with `jq`. The same\ndata is one `curl` away when the CLI is not at hand:\n\n```bash\ncurl --unix-socket ~\u002F.config\u002Fagentmesh\u002Fagentmesh.sock http:\u002F\u002Flocalhost\u002Fdebug\u002Fmesh-info\n```\n\nThese endpoints answer even while the mesh is unreachable — that is the state\nthey exist to diagnose. When the node runs but mesh tools fail, check\n`debug connectivity` for `router_error_msg` and `debug token-info` for an\nexpired token before restarting or re-enrolling anything.\n\n## Inspect The Mesh\n\nStart by understanding the local node and mesh state:\n\n- Use `get_mesh_info` with `{}` to inspect `connected_peers`, `attached_routers`, and\n  `router_peer_id`.\n- Use `list_local_services` with `{}` to see services registered on the local\n  node.\n\n## Discover Remote Capabilities\n\nUse service discovery when you need to inventory reachable service providers:\n\n- Use `discover_remote_services` with `{\"type\":\"mcp\"}`,\n  `{\"type\":\"inference\"}`, or `{\"type\":\"a2a\"}`. Add `name` only when narrowing\n  by service name.\n- Treat `discover_remote_services` as service inventory. Non-MCP service types\n  are not callable with `call_remote_tool`. For `inference:\u002F\u002F` services see\n  [Use Mesh Inference](#use-mesh-inference), for `a2a:\u002F\u002F` services\n  [Call A2A Agents](#call-a2a-agents).\n\nUse tool discovery when you need remote MCP tools:\n\n- Use `find_remote_tools` to discover reachable aggregated MCP tools advertised\n  by remote Agent Mesh services.\n- Narrow `find_remote_tools` with `service_name` or `peer_id` when you already\n  know the target.\n- Mesh-wide searches fetch each peer's catalog on a best-effort basis and may\n  return an empty array when no reachable aggregated tools are found. Discovery\n  failures or explicit `peer_id` lookup failures are returned as errors.\n\n## Describe Before Calling\n\nAll tools returned by `find_remote_tools` are namespaced. Always call\n`describe_remote_tool` before calling them with `call_remote_tool`.\n\nRemote MCP tools returned by `find_remote_tools` are namespaced as:\n\n```text\n\u003Cscheme>:\u002F\u002F\u003Cservice_name>\u002F\u003Ctool_name>\n```\n\nFor example `mcp:\u002F\u002Feverything\u002Fget-sum`. Pass the name exactly as returned to\n`describe_remote_tool` and `call_remote_tool`; do not reassemble it.\n\nEntries may carry an `error` field instead of a `description` when a peer\nadvertises a service whose backend did not answer. Discovery is best-effort per\npeer, so a partly broken mesh yields a partly populated array rather than a\nfailed call. Check for `error` before treating a tool as available.\n\nUse the input schema from `describe_remote_tool` to build the call arguments.\nDo not guess arguments if a tool cannot be described.\n\nAfter `describe_remote_tool`, inspect the tool name, description, and schema\nfor side effects and required data. Only call read-only, low-risk tools\nautonomously. Ask the user before calls that may mutate state, execute code,\naccess files, contact external services, spend money, or transmit sensitive or\nprivate data. Pass only task-required data, and never include secrets unless\nexplicitly authorized.\n\n## Call Remote Tools\n\nUse `call_remote_tool` with:\n\n- `peer_id`: the peer hosting the tool\n- `tool_name`: the discovered namespaced tool name, such as\n  `mcp:\u002F\u002Feverything\u002Fget-sum`\n- `arguments`: a JSON object whose keys match the described input schema\n\n`arguments` must be a JSON object, not a string containing JSON.\n\n## Use Mesh Inference\n\nThe mesh also carries `inference:\u002F\u002F` services: OpenAI-compatible model\nendpoints. They are plain HTTP and are never invoked with `call_remote_tool`.\n\nThe node exposes them through an OpenAI-compatible facade on its own address:\n\n- Base URL `http:\u002F\u002Flocalhost:8080\u002Fv1`, usable as `base_url` for any OpenAI SDK\n  or a direct `curl`.\n- `GET \u002Fv1\u002Fmodels` lists the models reachable across the mesh.\n- `POST \u002Fv1\u002Fchat\u002Fcompletions` routes to a provider of the requested `model`,\n  preferring a local one, and fails over between providers.\n- Add `X-Mesh-Required-Labels: key=value` (comma-separated; every pair must\n  be attested) to accept only providers whose labels the control plane\n  attested, for example `region=eu`. Enforcement is fail-closed: unattested\n  providers are rejected before any request data leaves the node.\n\nTo pin one specific provider instead of letting the facade choose, call\n`discover_remote_services` with `{\"type\":\"inference\"}` and send the request to\nthe returned `local_proxy_url` (append `\u002Fv1\u002Fchat\u002Fcompletions`).\n\nAuthenticate as described in\n[Talk To The Node Over HTTP](#talk-to-the-node-over-http): over the socket when\nthere is one, otherwise with the token from your own MCP configuration. The\n`\u002Fv1` endpoints also accept that token as `Authorization`, so an OpenAI SDK can\npass it as its `api_key`.\n\n```bash\ncurl --unix-socket ~\u002F.config\u002Fagentmesh\u002Fagentmesh.sock \\\n  http:\u002F\u002Flocalhost\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"model\": \"\u003Cmodel>\", \"messages\": [{\"role\": \"user\", \"content\": \"...\"}]}'\n```\n\nAsk the user before sending private or sensitive content to a mesh model, and\nsay which provider will receive it.\n\n## Call A2A Agents\n\nThe mesh also carries `a2a:\u002F\u002F` services: agents that speak the A2A protocol.\nThey are plain HTTP behind the node's proxy path and are never invoked with\n`call_remote_tool`. Drive them with the official `a2a` CLI\n(github.com\u002Fa2aproject\u002Fa2a-cli, v0.3.0 or later). It ships its own agent\nskill, which covers the protocol side: cards, messages, tasks and streaming.\nThis section only adds what the mesh needs.\n\nCheck for the CLI with `a2a version`. If it is missing, propose the install\nfrom its README (`go install github.com\u002Fa2aproject\u002Fa2a-cli@latest` names the\nbinary `a2a-cli`; rename it to `a2a`) and its skill with\n`npx skills add https:\u002F\u002Fgithub.com\u002Fa2aproject\u002Fa2a-cli --skill a2a-cli`, and\nlet the user approve each command.\n\n1. Call `discover_remote_services` with `{\"type\":\"a2a\"}` and take the\n   `local_proxy_url` of the provider you want.\n2. Point the CLI at the agent card under that URL. The node regenerates the\n   card so its interface URL is the proxy path itself; every later request\n   then goes through the mesh with no further Agent Mesh-specific setup.\n3. The CLI speaks TCP only, so it needs the node API token from\n   [Talk To The Node Over HTTP](#talk-to-the-node-over-http) as a service\n   parameter. Pass it through the CLI's environment, never as a flag, so the\n   value stays out of the process arguments and the shell history:\n\n```bash\nA2ACLI_SVC_PARAM=\"X-Mesh-Authentication=Bearer $(cat ~\u002F.config\u002Fagentmesh\u002Fapi-token)\" \\\n  a2a card get \u003Clocal_proxy_url>\u002F.well-known\u002Fagent-card.json\n```\n\nEvery other `a2a` command takes the same card URL through `-a` and the same\nenvironment. To accept only a provider whose labels the control plane\nattested, append `,X-Mesh-Required-Labels=region=eu` to that variable: the\nnode then refuses fail-closed with `403` before any data leaves it. That\nrefusal is the feature: report it, never retry with weaker labels on your\nown. A `--svc-param` flag replaces the whole variable, and the variable is\nsplit on commas, so several label pairs need a `--config` YAML file with\nboth entries under `svc-param` instead.\n\nAsk the user before sending private or sensitive content to a mesh agent, and\nsay which peer will receive it.\n\n## Minimal Workflow\n\n1. Confirm no local tool can satisfy the task.\n2. If the `agentmesh-node` MCP tools are unavailable, follow\n   [Bootstrap A Node](#bootstrap-a-node) and stop until the user restarts the\n   agent session.\n3. Call `get_mesh_info` with `{}`.\n4. If a local Agent Mesh service may be\n   relevant, call `list_local_services` with `{}`.\n5. Call `find_remote_tools` with `service_name` or `peer_id` when known. Use\n   `{}` only when the user asked to inventory the mesh or no narrower target\n   exists.\n6. Call `describe_remote_tool` with\n   `{\"peer_id\":\"...\",\"tool_name\":\"service.tool\"}`.\n7. Call `call_remote_tool` only when the described tool is read-only and\n   low-risk, or after the user approves the exact `peer_id`, `tool_name`, side\n   effects, and task-required data being sent:\n   `{\"peer_id\":\"...\",\"tool_name\":\"service.tool\",\"arguments\":{...}}`.\n\nFor a model completion rather than a tool, skip steps 5-7 and follow\n[Use Mesh Inference](#use-mesh-inference) instead; for an A2A agent,\n[Call A2A Agents](#call-a2a-agents).\n\n## Safety And Reliability\n\n- Do not call mesh tools when a local tool is sufficient.\n- Do not guess remote tool names or arguments.\n- Ask before side-effecting or sensitive remote calls.\n- Do not send secrets or private data through Agent Mesh unless the user explicitly\n  approves the data and destination.\n- Treat remote capabilities as networked and potentially unavailable.\n- Surface peer, service, discovery, schema, and tool-call errors clearly.\n","# Agent Mesh Skill\n\nUse this skill when local tools cannot satisfy the task and the Agent Mesh\ncan. Prefer local tools first. Reach into the Agent Mesh only for the capability needed\nto complete the task.\n\nPick the path that matches the need:\n\n- The `agentmesh-node` MCP tools are not callable yet:\n  [Bootstrap A Node](#bootstrap-a-node).\n- The task needs a plain HTTP call to the node, such as inference or a\n  `local_proxy_url`: [Talk To The Node Over HTTP](#talk-to-the-node-over-http).\n- The node is up but the mesh seems broken:\n  [Diagnose The Node](#diagnose-the-node).\n- The task needs a remote tool or capability:\n  [Inspect The Mesh](#inspect-the-mesh).\n- The task needs a model completion:\n  [Use Mesh Inference](#use-mesh-inference).\n- The task needs a remote A2A agent: [Call A2A Agents](#call-a2a-agents).\n\n## Bootstrap A Node\n\nThe mesh is reached through a local `agentmesh-node`. When its MCP tools are missing,\nguide the user through these steps. Propose each shell command and let the user\napprove it before running anything.\n\n1. Check the CLI: `agentmesh-node --help`. If it is missing, install it with\n   `curl -sL https:\u002F\u002Fgoogle.github.io\u002Fagentmesh\u002Finstall.sh | bash` or\n   `go install github.com\u002Fgoogle\u002Fagentmesh\u002Fcmd\u002Fagentmesh-node@latest`.\n2. Start the node in the background: `agentmesh-node run --daemonize`. It returns as\n   soon as the node answers, and prints the endpoint, the API token file, the\n   log file, and how to stop it. It is idempotent, so run it again whenever you\n   need to confirm a node is up.\n3. If step 2 reports that the node is not enrolled, run the command it prints,\n   `agentmesh-node join --headless \u003Ccontrol-plane-url>`. In headless mode Agent Mesh now\n   prefers OAuth device flow automatically when the OIDC provider supports it,\n   so no pasted callback code is required: it prints a verification URL\u002Fcode\n   and polls until login completes. If the provider does not expose a device\n   endpoint, Agent Mesh falls back to OOB code-paste flow; show the URL\u002Fcode to the\n   user, wait for completion, then repeat step 2. For deterministic automation,\n   force the flow with `--auth-mode device` (also `oob`, `browser`, or the\n   default `auto`); `--auth-mode device` fails fast if the provider has no\n   device endpoint. Enrollment is a one-time step per machine.\n4. Read the node API token from the file named in step 2, then register the MCP\n   endpoint `http:\u002F\u002F127.0.0.1:8080\u002Fmcp` with the header\n   `X-Mesh-Authentication: Bearer \u003Ctoken>`. Claude Code:\n   `claude mcp add --transport http agentmesh http:\u002F\u002F127.0.0.1:8080\u002Fmcp --header \"X-Mesh-Authentication: Bearer \u003Ctoken>\"`.\n   Antigravity: add the same URL as `serverUrl` with the same header to\n   `~\u002F.gemini\u002Fconfig\u002Fmcp_config.json`.\n5. Tell the user to restart the agent session, since MCP tools load at startup.\n\nMCP clients need that HTTP endpoint. For everything else — shell commands and\ndirect HTTP calls to the node — see\n[Talk To The Node Over HTTP](#talk-to-the-node-over-http): the Unix socket gets\nyou in without a token.\n\nIf setup is stuck in a half-configured state, ask the user before starting over:\nstop the node, run `agentmesh-node reset --all --yes` for a clean slate, then go back\nto step 2. That deletes the node's identity and its PeerID, and enrolling again\nneeds another login, so never do it to work around an unexplained error.\n\nPut the node API token only in the agent's MCP configuration. Do not echo it\ninto the transcript, and do not commit it.\n\n## Talk To The Node Over HTTP\n\nThe MCP tools need none of this. It applies when a task needs a plain HTTP\nrequest to the node: the OpenAI-compatible `\u002Fv1` endpoints, or a\n`local_proxy_url` returned by `discover_remote_services`.\n\nThere are two ways in. Try them in this order.\n\n**1. The Unix socket, whenever there is one.** `get_mesh_info` reports it as\n`local_api_socket`, by default `~\u002F.config\u002Fagentmesh\u002Fagentmesh.sock`. It serves the same\nAPI and takes no token at all: only the user who owns the socket can connect to\nit, so the filesystem has already done the authenticating. Prefer it, because no\nsecret reaches a command line, the shell history, or the transcript.\n\n```bash\ncurl --unix-socket ~\u002F.config\u002Fagentmesh\u002Fagentmesh.sock http:\u002F\u002Flocalhost\u002Fv1\u002Fmodels\n```\n\nThe host in the URL is a placeholder that curl ignores once it dials a socket.\n\n**2. The TCP endpoint, with the node API token.** Use this when `get_mesh_info`\nreports no `local_api_socket`, or when that path is not reachable from where you\nrun, for example a node inside a container. Do not read your MCP client\nconfiguration to recover it: those files hold the headers of every other server\nyou are connected to, and reading them puts all of those secrets into the\ntranscript. A daemonized node writes its token to\n`~\u002F.config\u002Fagentmesh\u002Fapi-token`; let curl read that file itself so the value\nnever appears in an argument, the shell history, or your output:\n\n```bash\ncurl http:\u002F\u002F127.0.0.1:8080\u002Fv1\u002Fmodels -H @\u003C(printf 'X-Mesh-Authentication: Bearer %s' \"$(cat ~\u002F.config\u002Fagentmesh\u002Fapi-token)\")\n```\n\n`\u003C(...)` needs bash or zsh; in a plain `sh`, write the header line to a file\nwith mode 0600 and pass `-H @that-file` instead.\n\nIf the node was started with `--api-token-path` or `AGENTMESH_API_TOKEN`, ask the\nuser where the token lives rather than searching for it.\n\nNever print the token or echo it into the transcript. `Authorization` is not the\nnode's credential: send it only when the destination service needs its own, and\nit passes through to that service untouched.\n\n## Diagnose The Node\n\nOperator diagnostics are not MCP tools, so they never appear in the tool list.\nA running node serves them under `\u002Fdebug`, and the `agentmesh-node` CLI wraps each\nendpoint over the node's Unix socket — no token involved:\n\n```bash\nagentmesh-node debug mesh-info                 # connected peers, attached routers, router peer ID\nagentmesh-node debug connectivity [peer-id]    # ping the Agent Mesh router, or a specific peer\nagentmesh-node debug network-info              # listen and announced addresses\nagentmesh-node debug token-info                # local auth token expiration and status\nagentmesh-node debug logs                      # recent log lines\nagentmesh-node debug connect-peer \u003Cmultiaddr>  # manually dial a peer\n```\n\nEach command prints the endpoint's raw JSON, so it composes with `jq`. The same\ndata is one `curl` away when the CLI is not at hand:\n\n```bash\ncurl --unix-socket ~\u002F.config\u002Fagentmesh\u002Fagentmesh.sock http:\u002F\u002Flocalhost\u002Fdebug\u002Fmesh-info\n```\n\nThese endpoints answer even while the mesh is unreachable — that is the state\nthey exist to diagnose. When the node runs but mesh tools fail, check\n`debug connectivity` for `router_error_msg` and `debug token-info` for an\nexpired token before restarting or re-enrolling anything.\n\n## Inspect The Mesh\n\nStart by understanding the local node and mesh state:\n\n- Use `get_mesh_info` with `{}` to inspect `connected_peers`, `attached_routers`, and\n  `router_peer_id`.\n- Use `list_local_services` with `{}` to see services registered on the local\n  node.\n\n## Discover Remote Capabilities\n\nUse service discovery when you need to inventory reachable service providers:\n\n- Use `discover_remote_services` with `{\"type\":\"mcp\"}`,\n  `{\"type\":\"inference\"}`, or `{\"type\":\"a2a\"}`. Add `name` only when narrowing\n  by service name.\n- Treat `discover_remote_services` as service inventory. Non-MCP service types\n  are not callable with `call_remote_tool`. For `inference:\u002F\u002F` services see\n  [Use Mesh Inference](#use-mesh-inference), for `a2a:\u002F\u002F` services\n  [Call A2A Agents](#call-a2a-agents).\n\nUse tool discovery when you need remote MCP tools:\n\n- Use `find_remote_tools` to discover reachable aggregated MCP tools advertised\n  by remote Agent Mesh services.\n- Narrow `find_remote_tools` with `service_name` or `peer_id` when you already\n  know the target.\n- Mesh-wide searches fetch each peer's catalog on a best-effort basis and may\n  return an empty array when no reachable aggregated tools are found. Discovery\n  failures or explicit `peer_id` lookup failures are returned as errors.\n\n## Describe Before Calling\n\nAll tools returned by `find_remote_tools` are namespaced. Always call\n`describe_remote_tool` before calling them with `call_remote_tool`.\n\nRemote MCP tools returned by `find_remote_tools` are namespaced as:\n\n```text\n\u003Cscheme>:\u002F\u002F\u003Cservice_name>\u002F\u003Ctool_name>\n```\n\nFor example `mcp:\u002F\u002Feverything\u002Fget-sum`. Pass the name exactly as returned to\n`describe_remote_tool` and `call_remote_tool`; do not reassemble it.\n\nEntries may carry an `error` field instead of a `description` when a peer\nadvertises a service whose backend did not answer. Discovery is best-effort per\npeer, so a partly broken mesh yields a partly populated array rather than a\nfailed call. Check for `error` before treating a tool as available.\n\nUse the input schema from `describe_remote_tool` to build the call arguments.\nDo not guess arguments if a tool cannot be described.\n\nAfter `describe_remote_tool`, inspect the tool name, description, and schema\nfor side effects and required data. Only call read-only, low-risk tools\nautonomously. Ask the user before calls that may mutate state, execute code,\naccess files, contact external services, spend money, or transmit sensitive or\nprivate data. Pass only task-required data, and never include secrets unless\nexplicitly authorized.\n\n## Call Remote Tools\n\nUse `call_remote_tool` with:\n\n- `peer_id`: the peer hosting the tool\n- `tool_name`: the discovered namespaced tool name, such as\n  `mcp:\u002F\u002Feverything\u002Fget-sum`\n- `arguments`: a JSON object whose keys match the described input schema\n\n`arguments` must be a JSON object, not a string containing JSON.\n\n## Use Mesh Inference\n\nThe mesh also carries `inference:\u002F\u002F` services: OpenAI-compatible model\nendpoints. They are plain HTTP and are never invoked with `call_remote_tool`.\n\nThe node exposes them through an OpenAI-compatible facade on its own address:\n\n- Base URL `http:\u002F\u002Flocalhost:8080\u002Fv1`, usable as `base_url` for any OpenAI SDK\n  or a direct `curl`.\n- `GET \u002Fv1\u002Fmodels` lists the models reachable across the mesh.\n- `POST \u002Fv1\u002Fchat\u002Fcompletions` routes to a provider of the requested `model`,\n  preferring a local one, and fails over between providers.\n- Add `X-Mesh-Required-Labels: key=value` (comma-separated; every pair must\n  be attested) to accept only providers whose labels the control plane\n  attested, for example `region=eu`. Enforcement is fail-closed: unattested\n  providers are rejected before any request data leaves the node.\n\nTo pin one specific provider instead of letting the facade choose, call\n`discover_remote_services` with `{\"type\":\"inference\"}` and send the request to\nthe returned `local_proxy_url` (append `\u002Fv1\u002Fchat\u002Fcompletions`).\n\nAuthenticate as described in\n[Talk To The Node Over HTTP](#talk-to-the-node-over-http): over the socket when\nthere is one, otherwise with the token from your own MCP configuration. The\n`\u002Fv1` endpoints also accept that token as `Authorization`, so an OpenAI SDK can\npass it as its `api_key`.\n\n```bash\ncurl --unix-socket ~\u002F.config\u002Fagentmesh\u002Fagentmesh.sock \\\n  http:\u002F\u002Flocalhost\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"model\": \"\u003Cmodel>\", \"messages\": [{\"role\": \"user\", \"content\": \"...\"}]}'\n```\n\nAsk the user before sending private or sensitive content to a mesh model, and\nsay which provider will receive it.\n\n## Call A2A Agents\n\nThe mesh also carries `a2a:\u002F\u002F` services: agents that speak the A2A protocol.\nThey are plain HTTP behind the node's proxy path and are never invoked with\n`call_remote_tool`. Drive them with the official `a2a` CLI\n(github.com\u002Fa2aproject\u002Fa2a-cli, v0.3.0 or later). It ships its own agent\nskill, which covers the protocol side: cards, messages, tasks and streaming.\nThis section only adds what the mesh needs.\n\nCheck for the CLI with `a2a version`. If it is missing, propose the install\nfrom its README (`go install github.com\u002Fa2aproject\u002Fa2a-cli@latest` names the\nbinary `a2a-cli`; rename it to `a2a`) and its skill with\n`npx skills add https:\u002F\u002Fgithub.com\u002Fa2aproject\u002Fa2a-cli --skill a2a-cli`, and\nlet the user approve each command.\n\n1. Call `discover_remote_services` with `{\"type\":\"a2a\"}` and take the\n   `local_proxy_url` of the provider you want.\n2. Point the CLI at the agent card under that URL. The node regenerates the\n   card so its interface URL is the proxy path itself; every later request\n   then goes through the mesh with no further Agent Mesh-specific setup.\n3. The CLI speaks TCP only, so it needs the node API token from\n   [Talk To The Node Over HTTP](#talk-to-the-node-over-http) as a service\n   parameter. Pass it through the CLI's environment, never as a flag, so the\n   value stays out of the process arguments and the shell history:\n\n```bash\nA2ACLI_SVC_PARAM=\"X-Mesh-Authentication=Bearer $(cat ~\u002F.config\u002Fagentmesh\u002Fapi-token)\" \\\n  a2a card get \u003Clocal_proxy_url>\u002F.well-known\u002Fagent-card.json\n```\n\nEvery other `a2a` command takes the same card URL through `-a` and the same\nenvironment. To accept only a provider whose labels the control plane\nattested, append `,X-Mesh-Required-Labels=region=eu` to that variable: the\nnode then refuses fail-closed with `403` before any data leaves it. That\nrefusal is the feature: report it, never retry with weaker labels on your\nown. A `--svc-param` flag replaces the whole variable, and the variable is\nsplit on commas, so several label pairs need a `--config` YAML file with\nboth entries under `svc-param` instead.\n\nAsk the user before sending private or sensitive content to a mesh agent, and\nsay which peer will receive it.\n\n## Minimal Workflow\n\n1. Confirm no local tool can satisfy the task.\n2. If the `agentmesh-node` MCP tools are unavailable, follow\n   [Bootstrap A Node](#bootstrap-a-node) and stop until the user restarts the\n   agent session.\n3. Call `get_mesh_info` with `{}`.\n4. If a local Agent Mesh service may be\n   relevant, call `list_local_services` with `{}`.\n5. Call `find_remote_tools` with `service_name` or `peer_id` when known. Use\n   `{}` only when the user asked to inventory the mesh or no narrower target\n   exists.\n6. Call `describe_remote_tool` with\n   `{\"peer_id\":\"...\",\"tool_name\":\"service.tool\"}`.\n7. Call `call_remote_tool` only when the described tool is read-only and\n   low-risk, or after the user approves the exact `peer_id`, `tool_name`, side\n   effects, and task-required data being sent:\n   `{\"peer_id\":\"...\",\"tool_name\":\"service.tool\",\"arguments\":{...}}`.\n\nFor a model completion rather than a tool, skip steps 5-7 and follow\n[Use Mesh Inference](#use-mesh-inference) instead; for an A2A agent,\n[Call A2A Agents](#call-a2a-agents).\n\n## Safety And Reliability\n\n- Do not call mesh tools when a local tool is sufficient.\n- Do not guess remote tool names or arguments.\n- Ask before side-effecting or sensitive remote calls.\n- Do not send secrets or private data through Agent Mesh unless the user explicitly\n  approves the data and destination.\n- Treat remote capabilities as networked and potentially unavailable.\n- Surface peer, service, discovery, schema, and tool-call errors clearly.\n",{"name":5,"description":7},"main","3d0c42021dbf238b160d6267ac17ea53218811ff","agents\u002Fskills\u002Fagentmesh",205,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fagentmesh","https:\u002F\u002Fgoogle.github.io\u002Fagentmesh\u002F","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-13 23:02:30",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add google\u002Fagentmesh --skill agentmesh",{"tool":48,"command":49},"bunx","bunx skills add google\u002Fagentmesh --skill agentmesh",{"tool":51,"command":52},"pnpm","pnpm dlx skills add google\u002Fagentmesh --skill agentmesh","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fagentmesh\u002Fblob\u002Fmain\u002Fagents\u002Fskills\u002Fagentmesh\u002FSKILL.md",true,[56],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"embed.go","SCRIPT","脚本",901,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fagentmesh\u002Fblob\u002Fmain\u002Fagents\u002Fskills\u002Fagentmesh\u002Fembed.go",[]]