The agents can interact with Comfy via API pretty well, which afaik ends up being directly with JSON.