CCDV-F Prep unofficial
← All skills

Agents and Workflows

Architecture and Runtime Selection

Exam objective: Evaluating whether a workflow or an agentic architecture fits a set of business requirements, error tolerance, and audit constraints. This includes choosing the orchestrator and subagent decomposition and selecting the execution environment: a self-hosted harness or a managed, sandboxed agent runtime.

What the exam tests

Whether you can turn business requirements, error tolerance and audit constraints into an architecture: single call, workflow or agent; how to split work between an orchestrator and subagents; and where the agent runs (your own harness or a managed, sandboxed runtime).

Key rules

  • Start simple. Add complexity only when it demonstrably improves outcomes. One call with retrieval and examples is often enough.
  • Workflow = predefined code paths: predictable and consistent. Agent = the model directs its own steps: flexible, but costlier, with compounding errors. Give agents sandbox testing, guardrails and stopping conditions.
  • Patterns: prompt chaining (fixed steps, programmatic gates), routing (distinct categories), parallelization (independent sections, or voting), orchestrator-workers (subtasks unknown until runtime), evaluator-optimizer (clear criteria, useful feedback loop).
  • Multi-agent pays off for valuable, parallel, breadth-first work that exceeds one context window. It uses far more tokens and fits poorly when agents need shared context or depend heavily on each other.
  • Delegation: give each subagent an objective, output format, tool and source guidance, and boundaries. Scale effort to complexity. Large outputs can go to external storage, with only references returned.
  • Reliability: resume from checkpoints instead of restarting, retry deterministically, and trace production runs.
  • Runtime choice:
OptionWho runs the loopWhere tools run
Messages APIyour codeyour code
Agent SDKyour process (spawns a claude subprocess)your host or container
Managed AgentsAnthropicAnthropic cloud sandbox
Managed Agents + self-hosted sandboxesAnthropicyour infrastructure
Self-hosted Managed Agentsyour server and databaseyour sandboxes
  • Self-hosting the SDK: transcripts, memory files and artifacts sit on local disk. Use a SessionStore for transcripts (it does not cover other files), bound runs with maxTurns, and isolate tenants.
  • Controls: SDK hooks block (PreToolUse) or log (PostToolUse) in code. In Managed Agents, always_ask pauses a server-executed tool for approval.
// Tenant isolation in a shared container
query({ prompt, options: {
  cwd: tenantDir,
  settingSources: [],
  maxTurns: 20,
  env: { ...process.env, CLAUDE_CONFIG_DIR: configDir,
         CLAUDE_CODE_DISABLE_AUTO_MEMORY: "1" },
}});

Traps

  • Picking an agent because the task sounds complex, when its steps are fixed.
  • Confusing parallelization (subtasks known in advance) with orchestrator-workers (decided per input).
  • Treating a system prompt rule as an enforcement or audit control.
  • Treating auto as human review: calls judged safe run unseen.
  • Assuming self-hosted sandboxes keep session history in house. Only self-hosted Managed Agents does.
  • Assuming hosted Managed Agents qualifies for ZDR or a HIPAA BAA. It is stateful and does not.
  • Inline Managed Agents subagents use the lead's tools and MCP servers.
  • SessionStore mirroring is best-effort: a failed batch is dropped with a mirror_error message.

Decide quickly

SituationChoiceWhy
Same steps every time, checkpoint requiredPrompt chain with gatesEnforced order
Distinct, classifiable request typesRoutingSpecialized prompts
Files or subtasks unknown in advanceOrchestrator-workersDynamic decomposition
Open-ended path, trusted sandboxAgentModel-driven control
Long async work, minimal infrastructureManaged AgentsLoop and sandbox provided
Only execution must stay inside your networkSelf-hosted sandboxesAnthropic still runs the service
History storage or inference provider must be yoursSelf-hosted Managed AgentsYou host the service
Claude Code capabilities inside your own processAgent SDKYou operate the harness

Sources