Skip to main content
Software Engineering

Workshop 04 - Afternoon Session: Agent Orchestration & Safety

10 Modules
Chapter 2: Introduction to Agent Orchestration & Safety20%

Introduction to Agent Orchestration & Safety

From Single Agents to Agent Systems

This morning you built individual agents that reason, use tools, and solve problems. This afternoon, we scale up: how do you coordinate multiple agents, keep them safe, and manage costs in production?

The Orchestration Challenge

A single agent with a few tools works well for focused tasks. But real-world problems often require:

  • Specialisation: Different subtasks need different expertise (research, code review, testing)
  • Parallelism: Independent subtasks should run concurrently, not sequentially
  • Scale: Large codebases, multi-document research, and complex workflows exceed what one agent context can handle
  • Safety: Autonomous agents need guardrails -- cost limits, approval gates, and sandboxing

Comparison of the morning's single agent calling tools directly with the afternoon's orchestrator delegating to research, code and review agents, each with its own MCP server

The 2026 Orchestration Landscape

Agent orchestration has matured from experimental multi-agent frameworks into practical, production-ready patterns:

ApproachToolBest For
Subagent delegationClaude Code subagentsSoftware development, file operations
Pipeline workflowsClaude Code hooks + workflowsCI/CD integration, automated reviews
Graph orchestrationLangGraphComplex state machines with branching
Role-based teamsCrewAIContent creation, research teams
Custom orchestrationAnthropic Agent SDKDomain-specific multi-agent systems

Why Safety Is Non-Negotiable

When agents operate autonomously, things can go wrong:

RiskExampleMitigation
Cost explosionAgent loops indefinitely, burning tokensToken budgets, iteration limits
Destructive actionsAgent deletes files or force-pushes to mainApproval gates, restricted permissions
Data leakageAgent sends sensitive data to external APINetwork restrictions, audit logging
Hallucinated actionsAgent calls non-existent API endpointsTool validation, error handling
Cascade failuresOne agent's error propagates through the systemCircuit breakers, independent error handling

What You'll Learn This Afternoon

1. Orchestration Patterns

  • Subagent delegation (Claude Code's model)
  • Pipeline and fan-out/fan-in patterns
  • Graph-based workflows (LangGraph)
  • Role-based agent teams (CrewAI)

2. Safety & Guardrails

  • Token budgets and cost caps
  • Human-in-the-loop approval gates
  • Sandboxed execution environments
  • Audit logging and observability

3. Cost Management

  • Model selection strategies (Opus vs Sonnet vs Haiku)
  • Prompt caching for repeated contexts
  • Efficient context management
  • Monitoring and alerting

4. Production Deployment

  • Error handling and recovery
  • Monitoring with LangSmith / Helicone
  • Scaling patterns
  • Testing multi-agent systems

Orchestration patterns, safety, cost management and deployment converge into a reliable multi-agent production system

Architecture Overview

A production multi-agent system typically looks like this:

Production system: a user request passes through the orchestrator and safety layer, is dispatched to research, code and review agents, and their results are collected, approved, audited and output

The Afternoon's Flow

TimeTopicActivity
0:00IntroductionThis overview
0:15Core ConceptsOrchestration patterns and safety theory
1:00Hands-OnBuild orchestrated agent systems
1:45ExercisesProgressive challenges
2:15Project WorkProduction multi-agent system
2:45AssessmentKnowledge validation

Navigation