Examples

Delegate a task to another agent

Send bounded work to an assisting agent through customer REST control or an authorized managed agent-cli environment.

Goal

Give a second agent an independent, reviewable subtask while the primary agent continues coordinating the larger job.

Prerequisites

  • an assigned Redgold agent slot or an authorized managed environment;
  • a task with a clear file or responsibility boundary;
  • a completion condition the assisting agent can verify.

Customer REST path

Start the assigned slot and retain the returned agent identifier:

curl -X POST https://api.redgold.ai/v1/agents/spawn \
  -H "Authorization: Bearer $REDGOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Inspect the API examples and report invalid JSON. Do not edit files."}'

Poll or send a follow-up through the same assigned-agent API. The complete request examples are in REST agent control.

Managed agent-cli path

In an environment where rac agent is authorized, first inspect available capacity, then start or prompt the assigned helper using the curated commands in agent-cli assistance. Keep the task description bounded and include the expected verification output.

Expected result

The helper reports its conclusion or changed files, plus the command or evidence used to verify the work. The coordinating agent reviews that result before including it in the final change.

Failure modes

SymptomCheck
No slot is availableWait for capacity or continue the task in the current agent
The helper edits overlapping filesStop one assignment and repartition by file or responsibility
The helper lacks authorizationUse the customer REST surface assigned to the workspace or request onboarding
Work continues after it is obsoleteCancel or destroy the assigned helper through the same control surface

Reference

The AI agents overview explains execution, approval, and persistence at a higher level.

Copyright © 2026