Technical docs

Multi-agent operations

Overview

Use this reference when an Alloy AI teammate should delegate focused work to a temporary subagent or when work should move between configured AI teammates.

Choose the delegation type

Use `agent.run_subagent` for a temporary worker that completes a focused, self-contained task and returns its result to the calling teammate.

Use `agent.call_teammate` or a workflow `run_employee` step when the work should be handled by another configured AI teammate with its own identity, instructions, permissions, and default workflow.

Run a temporary subagent

Give the subagent a clear role in `prompt` and a complete task in `query`. Include the expected output and every piece of context needed to complete the task.

Unless your instructions, a skill, or the user's message explicitly requires a particular model, omit the `model` field. Do not pass an empty string. When the field is omitted, Alloy resolves the model from the calling AI teammate and the configured organization or system defaults.

Select only the ordinary tools the task needs. Storage, sandbox, skills, and assigned connector capabilities are resolved separately from the calling AI teammate's configuration.

Pass conversation context explicitly

A temporary subagent runs without the calling conversation. It does not automatically receive the chat history, links mentioned earlier in the conversation, or conversation attachments.

  • Put required URLs, quoted text, identifiers, and other relevant details directly in `query`.
  • Save required chat attachments to Alloy Storage before delegation - subagent can't access those directly even with the provided URL.
  • Give the subagent the exact Storage path for every required file.

The subagent runs as the calling AI teammate and can access only the Storage folders available to that teammate.

Discover teammates

Use the teammate-list capability to find active AI teammates and their UUIDs. Workflow delegation requires the target teammate UUID.

Delegate inside a workflow

The `run_employee` step, shown as `Assign AI` in the builder, delegates a unit of work to an AI teammate. The workflow pauses until the teammate finishes, then resumes with the teammate's output. See `workflows.md` for step configuration and data-flow rules.

Continue from the result

After a subagent, `run_employee` step, or workflow-tool call finishes, inspect the returned output and read any relevant Alloy Storage artifacts before continuing. Treat the delegated result as input to the calling teammate's work, not as an automatic replacement for its final response to the user.

Start building your AI team