Repository navigation
docs: fix the getting-started pages and the README - #782
Merged
Merged
Conversation
The getting-started index said the control plane enrolls members, distributes policy and runs the router. agentmesh-control-plane has no router. cmd/agentmesh-control-plane/main.go:27-32 imports nothing from internal/router. The router is its own program, agentmesh-router, and only agentmesh-one runs both in one process (internal/standalone/standalone.go:15-17).
The quick start exported the node's API token as TOKEN and passed it to every mcp-client call as -token "$TOKEN". The -token flag is deprecated (cmd/mcp-client/main.go:45), and a token in a flag value shows in ps output. mcp-client reads the file named by -token-path, or AGENTMESH_API_TOKEN when that flag is absent (cmd/mcp-client/main.go:54-62). The quick start now exports AGENTMESH_API_TOKEN. The mcp-client calls in the quick start, the exposing-services guide, the kubernetes guide and the mobile preview drop the flag. The chat-a2a use case and the contributing page pass their fixed dev token in the environment of the command. The curl and a2a examples in the node API reference and the egress destinations guide use $AGENTMESH_API_TOKEN too, because nothing defines TOKEN now. The guides that call mcp-client point at the quick start for the token, and the chat-a2a example README and the kind script's hints drop -token.
The your-own-mesh page said a plain web server declared under any service type is never advertised. The registry probes only a service that implements Probe (internal/node/service_registry.go:61-69). The MCP and A2A services do (internal/node/mcp_service.go:107, internal/node/a2a_service.go:73). InferenceService has no Probe method, so the node advertises it as declared. The node's /v1/models lists the backend's models only when the backend answers (internal/node/openai_facade.go:255-258).
The README and the docs index said a node enrolls with a one-time bootstrap token. A bootstrap token carries max_usages and usages_count (api/agentmesh.proto:694-695), and the control plane refuses it once usages_count reaches max_usages, not after its first use (internal/controlplane/server.go:2242). An admin-minted token defaults to one use (internal/controlplane/server.go:2796-2797), and the join token agentmesh-one mints allows 1<<30 uses (internal/standalone/standalone.go:68).
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates documentation and helper scripts to transition from using the -token CLI flag in mcp-client to using the AGENTMESH_API_TOKEN environment variable. It also refines documentation regarding bootstrap tokens, mesh architecture (explicitly detailing the role of routers), and how different service types (MCP, A2A, inference) are advertised and probed. I have no feedback to provide as there are no review comments to assess.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The getting-started pages and the README tell a new user how the mesh fits together and how to run the first commands. Four statements there disagree with the code. The quick start also passes the node's API token to
mcp-clientas a flag value, which the flag's own help marks deprecated.What changed
agentmesh-oneruns both in one process.AGENTMESH_API_TOKEN, and everymcp-clientexample reads the token from that variable instead of-token. The guides, the node API reference, the chat-a2a example and the kind script's hints use the same variable.mcpanda2abackends before it advertises them, and advertises aninferencebackend without a probe.max_usagesenrollments.Scope
development/kind/run.sh.Verification
mcp-clientwas built and run against a server that prints the auth header. The exported variable,-token-pathand theVAR=value cmdform all send the token.