Multi-Agent Workflow
# Multi-Agent Workflow
Orchestrate multiple specialized AI agents to tackle complex, multi-step workflows.
Single agents are powerful, but complex tasks often require multiple specialists. Coordinate them with governed agent calls, HumanOS routing, or builder workflows — not a fantasy client.humanos.createWorkflow() namespace.
When to Use This
Architecture
┌─────────────────────────────────────────────────────┐
│ Your app / builder workflow / humanCall │
└────────────────────┬────────────────────────────────┘
│
┌───────────┼───────────┐
│ │ │
▼ ▼ ▼
┌────────┐ ┌────────┐ ┌────────┐
│Agent 1 │ │Agent 2 │ │Agent 3 │
│Research│ │ Write │ │ Review │
└───┬────┘ └───┬────┘ └───┬────┘
│ │ │
└───────────┼───────────┘
│
▼
┌──────────────────────┐
│ HITL checkpoint │
│ /v1/approvals … │
└──────────┬───────────┘
│
▼
Final OutputPrerequisites
HUMAN_DELEGATION_TOKEN)Implementation
Sequential specialists via agents.invoke
Governed route (capability-first)
import { HumanClient, humanCall } from '@human/sdk';const client = new HumanClient({
delegationToken: process.env.HUMAN_DELEGATION_TOKEN!,
});
await humanCall(
client,
{
task_id: crypto.randomUUID(),
task_type: 'content_pipeline',
required_capabilities: ['web_research', 'content_planning', 'editorial_review'],
},
{ delegation: process.env.HUMAN_DELEGATION_TOKEN! },
);
Builder workflows (DAG)
Create / activate workflows via /v1/builder/workflows, then execute on Workforce:
POST /v1/workforce/workflows/{workflowId}/execute
Authorization: Bearer
Content-Type: application/json{
"input_data": [{ "topic": "capability-first routing" }]
}
human api POST "/v1/workforce/workflows/$WORKFLOW_ID/execute" \
--body '{"input_data":[{"topic":"capability-first routing"}]}'Do not call client.humanos.createWorkflow / ExecuteWorkflow / WaitForWorkflow — those namespaces are not shipped on @human/sdk.
HITL checkpoint
Between steps, resolve approvals as in Human-in-the-Loop:
await client.raw.POST(/v1/approvals/${approvalId}/respond, {
body: { decision: 'approved', comment: 'Publish' },
});Security Considerations
DO
Scope each agent call with a least-privilege delegation
Insert HITL approvals before irreversible publish/deploy steps
Prefer humanCall when Fourth Law escalation matters
DON'T
Do not invent client.humanos.createWorkflow fantasy APIs
Chain agent calls without provenance / execution IDs
Skip capability checks between high-risk steps
Multi-agent coordination (alias)
/docs/patterns/humanos/multi-agent-coordination resolves here. Coordination means governed agent calls + workflow steps + HITL checkpoints — not a separate coordination product.
Next Steps
See Also
client.agents.invoke → POST /v1/agents/callhumanCall → POST /v1/humanos/routehuman api POST /v1/workforce/workflows/:workflowId/execute