Skip to content

PM · Claude Code + Agent SDK basics

Terminal-first. Every engineer in the room ships a working agent on their laptop today. This is the hands-on follow-up to the AM session.

What we’ll do

BlockDurationActivity
Setup check15 minVerify Claude Code + GCP Vertex on every laptop
Building block 130 minHello world agent — single-agent setup, tool use, multi-turn
Building block 230 minThe agent loop — how Claude Code actually thinks-acts-thinks
Break15 min
Building block 330 minMulti-agent setup — sub-agent spawning, coordination
Building block 430 minTools that matter — file I/O · web search · running scripts
Building block 545 minThe failure modes story — what breaks when you scale 2 agents to 20 (bridges to Day 2)

Total: ~3.5 hours including setup + breaks. Audience: engineers, in person only.

What we’re NOT doing PM

Installing LIFEOSAI on every laptop. The LIFEOSAI reveal happens Day 2. Day 1 PM is a simpler on-ramp — terminal agents, no GUI install, lower failure surface.

Prerequisites

Before the session starts:

  • Node 22+ installed
  • claude command installed (npm install -g @anthropic-ai/claude-code)
  • GCP Vertex authentication working (see Setup)
  • A working directory: mkdir agent-workshop && cd agent-workshop

If any of these aren’t ready, raise it before lunch.

Building block 1 — your first agent in 5 minutes

The Quickstart is the 5-minute path. Step-by-step:

Terminal window
# Create the agent's home
mkdir -p .claude/agents
# Write its SOUL
cat > .claude/agents/file-reader.md <<'EOF'
---
agent_id: file-reader
model: claude-sonnet-4-6
---
# Identity
I am a file-reader. I read files in the working directory and summarise them.
# Workflow
When invoked:
1. List files in the current directory
2. Read the most recent .md or .txt file
3. Print a 3-line summary
4. Exit
EOF
# Drop a file to read
echo "# Hello World\n\nThis is my first file." > sample.md
# Invoke
claude --agent file-reader

You should see the agent list files, read sample.md, and produce a 3-line summary.

That’s a working agent. The same pattern scales to the 9-agent Guardrail Lab tomorrow.

Building block 2 — the agent loop

What happens when you type claude and Enter:

  1. Claude Code loads the agent’s SOUL (the .md file)
  2. The SOUL becomes the system prompt
  3. Claude (the LLM) thinks → produces a tool call (e.g., “list files”)
  4. Claude Code executes the tool call
  5. The result goes back into the conversation
  6. Claude thinks again → next tool call → next result
  7. Loop continues until Claude decides it’s done

That’s the agent loop. It’s the same loop in every coding agent (Claude Code, Pi Coding Agent, Codex, etc.). Different runtimes implement it differently but the shape is the same.

Building block 3 — multi-agent

Single agents are useful. Two or more agents coordinating is more useful. Claude Code’s sub-agent feature lets one agent spawn another.

Example: an analyst agent that spawns 5 specialist analyzers in parallel, each reading the same input through a different lens, then synthesises. This is the multi-perspective pattern we’ll see in production tomorrow.

Terminal window
# This pattern works today in Claude Code. We'll walk through it live.

Building block 4 — tools that matter

The agent’s hands. Three tools cover 80% of real work:

ToolWhat it doesHow to enable
file I/ORead · write · search files in the working directoryBuilt-in to Claude Code
web searchFetch URLs, search the webBuilt-in via the WebSearch tool
bashRun shell commands, scripts, testsBuilt-in via the Bash tool

For more tools: MCP servers (the Model Context Protocol — see System · Connectors) or Skills (instructions + scripts the agent can call). Both add capabilities without changing the agent itself.

Building block 5 — failure modes (bridge to Day 2)

The 30-minute close. What breaks when you go from 2 agents to 20?

FailureWhat goes wrongWhat you need
Context blows up20 sessions, no shared memoryAn office library
Agents step on each otherTwo writers on the same fileIssue-level locking
No audit trail”Did the agent really email that?”A runs / wakeups log
Cost explodesOpus on every taskPer-agent model picker + budgets
Approval gapsSend-money agent goes rogueAction policies + approval queue

Each of these maps to a piece of LIFEOSAI we’ll walk Day 2. The failure modes are the architecture spec.

Materials

Take it home. Everything we cover this afternoon is in your terminal. The Claude Code installation + your .claude/agents/* files survive after the workshop. Keep building. We’ll be here all week if you get stuck.

  • Day 1 hub — Back to the Day 1 overview.
  • Quickstart — The minimum-viable first agent — reference for after the workshop.

Next: Day 2 — the reveal →