Skip to main content

Lesson 1: Agentic Product Fit and System Boundaries

Learning Outcome

By the end of this lesson, you will be able to:

  • Distinguish between workflows, single agents, and multi-agent systems
  • Identify signals that justify each architecture choice
  • Define system boundaries and user goals clearly

Prerequisites


Concept: The Architecture Spectrum

GenAI systems exist on a spectrum from fully deterministic to fully autonomous:

When to Use Each

ArchitectureBest ForSigns You Need It
WorkflowSequential tasks, known stepsSteps are predictable
Single AgentDynamic paths, tool useSteps depend on input
Multi-AgentMultiple expertise areasDifferent skills needed
AutonomousResearch, explorationHuman oversight possible

Concept: Workflow vs. Agent Decision

Key Questions

Before reaching for an agent, ask:

Decision Matrix

Task CharacteristicWorkflowSingle AgentMulti-Agent
Steps known in advance⚠️⚠️
Dynamic tool selection
Branching logic⚠️
Different expertise needed
Parallel processing
Human review needed

Concept: Signals That Justify Multi-Agent

When Single Agent Isn't Enough

Real-World Triggers

TriggerExampleSolution
Tool conflictSame tool used differentlySeparate agents with own tools
Context bloatToo many tools for one promptSpecialists with focused tools
Latency requirementsSlow because of all toolsParallel specialists
Domain separationLegal docs vs. codeDomain-specific agents

Concept: Defining System Boundaries

What the System Decides vs. What the User Decides

Defining Approval Boundaries

Action TypeApproval Required?Why
Read dataNoLow risk
Generate textNoCan be reviewed
Send email✅ YesIrreversible
Delete data✅ YesIrreversible
Spend money✅ YesFinancial risk

Example: Architecture Decision for a Customer Support System

Scenario

Build a customer support system that:

  • Answers questions about orders
  • Processes refunds
  • Escalates complex issues
  • Sends email confirmations

Decision Process

Architecture: Manager + Specialists

from agentflow.core.graph import StateGraph, END
from agentflow.prebuilt.agent import RouterAgent

# Manager routes to specialists
manager = RouterAgent(
routes={
"order_status": "order_agent",
"refund": "refund_agent", # Requires approval
"escalation": "escalation_agent",
"general": "general_agent"
}
)

# Specialist agents
order_agent = ReactAgent(tools=[check_order_status, track_shipment])
refund_agent = ReactAgent(
tools=[process_refund],
require_approval=True # Human approval required
)
escalation_agent = ReactAgent(tools=[create_ticket, send_alert])
general_agent = ReactAgent(tools=[search_kb, general_help])

Exercise: Architecture Brief

Your Task

For this product idea, write a one-page architecture brief:

Product: Automated code review assistant that:

  • Reviews pull requests
  • Suggests improvements
  • Flags security issues
  • Can request changes to code

Brief Template

## Architecture Brief: [Product Name]

### Problem Fit
- Workflow / Single Agent / Multi-Agent: [Choose one]
- Justification: [Why this choice over others]

### System Boundaries
- System decides: [What the system controls]
- User decides: [What users must approve]

### Agent Design
- Number of agents: [How many and why]
- Specialization: [What each agent does]

### Approval Points
- [ ] Action A: [Approval required?]
- [ ] Action B: [Approval required?]

### Why This Is NOT Just a Workflow
[1-2 sentences explaining why agent architecture is necessary]

Discussion Questions

  1. Would a simple workflow work for code review?
  2. Do you need different agents for security vs. style?
  3. When should the system request human approval?

What You Learned

  1. Architecture is a spectrum — From deterministic workflows to autonomous agents
  2. Match architecture to requirements — Don't over-engineer
  3. Multi-agent has costs — Only use when single agent is insufficient
  4. Define boundaries clearly — What the system does vs. what users approve

Common Failure Mode

Jumping to multi-agent too early

# ❌ Over-engineered
manager = ManagerAgent(agents=[
CoderAgent(), BugFixerAgent(), TesterAgent(),
DocumenterAgent(), DeployerAgent(), MonitorAgent()
])

# ✅ Appropriate complexity
review_agent = ReactAgent(
tools=[check_syntax, check_style, check_security]
)

Start simple. Add agents only when you have clear justification.


Next Step

Continue to Lesson 2: Single-agent runtime and bounded autonomy to learn how to design safe, bounded agent behavior.

Or Explore