Real-world Nexus sequence diagrams demonstrating seq2boxes on complex, production-like scenarios
Nexus A2A (Async-to-Async)
Nexus MCP (Model Context Protocol)
Original D2 Sequence Diagrams
// Nexus A2A (Async-to-Async)
shape: sequence_diagram
agent: {
label: Agent
}
a2a-proxy: {
label: a2a Proxy
}
caller-ns: {
label: Caller Namespace
}
handler-ns: {
label: Handler Namespace
}
nexus-gateway: {
label: Nexus Gateway
}
agent -{{TAB_CONTENTS}}gt; a2a-proxy: messages/send
a2a-proxy -{{TAB_CONTENTS}}gt; caller-ns: nexus Start\n/service/operation
caller-ns -{{TAB_CONTENTS}}gt; handler-ns: nexus Start\n/service/operation
handler-ns -{{TAB_CONTENTS}}gt; nexus-gateway: nexus task
nexus-gateway -{{TAB_CONTENTS}}gt; handler-ns: start handler wf
nexus-gateway -{{TAB_CONTENTS}}gt; handler-ns: operation token
handler-ns -{{TAB_CONTENTS}}gt; caller-ns: operation token
caller-ns -{{TAB_CONTENTS}}gt; a2a-proxy: operation token
a2a-proxy -{{TAB_CONTENTS}}gt; agent: Task ID\n(running)
agent -{{TAB_CONTENTS}}gt; a2a-proxy: tasks/get
a2a-proxy -{{TAB_CONTENTS}}gt; caller-ns: nexus Get\n/service/operation\n(long poll)
handler-ns.{{TAB_CONTENTS}}quot;handler wf\ncompletes{{TAB_CONTENTS}}quot;
handler-ns -{{TAB_CONTENTS}}gt; caller-ns: nexus callback
caller-ns -{{TAB_CONTENTS}}gt; a2a-proxy: long poll\nreleased
a2a-proxy -{{TAB_CONTENTS}}gt; agent: Task\n(completed)
// Nexus MCP (Model Context Protocol)
shape: sequence_diagram
agent: {
label: Agent
}
mcp-proxy: {
label: MCP Proxy
}
caller-ns: {
label: Caller Namespace
}
handler-ns: {
label: Handler Namespace
}
nexus-gateway: {
label: Nexus Gateway
}
agent -{{TAB_CONTENTS}}gt; mcp-proxy: tools/call
mcp-proxy -{{TAB_CONTENTS}}gt; caller-ns: nexus Start\n/service/operation
caller-ns -{{TAB_CONTENTS}}gt; handler-ns: nexus Start\n/service/operation
handler-ns -{{TAB_CONTENTS}}gt; nexus-gateway: nexus task
nexus-gateway -{{TAB_CONTENTS}}gt; handler-ns: start handler wf
nexus-gateway -{{TAB_CONTENTS}}gt; handler-ns: operation token
handler-ns -{{TAB_CONTENTS}}gt; caller-ns: operation token
caller-ns -{{TAB_CONTENTS}}gt; mcp-proxy: operation token
mcp-proxy -{{TAB_CONTENTS}}gt; caller-ns: nexus Get\n/service/operation\n(long poll)
handler-ns.{{TAB_CONTENTS}}quot;handler wf\ncompletes{{TAB_CONTENTS}}quot;
handler-ns -{{TAB_CONTENTS}}gt; caller-ns: nexus callback
caller-ns -{{TAB_CONTENTS}}gt; mcp-proxy: long poll\nreleased
mcp-proxy -{{TAB_CONTENTS}}gt; agent: tool result
Generated D2 Code - Default Combined
# Command: ./seq2boxes nexus-a2a.d2 nexus-mcp.d2
vars: {
d2-config: {
theme-id: 0
}
}
direction: right
# Messages from nexus-a2a.d2
diagram_nexus_a2a: {
style.fill: transparent
style.stroke: transparent
{{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1. messages/send{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;2. nexus Start /service/operation{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;3. nexus Start /service/operation{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;4. nexus task{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;5. start handler wf{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;6. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;7. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;8. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;9. Task ID (running){{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;10. tasks/get{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;11. nexus Get /service/operation (long poll){{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;12. nexus callback{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;13. long poll released{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;14. Task (completed){{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
}
# Messages from nexus-mcp.d2
diagram_nexus_mcp: {
style.fill: transparent
style.stroke: transparent
{{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1001. tools/call{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1002. nexus Start /service/operation{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1003. nexus Start /service/operation{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1004. nexus task{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1005. start handler wf{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1006. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1007. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1008. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1009. nexus Get /service/operation (long poll){{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1010. nexus callback{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1011. long poll released{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1012. tool result{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
}
Generated D2 Code - Combined Simple Arrows
# Command: ./seq2boxes --arrows simple nexus-a2a.d2 nexus-mcp.d2
vars: {
d2-config: {
theme-id: 0
}
}
direction: right
# Messages from nexus-a2a.d2
diagram_nexus_a2a: {
style.fill: transparent
style.stroke: transparent
{{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot; {{TAB_CONTENTS}}lt;-{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot;
{{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot; {{TAB_CONTENTS}}lt;-{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; {{TAB_CONTENTS}}lt;-{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; {{TAB_CONTENTS}}lt;-{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot;
}
# Messages from nexus-mcp.d2
diagram_nexus_mcp: {
style.fill: transparent
style.stroke: transparent
{{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot; {{TAB_CONTENTS}}lt;-{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot;
{{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot; {{TAB_CONTENTS}}lt;-{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; {{TAB_CONTENTS}}lt;-{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; {{TAB_CONTENTS}}lt;-{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot;
}
Generated D2 Code - A2A Boxes and Arrows
# Command: ./seq2boxes nexus-a2a.d2
vars: {
d2-config: {
theme-id: 0
}
}
direction: right
{{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1. messages/send{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;2. nexus Start /service/operation{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;3. nexus Start /service/operation{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;4. nexus task{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;5. start handler wf{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;6. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;7. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;8. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;9. Task ID (running){{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;10. tasks/get{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;11. nexus Get /service/operation (long poll){{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;12. nexus callback{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;13. long poll released{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;14. Task (completed){{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
Generated D2 Code - MCP Boxes and Arrows
# Command: ./seq2boxes nexus-mcp.d2
vars: {
d2-config: {
theme-id: 0
}
}
direction: right
{{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1. tools/call{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;2. nexus Start /service/operation{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;3. nexus Start /service/operation{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;4. nexus task{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;5. start handler wf{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;6. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;7. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;8. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;9. nexus Get /service/operation (long poll){{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;10. nexus callback{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;11. long poll released{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;12. tool result{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
Generated D2 Code - Flagship Theme
# Command: ./seq2boxes --theme flagship-terrastruct nexus-a2a.d2 nexus-mcp.d2
vars: {
d2-config: {
theme-id: 0
}
}
direction: right
# Messages from nexus-a2a.d2
diagram_nexus_a2a: {
style.fill: transparent
style.stroke: transparent
{{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1. messages/send{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;2. nexus Start /service/operation{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;3. nexus Start /service/operation{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;4. nexus task{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;5. start handler wf{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;6. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;7. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;8. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;9. Task ID (running){{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;10. tasks/get{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;11. nexus Get /service/operation (long poll){{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;12. nexus callback{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;13. long poll released{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;a2a Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;14. Task (completed){{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
}
# Messages from nexus-mcp.d2
diagram_nexus_mcp: {
style.fill: transparent
style.stroke: transparent
{{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1001. tools/call{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1002. nexus Start /service/operation{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1003. nexus Start /service/operation{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1004. nexus task{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1005. start handler wf{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Nexus Gateway{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1006. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1007. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1008. operation token{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1009. nexus Get /service/operation (long poll){{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;Handler Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1010. nexus callback{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
{{TAB_CONTENTS}}quot;Caller Namespace{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1011. long poll released{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#2196f3{{TAB_CONTENTS}}quot;
}
{{TAB_CONTENTS}}quot;MCP Proxy{{TAB_CONTENTS}}quot; -{{TAB_CONTENTS}}gt; {{TAB_CONTENTS}}quot;Agent{{TAB_CONTENTS}}quot;: {{TAB_CONTENTS}}quot;1012. tool result{{TAB_CONTENTS}}quot; {
style.stroke: {{TAB_CONTENTS}}quot;#4caf50{{TAB_CONTENTS}}quot;
style.stroke-width: 2
}
}