Multi-Agent Spawning System

📘 General javascript v1

The Multi-Agent system allows Mother AI to spawn specialized sub-agents to handle specific tasks asynchronously, such as deeply analyzing a browser page or monitoring a log file.

Introduction to Multi-Agent Architecture

Complex tasks often require continuous attention or deep focus on a narrow aspect of a problem. If Mother AI tries to do everything sequentially, it can lose track of the main goal or waste context window on minor details.

Flowork solves this through a Multi-Agent Spawning System.

How Mother AI Uses Agents

When faced with a tedious or specialized task, Mother AI acts as an orchestrator.

For example, if the user asks, "Test the entire login flow on this staging site."

1. Mother AI spawns a browser_agent using the spawn_agent tool, giving it specific instructions: "Navigate to URL, input test credentials, submit, and report success or failure." 2. Mother AI continues planning or communicating with the user. 3. The browser_agent uses its own dedicated toolset (tailored for browser interaction) to complete the task. 4. Once finished, it returns a concise summary of its actions and the outcome to Mother AI.

Agent Types

  • Browser Agent: Specialized in visual interaction. It can view screenshots, click elements, and inject text, abstracting the complex raw DOM manipulation from the main AI.
  • Monitor Agent: Specialized in observing streams of data, such as a running server log, and alerting the main AI only when a specific condition (like an error or a "server started" message) occurs.