Mission Objective

Understand the importance of designing before building. Know the standard flowchart symbols and how they map to Foundry nodes. Practice designing logic using the Agency Card Game. Map out a complete workflow on paper.

Imagine you're building a house. Would you start laying bricks before drawing the blueprint? Of course not. Yet many people jump into AI tools and start clicking buttons without a plan. The result? Spaghetti workflows. Agents that don't connect. Missing variables. Hours of debugging. The solution? Design the flowchart FIRST, on paper or with cards.

Before any expedition, experienced hikers create a trail map. They mark: the starting point, the checkpoints, the decision points ("If the bridge is flooded, take the alternate route"), and the destination. Your workflow is no different. Today, we design the trail before we hike.

Today we introduce the Agency Card Game—a physical or digital prototyping tool that helps you design workflows before touching any software. Think of it as a board game for AI architects.

Key Takeaways:

  • Understand the importance of designing before building
  • Know the standard flowchart symbols and how they map to Foundry nodes
  • Practice designing logic using the Agency Card Game
  • Map out a complete workflow on paper

The Gear List (Components)

Every flowchart uses standard symbols. Here's how they map to Foundry:

Start / End (Oval)

Maps to Start / End Conversation in Foundry. Every workflow needs exactly one starting point and every path must reach an end.

Action (Rectangle)

Maps to Invoke Agent / Send Message. This is where the work happens—call an AI agent to summarize text, analyze sentiment, or draft a response.

Decision (Diamond)

Maps to If/Then/Else. A decision diamond creates branching paths: "If approval = yes" → proceed. "Else" → loop back.

Data (Parallelogram)

Maps to Set Variable. Save important data so later steps can use it. Capture the user's input, combine outputs, prepare data for the next step.

Loop Arrow

Maps to Go To. An arrow pointing back to an earlier step creates a loop. Essential for iterative refinement—keep editing until the user is satisfied.

The Agency Card Game Cards

TRIGGER cards (blue) = what starts the workflow. AGENT cards (green) = AI workers. TOOL cards (purple) = capabilities. LOGIC cards (orange) = flow control. OUTPUT cards (red) = final deliverables.

The YouTube Workflow—A Case Study

Business Goal: Create a system that 1) Generates YouTube title ideas, 2) Generates description ideas, 3) Edits and improves them, 4) Gets user approval, 5) If approved, sends the final content by email, 6) If not approved, loops back for revision.

The Flowchart: START (User enters topic) → Set Variable (capture user_input) → Invoke Agent (Title Generator, output: title_output) → Invoke Agent (Description Generator, output: desc_output) → Set Variable (combined = title + desc) → Invoke Agent (Editor, output: edited_output) → Ask Question ("Do you approve?", saves to approval_input)

Then the Decision: IF approval = "yes" → YES PATH: Set Variable (email_prompt) → Invoke Agent (Email Agent) → END (Email sent!). NO PATH: Set Variable (updated_input = combined + feedback) → GO TO: Title Generator (LOOP BACK!)

Key Design Decisions: Why capture the input first? So both Title Gen and Desc Gen receive the same user input. Why combine before Editor? The Editor needs to see both to make them consistent. Why a loop? If the user isn't happy, we regenerate with their feedback.

Key Points to Remember:

  • Design before you build—paper is cheaper than debugging
  • Flowcharts map to Foundry nodes: Diamonds = If/Else, Rectangles = Agents
  • Variables are your memory—name them clearly
  • Loops require Go To—always have an exit condition
  • Human-in-the-Loop = Ask Question + If/Else

The Trail Map (Common Flowchart Patterns)

1 SEQUENTIAL: [Agent A] → [Agent B] → [Agent C] → [End]. Use for simple pipelines like "Research → Write → Edit".
2 PARALLEL + MERGE: [Start] → [Agent A] AND [Agent B] → [Combine] → [Agent C]. Use when two things can happen independently, then merge.
3 HUMAN-IN-THE-LOOP: [Agent] → [Ask Question] → [If/Else] → [Agent or End]. Use for approvals and quality checks.
4 RETRY LOOP: [Agent] → [Check Quality] → [If Bad] → [Go To: Agent]. [If Good] → [End]. Use for regeneration until satisfied.

Field Notes: The Agency Card Game: Design Your Workflow

Using the Agency Card Game, design a workflow by arranging cards. Scenario: The Customer Complaint Handler.

  1. MISSION: When a customer emails a complaint, automatically categorize it. If urgent, alert a manager. If not, draft a polite response.
  2. Start with a TRIGGER: Incoming Email
  3. Add an AGENT: The Professor (Sentiment Analyzer) to detect urgency
  4. Add LOGIC: If/Else to branch based on urgency
  5. URGENT PATH: Tool: Teams Message to manager
  6. NON-URGENT PATH: Agent: Response Drafter + Tool: Email Reply
  7. DEBRIEF: Did you capture the email content in a variable? Does the Response Drafter know the company's tone (Knowledge card)? Is there a loop for revision?

Ranger's Warnings (Common Pitfalls)

The Costly Mistake

Jumping into AI tools without a plan leads to spaghetti workflows, agents that don't connect, and missing variables. Design the flowchart FIRST.

The Infinite Loop Trap

A loop without an exit condition will run FOREVER (and cost you money!). Always ask: "What stops this loop?"

The Broken Chain

Every YES and NO path must connect somewhere. Don't leave dead ends—if the user says "no," what happens next? Define it!

Pro Tips

Take a photo or screenshot of your flowchart for reference when building in Foundry.

The Card Game saves hours of debugging later—paper is cheaper than AI tokens!