Back to Blog
May 24, 2026 CoWorker Series (2/3)

CoWorker Part 2: Scaling Agents with ADK and the ToolsRegistry

GoLang ADK ToolsRegistry

As discussed in Part 1, the initial single-agent ReAct loop for CoWorker proved that an AI could autonomously manage and code within V-Collab workspaces. However, it quickly hit the ceiling of context bloat and execution speed.

To scale, we needed to move away from a monolithic ReAct loop to a structured, highly typed framework. Enter the ADK (Agent Development Kit) and our custom Go-based ToolsRegistry.

Structuring the ToolsRegistry

In our first iteration, tools were somewhat loosely coupled via MCP. As we moved to ADK, we formalized everything into the ToolsRegistry.

In our Go backend, every tool is a native Go function cleanly mapped to a strict JSON Schema. This makes the tools highly deterministic for the LLM to call. We split these tools into two distinct categories to prevent context overlap:

1. Platform Tools

These tools interact directly with the V-Collab APIs (the control plane). They do not execute code. They manage state.

  • List_projects
  • List_templates
  • Create_workspace
  • Get_workspace_status

2. Workspace Tools

These are the descendant of our original MCP setup. These tools execute directly inside the running V-Collab workspace containers via the internal agent.

  • Read_file / Write_file
  • Run_command
  • Check_app_health
ADK and ToolsRegistry Flow Architecture

The Compatibility Challenge: Acting as an OpenAI Proxy

One of the hardest architectural decisions during this migration was maintaining seamless compatibility with our existing frontends and API consumers.

We didn't want the V-Collab frontend to have to learn a completely new "CoWorker Protocol." We wanted it to feel like it was still just talking to a standard OpenAI completion endpoint, but with magical workspace-aware side effects.

To achieve this, the CoWorker Go microservice acts as an incredibly smart proxy. When the frontend sends a standard /v1/chat/completions payload to CoWorker:

  1. CoWorker intercepts the request.
  2. Instead of just forwarding it to Azure OpenAI, it spins up the ADK lifecycle.
  3. It orchestrates the necessary tool calls (fetching workspace status, reading files) completely asynchronously from the frontend.
  4. Once the final goal is met, it formats the result back into a standard OpenAI response format and streams it back to the client.

This decoupling meant we could completely overhaul the brain of the agent without changing a single line of code on the frontend.

But categorizing the tools was only half the battle. We still needed to figure out how to stop the LLM from getting confused when handling both Platform and Workspace tasks. The answer was letting agents talk to each other.