
🎙 Podcast Version
2-host dialogue — ALEX & SAM discuss this course.
Mastering the Deployment of Claude Agents and Skills
Overview
This course provides a comprehensive guide to the strategic deployment of AI agents and skills, specifically focusing on the ecosystem surrounding Claude. It explores the critical decision-making process of choosing where an agent runs and how much autonomy it possesses. By understanding the trade-offs between local and cloud execution and deterministic scripts versus autonomous loops, developers can ensure their automations run reliably "while they sleep."
Background & Context
As users move from simply chatting with AI to building "skills" and "agents," a primary technical hurdle emerges: the transition from manual execution to automated deployment. Many developers build powerful tools that only work while their personal computer is open and a session is active, which limits the utility of the AI. This course, based on the frameworks shared by @nateherk, addresses the problem of "persistence"—moving AI logic from a temporary chat window to a permanent, scalable environment.
In the broader landscape of AI engineering, this represents the shift from "Prompt Engineering" to "Agentic Workflow Engineering." The goal is to move away from manual triggers and toward systems that can operate independently in the cloud, solving the problem of dependency on a user's local machine and active session.
Core Concepts
Local vs. Cloud Execution
The first major decision in deployment is the physical or virtual location where the agent's logic is executed. Local execution means the agent runs on your own machine; this is often easier for development but creates a critical point of failure: if your computer is turned off or loses internet connection, the agent stops working.
Cloud execution moves the agent to a remote server. This can be a managed environment provided by the AI provider (such as Anthropic's cloud) or a third-party cloud environment. Examples of these environments include Modal, Trigger.dev, or a traditional Virtual Private Server (VPS). The primary advantage of cloud execution is that it allows the agent to run autonomously 24/7 without requiring the developer's hardware to remain active.
Determinism vs. Autonomous Agentic Loops
This concept refers to the "predictability" of the agent's behavior. A deterministic deployment is essentially a script; it follows a set path and runs the same way every time. These are highly reliable and ideal for tasks where the process is fixed and the output must be consistent.
In contrast, an autonomous agentic loop involves "magic agent" decision-making. In this model, the agent evaluates a goal, decides which tool to use, observes the result, and iterates until the task is complete. While more powerful and flexible, these loops are less deterministic, meaning the path the agent takes to reach the goal may vary each time.
The WAT Framework
The WAT framework is a structural lens used to analyze what is actually being deployed. It breaks down the agent's architecture into three distinct components:
- W (Workflow): The overarching sequence of steps or the logic flow that guides the process.
- A (Agent): The "brain" or the LLM configuration that makes decisions and manages the loop.
- T (Tools): The specific skills, APIs, or functions the agent can call to interact with the outside world.
When deploying, a developer must decide which of these three elements are being hosted where. For example, you might host the tools on a VPS but run the agentic loop via a cloud-based orchestrator.
How It Works / Step-by-Step
The process of deploying an agent involves mapping your specific automation onto a "deployment slider" to determine the best infrastructure.
Step 1: Determine the Execution Environment
First, evaluate if the automation requires your machine to be on.
- Local: Use this for testing, prototyping, or tasks that require access to local files and private networks.
- Cloud: Use this for production-ready agents. Choose between a managed service (like Anthropic's cloud) for simplicity, or a VPS/Modal/Trigger.dev for more control over the environment and dependencies.
Step 2: Define the Level of Autonomy
Decide if the task requires a "script" or an "agent."
- Script (Deterministic): If the task is "Every Monday at 9 AM, scrape this site and send a summary," use a deterministic script.
- Agent (Autonomous): If the task is "Research this topic and find the best three leads, then draft personalized emails based on their latest LinkedIn posts," use an autonomous loop.
Step 3: Apply the WAT Framework
Analyze the components of your agent to ensure every part is accounted for in the deployment:
- Map the Workflow: Define the trigger (e.g., a webhook, a timer, or a user request).
- Configure the Agent: Set the system prompts and the LLM model that will handle the decision-making.
- Deploy the Tools: Ensure the APIs and skills the agent needs are accessible from the cloud environment (e.g., ensuring your VPS has the correct API keys and network permissions).
Real-World Examples & Use Cases
Scenario 1: The Deterministic Cloud Script
Use Case: A daily news aggregator that pulls headlines from five specific RSS feeds and posts them to a Slack channel.
- Deployment: Cloud (VPS or Trigger.dev).
- Nature: Deterministic (runs the same way every time).
- WAT Focus: The Workflow (the schedule) and the Tools (RSS reader and Slack API) are the primary components. The "Agent" part is minimal, acting only as a summarizer.
Scenario 2: The Autonomous Research Agent
Use Case: A competitive intelligence agent that monitors a competitor's website for changes and decides whether to alert the team or perform a deeper dive into the change.
- Deployment: Cloud (Modal or Anthropic's cloud).
- Nature: Autonomous Agentic Loop (the agent decides if a change is "important" enough to trigger a deeper dive).
- WAT Focus: The Agent is the core here, as it must make autonomous decisions about when to use the "Research Tool" versus the "Notification Tool."
Scenario 3: Local Development Tool
Use Case: A tool that organizes your local folder of PDFs by reading the content and renaming the files.
- Deployment: Local Machine.
- Nature: Deterministic.
- WAT Focus: The Tools (local file system access) dictate that this must run locally, as a cloud agent cannot access your local hard drive without complex tunneling.
Key Insights & Takeaways
- No "One Best Way": The method of deployment depends entirely on the specific type of automation being built.
- Persistence is Key: To make agents run "while you sleep," you must move from local execution to a cloud environment.
- Trade-off between Control and Magic: Deterministic scripts provide reliability and predictability, while autonomous loops provide flexibility and "magic" decision-making.
- Infrastructure Options: Developers have a variety of cloud options ranging from high-level managed clouds (Anthropic) to low-level infrastructure (VPS) and specialized serverless platforms (Modal, Trigger.dev).
- Component Analysis: Using the WAT framework (Workflow, Agent, Tools) prevents deployment failures by ensuring that the logic, the brain, and the capabilities are all hosted in compatible environments.
Common Pitfalls / What to Watch Out For
- The "Local Dependency" Trap: Beginners often build agents that work perfectly in a local session but fail immediately upon deployment because they forgot that the cloud environment doesn't have access to local files or environment variables.
- Over-Engineering Autonomy: Using an autonomous agentic loop for a task that could be a simple script. This increases cost, increases the chance of "hallucinations" or errors, and makes the system harder to debug.
- Session Dependency: Forgetting that some agents require an active session to maintain state. If the session expires, the agent stops. Cloud deployment solves this by managing state externally.
Review Questions
- Explain the difference between a deterministic script and an autonomous agentic loop. In what scenario would you choose one over the other?
- Using the WAT framework, explain how you would break down an agent that monitors an email inbox and automatically drafts responses based on a company knowledge base.
- If an agent needs to run 24/7 without manual intervention, why is a VPS or Modal preferred over a local machine, and what are the implications for the "session" status?
Further Learning
- Serverless Computing: Explore how Modal and Trigger.dev handle "cold starts" and event-driven execution for AI agents.
- State Management: Learn how to use databases (like Redis or PostgreSQL) to maintain agent memory across different sessions in the cloud.
- API Orchestration: Study how to build robust "Tools" (the 'T' in WAT) using frameworks like LangChain or CrewAI to enhance the agent's capabilities.