Key Moments
Full Course: AI Coding Workflows From Cloud to Local
Key Moments
AI coding workflows are moving beyond cloud-based agents to hybrid and local setups, offering more control over models, costs, and privacy, but requiring significant hardware for local execution.
Key Insights
By splitting tasks among sub-agents, developers can assign faster, less expensive models to secondary tasks while keeping a more powerful model for the primary role.
Running AI models locally can keep code and prompts private, which is a requirement for some organizations.
Using smaller, cheaper models for execution requires careful prompt engineering and specification to avoid costly errors and inefficiencies, as seen with DeepSeek Flash and Gemma 4.
Open Code, when paired with Open Router, provides a single API connection to a catalog of models, allowing developers to choose specific models like DeepSeek-V4-Pro for their needs.
Local AI development is becoming more accessible with tools like LM Studio, enabling the use of powerful models like Qwen 3.5 (27B parameters) on consumer hardware with 32GB of RAM.
Shifting control from monolithic cloud agents to customizable AI coding setups
The landscape of AI-powered coding is evolving from proprietary, all-in-one solutions like Claude Code to more open and controllable workflows. This shift allows developers to regain agency over critical aspects of their AI coding environment: the agent used, the models powering it, and crucially, where those models are run. This granular control directly impacts effectiveness, cost, code privacy, and tool behavior. The course outlines a progressive journey, starting with cloud-based workflows and gradually introducing more sophisticated configurations, including hybrid and fully local setups. By dissecting these architectures, developers can make informed trade-offs based on their specific project priorities, whether it's cost savings, enhanced privacy, or faster execution.
Building the 'Agent Clinic' application as a consistent benchmark
To effectively compare different AI coding workflows, the course utilizes a single, consistent application: 'Agent Clinic.' This application serves as a benchmark, allowing developers to see how each AI coding setup handles the same task and what advantages or compromises are made. The 'Agent Clinic' application is a simple web app where AI agents can complain about humans. It features a homepage and a complaints page, where users can view existing complaints and add new ones via a form. This consistent project ensures that the focus remains on the AI coding workflow itself, rather than variations in application complexity. The course guides users through setting up this project and gradually rebuilding it with different AI coding configurations.
Leveraging sub-agents to optimize model usage and cost
A key strategy for enhancing AI coding workflows is the strategic deployment of sub-agents. Instead of relying on a single, large model to handle all aspects of a task, work can be divided among specialized sub-agents. This approach allows developers to assign less expensive and faster models to perform specific, smaller tasks, while reserving more powerful, capable models for critical or complex operations. This not only optimizes resource allocation but also significantly impacts cost-efficiency. For instance, a primary agent might use a sophisticated model for planning and oversight, while sub-agents handle detailed coding or data retrieval with simpler, cheaper models. This granular control over model assignment is crucial for managing budgets and maximizing performance.
Exploring hybrid and local execution for enhanced privacy and control
The course progressively guides users towards more localized AI execution, starting with hybrid setups and culminating in fully local configurations. Hybrid approaches might involve a primary model running in the cloud while smaller sub-agents execute locally. Fully local setups aim to run all models directly on the developer's own hardware. This shift is driven by the desire for greater control over code and data privacy, as local execution keeps sensitive information within the user's environment. However, running models locally demands significant hardware resources, often requiring powerful GPUs and substantial RAM, a trade-off that must be carefully considered against the benefits of privacy and potential cost savings.
Choosing the right agent, provider, and model for the task
As developers move away from monolithic cloud agents, they gain the ability to select their programming agent (e.g., Claude Code, Open Code), their inference provider (e.g., Anthropic, Open Router, local servers via LM Studio), and the specific models they utilize. Tools like Open Router simplify connecting to a catalog of models through a single API key, abstracting away the complexities of managing multiple providers. This flexibility allows for tailoring the AI stack to specific needs, such as using a powerful model like DeepSeek-V4-Pro for complex planning and a cheaper, faster model like DeepSeek Flash for execution tasks, or even running a local model like Gemma 4 for sensitive operations.
The critical role of prompt engineering and specifications for smaller models
When working with smaller, less capable models, particularly in local setups, the quality of the prompt and the specificity of the project's requirements become paramount. Smaller models have limitations in context window size and reasoning capabilities, making them prone to errors or inefficiencies if not guided meticulously. The course emphasizes creating well-defined specifications, breaking down tasks into smaller, manageable steps, and crafting precise instructions for both the main agent and sub-agents. This detailed guidance, often embedded in agent definitions or detailed prompts, ensures that smaller models can perform their designated tasks effectively without succumbing to 'context degradation' or generating suboptimal code, thereby maximizing their cost and performance benefits.
Transitioning to local execution with LM Studio and custom agents
The course introduces local AI development by using LM Studio, a user-friendly tool for downloading, managing, and serving AI models locally. Developers learn to select models suitable for their hardware, such as Gemma 4 (12B parameters) or Qwen 3.5 (27B parameters), and configure them to run as local inference servers. Open Code is then configured to connect to these local models, enabling hybrid workflows where a cloud-based agent might interact with a locally running sub-agent. This step-by-step process demystifies local AI deployment, showing how to integrate personal hardware into the AI coding pipeline and manage the trade-offs between local resource constraints and model performance.
Full local execution: running both orchestrator and executor models on your machine
The final frontier explored is running both the main orchestrator ('big brain') and the executor ('small brain') models locally. This requires more powerful hardware, ideally with 32GB of RAM or more, to accommodate larger models like Qwen 3.5 (27B parameters) for the orchestrator. The process involves configuring Open Code to utilize these local models, often involving detailed prompt engineering and agent definitions to ensure effective collaboration between the locally running orchestrator and executor. This fully local setup offers the ultimate control over privacy and costs, though it presents the most significant hardware demands and potential for performance bottlenecks, requiring careful optimization of task delegation and model selection.
Mentioned in This Episode
●Software & Apps
●Companies
●Concepts
●People Referenced
AI Coding Workflow Best Practices
Practical takeaways from this episode
Do This
Avoid This
AI Workflow Comparison Metrics (Agent Clinic App)
Data extracted from this episode
| Metric | Claude Code (Baseline) | Claude Code + Sub-Agents | Claude Code + Sub-Agents (Haiku) | Open Code + DeepSeek Pro | Open Code + Sub-Agents | Open Code + Custom Implementer (Flash) | Local Gemma 4 (Sub-Agent) + Local Qwen 3.5 (Main) | Local Gemma 4 (Sub-Agent) + Cloud DeepSeek Flash (Main) |
|---|---|---|---|---|---|---|---|---|
| Total Turns | 1 | 6 | 6 | 19 | 6 | 3 (per stage) | 3 (per stage) | 3 (per stage) |
| Main Agent Context (tokens) | 192k | 192k | 192k | 474k | 90k | 178k | 158k | 178k |
| Sub-Agent Context (tokens) | N/A | 257k | 257k | N/A | 1.39M | 110k (avg) | 39k (avg) | 117k |
| Total Context (tokens) | 192k | 449k | 449k | 474k | 1.48M | 288k | 207k | 295k |
| Tool Calls | 28 | 33 | 33 | 28 | 85% | N/A | N/A | 57 |
| Execution Time (Approx.) | N/A | N/A | N/A | N/A | N/A | N/A | 8m 52s | N/A |
| Cost (Approx.) | $0.02 | $0.03 | $0.03 | $0.02 | $0.08 | $0.02 | $0.02 | $0.05 |
Common Questions
The main goal is to empower developers to take control of their AI coding assistant's setup, moving beyond default tools to flexible, cost-effective, and privacy-conscious workflows, including running models locally.
Topics
Mentioned in this video
An open-source, Mixture-of-Experts model focused on programming, used as a local model for sub-agent execution.
An open-ended AI programming agent that allows for more flexibility in choosing models and execution locations.
A 27 billion parameter model from the Qwen family, used as a local 'big brain' model for advanced tasks.
An AI coding assistant mentioned as a tool that abstracts away agent and model workflows.
An AI coding assistant that handles agent and model workflows, initially presented as a default option.
A user-friendly application for downloading, running, and managing local AI models.
The provider of models used with Claude Code, operating in the cloud.
A model available through Open Router, positioned as a faster and cheaper option, often used for sub-agent tasks.
The company partnering to create this course on AI coding workflows.
A popular platform for AI-related resources, where models like Gemma 4 are hosted.
More from DeepLearningAI
View all 106 summaries
62 minFull Course: Spec-Driven Development with Coding Agents
26 minBuild Your Own App In Just 30 Minutes! Full Course with Andrew Ng
26 minAI Dev 26 x SF | João Moura: Building Recurring, Governed, and Embedded Enterprise Workflows
26 minAI Dev 26 x SF | Brandon Waselnuk: Building the Context Engine AI Agents Need
Ask anything from this episode.
Save it, chat with it, and connect it to Claude or ChatGPT. Get cited answers from the actual content — and build your own knowledge base of every podcast and video you care about.
Get Started Free