Skip to main content
Orchestration defines how agents divide work during an AI Workforce run. In SketricGen, one main agent owns the conversation and can delegate focused tasks to specialist sub-agents. Use orchestration when one agent should coordinate a result that requires different skills, tools, knowledge, or review steps. Keep a single-agent build when one clear set of instructions and tools can complete the work reliably.

How SketricGen Orchestration Works

  1. The user sends a request to the main agent.
  2. The main agent decides how to approach the work.
  3. The main agent completes work directly or delegates a bounded task to a sub-agent.
  4. The sub-agent returns its result to the main agent.
  5. The main agent combines the available results and responds to the user.
The main agent remains responsible for the conversation and final response. A sub-agent cannot add another sub-agent beneath itself.

Main Agent

The main agent is responsible for:
  • Understanding the user’s request.
  • Planning the work.
  • Calling tools and connectors.
  • Calling sub-agents when specialist help is useful.
  • Returning the final response to the user.
Write main-agent instructions that explain the task boundary, available tools, when to delegate, when to ask questions, and what a successful result looks like.

Sub-Agents

Sub-agents are specialist helpers. The main agent can call them for focused tasks and use their results in the final answer. Good sub-agent jobs include:
  • Classification
  • Extraction
  • Summarization
  • Research
  • Redaction
  • Validation
  • Short reusable subtasks
Give each sub-agent a narrow responsibility, focused instructions, and only the tools and knowledge it needs. Sub-agents cannot have their own sub-agents, so keep the orchestration structure one level below the main agent.

Add and Connect a Sub-Agent

In Agent Build:
  1. Add a Sub-Agent to the canvas.
  2. Give it a clear name that describes its specialty.
  3. Configure its instructions, model, tools, skills, and knowledge.
  4. Connect it to the main agent.
  5. Describe when the main agent should delegate work to it.
  6. Save the build and test a prompt that should trigger the sub-agent.
  7. Open the trace to confirm which agent ran and what it returned.
Avoid creating several overlapping sub-agents. The main agent delegates more reliably when each specialist has a distinct purpose.

AI-Routed and Forced Handoffs

Use the handoff behavior that matches the workflow:
  • AI-routed handoff: The agent decides whether to delegate based on the request, its instructions, and the handoff description. Use this for flexible workflows where different requests need different specialists.
  • Forced handoff: The workflow always continues to the connected agent. Use this for a required sequence, such as research followed by validation or drafting followed by compliance review.
Keep handoff descriptions specific. Explain what the receiving sub-agent handles and what result it must return. For a forced handoff, use one clear sequential connection so the path stays deterministic.

Structured Output Is a Dedicated Tool

Agent Build no longer has an agent-level Output Schema setting. If an agent must emit predictable JSON, add the dedicated Structured Output tool and connect it to the main agent or sub-agent that should call it. Use the Structured Output tool for results such as:
  • Lead qualification summaries
  • Research briefs with fixed fields
  • Extraction from uploaded files
  • QA or validation reports
  • Connector-ready payloads
  • Data rendered by a frontend or consumed by another system
Do not use Structured Output for every normal chat response. Keep the agent conversational when a person expects a readable answer. To configure its fields, call conditions, runtime event handling, and schema rules, see Structured Output for Developers.

Planning in AI Workforce

AI Workforce runs can keep a todo/planning state. This helps longer-running agents break a task into steps and continue work across tools, files, and artifacts. The plan is not a replacement for review. Check final outputs, workspace files, and traces before using results.

Traces

Traces show which tools and sub-agents were used, what failed, how long steps took, and what artifacts were created. Use traces when a run takes the wrong path, misses a handoff, or a sub-agent returns a weak result.

Orchestration Guidelines

  • Start with one main agent and add a sub-agent only when the responsibility is meaningfully different.
  • Give every sub-agent a distinct job and a small tool set.
  • Tell the main agent when it should delegate and what it must do with the result.
  • Use AI-routed handoffs for flexible decisions and forced handoffs for mandatory sequences.
  • Keep user-facing conversation ownership with the main agent.
  • Test direct requests, requests that need delegation, and requests that should not trigger a sub-agent.
  • Review traces before expanding the workflow.