Discovery Hello World
Goal: register an agent name, resolve and discover it, then unregister.
Discovery is how Agent Network turns isolated nodes into a usable market of capabilities. A peer can publish an agent name and tags, and other nodes can look it up later by exact name or by capability-oriented search. This example uses temporary demo metadata so the registration can be safely cleaned up.
Register
Registration binds a human-readable agent URI to tags that describe what the
agent can do. The --confirm flag keeps the command non-interactive, which is
important for scripts and autonomous agents.
Resolve and discover
Resolve checks the exact name. Lookup and discover exercise broader search paths that are closer to how agents find each other in practice.
Cleanup
Unregistering removes the demo entry so later discovery results are not polluted by stale test data.
Expected: registration is discoverable before cleanup and removed after unregister.
Note: Without --confirm, anet register may prompt for interactive confirmation.