# Full Course: AI Coding Workflows From Cloud to Local

## Executive summary

This course provides a comprehensive journey through AI coding workflows, starting with familiar cloud-based agents and gradually moving toward hybrid and fully local setups. The focus is on regaining control over the AI stack—choosing the coding agent, the inference provider, and the models—to manage cost, privacy, and performance. Key lessons include using subagents for context management, optimizing tasks with specialized models (Big Brain/Little Brain), and connecting local inference servers (LM Studio) to cloud agents (OpenCode).

## Key takeaways

- Context Management via Subagents: Splitting a monolithic task into smaller, focused subagent tasks helps mitigate 'context rot,' especially when using smaller local models, though this increases total turns and context processed.
- The Big Brain / Little Brain Paradigm: A common pattern involves using a powerful, cloud-based model (the 'Big Brain,' e.g., DeepSeek-V4-Pro) for planning and judging, while a smaller, cheaper model (the 'Little Brain,' e.g., Haiku or Gemma 4) handles implementation.
- Achieving Local AI: Local setups require an inference server (like LM Studio) to run models (e.g., Gemma 4, Qwen 3.5 27B) on local hardware, which can then be exposed to coding agents via an OpenAI-compatible API.
- Tradeoffs in AI Workflows: While local models offer cost savings and privacy, they often require more human intervention (review and correction) and more turns to achieve the same result as a frontier model.

## Technical details

- Coding Agents and Providers: The course compares Claude Code (Anthropic models), OpenCode (which supports multiple models), and the use of OpenRouter as a unified API connection to various inference providers.
- Model Selection and Optimization: Models are used for specific roles: high-power models (DeepSeek-V4-Pro) for planning, mid-tier models (Sonnet, DeepSeek-V4-Flash) for orchestration, and small models (Haiku, Gemma 4) for implementation.
- Local Model Deployment: LM Studio is used to host local models (e.g., Gemma 4, Qwen 3.5 27B) and serve them via an API endpoint, which OpenCode can then utilize.
- Process Control (Spec Driven Development): The project uses a 'constitution' (mission, tech stack, roadmap) to guide the AI, allowing the main agent to delegate tasks (handoff packets) to subagents.

## Practical implications

- Developers can shift from 'vibe coding' to 'engineering' by meticulously defining specs and guardrails for small models.
- The choice of agent, provider, and model must be treated as a critical architectural decision, not just a convenience.
- Resource constraints (e.g., 16GB RAM) necessitate the use of smaller, quantized models (e.g., Gemma 4 8-bit) for local execution.
- The process of delegating work (creating 'handoff packets') is essential for the success of small, constrained local models.

## Topics

AI Engineering, Software Architecture, LLM Operations, DevOps, Agent Complaints App, Claude Code, OpenCode, OpenRouter, LM Studio

Source: https://www.youtube.com/watch?v=H2tmNDX9FnQ
