digraph AgentRegistration { rankdir=LR; node [shape=box, style=rounded]; edge [fontsize=10]; MyAgent [label="MyAgent"]; RegistryClient [label="RegistryClient"]; CentralRegistry [label="Central Registry\n(Sinatra Server)"]; subgraph cluster_registration { label="Registration Process"; color=lightgrey; style=filled; MyAgent -> RegistryClient [label="1. initialize"]; RegistryClient -> CentralRegistry [label="2. POST /register\n{name, capabilities}"]; CentralRegistry -> RegistryClient [label="3. 201 Created\n{uuid}"]; RegistryClient -> MyAgent [label="4. Return uuid"]; } subgraph cluster_discovery { label="Discovery Process"; color=lightblue; style=filled; MyAgent -> RegistryClient [label="5. discover(capability)"]; RegistryClient -> CentralRegistry [label="6. GET /discover?capability=..."]; CentralRegistry -> RegistryClient [label="7. 200 OK\n[matching agents]"]; RegistryClient -> MyAgent [label="8. Return matching agents"]; } subgraph cluster_withdrawal { label="Withdrawal Process"; color=lightpink; style=filled; MyAgent -> RegistryClient [label="9. withdraw(uuid)"]; RegistryClient -> CentralRegistry [label="10. DELETE /withdraw/:uuid"]; CentralRegistry -> RegistryClient [label="11. 204 No Content"]; RegistryClient -> MyAgent [label="12. Confirm withdrawal"]; } }