Treat AI Agents as Junior Developers
AI coding agents are collaborators, not tools. swyx proposes a mental model: treat your agent as an energetic junior developer who is well-read but often confidently wrong. That junior developer lacks judgment and business context. Armin, creator of Flask, gained 30% of his day back by knowing what to hand off. The skill is directing the work, not accepting every suggestion.
Context Engineering: Keep It Lean
Context is expensive. Every token adds cost, and quality degrades after the context window exceeds 50% full. MCP servers load more tokens and can push the agent into a dumb zone. Bad context, like outdated comments or mixed tasks, poisons output. The solution: persist information outside the context window (scratch pads, agents.md), pull in only relevant files, summarize and trim after deep sessions, and isolate work across parallel agents. Start a new session when things go off the rails.
The Research-Plan-Implement Loop
Most engineers jump straight to code, causing wrong assumptions and wasted time. swyx advocates a three-phase loop. First, research: use a read-only ask mode to understand the system, identify files, and brainstorm edge cases. Output a research document. Second, plan: outline explicit steps, in and out of scope, and test commands. The plan file becomes step-by-step instructions. Third, implement: start a new session with just the plan. Commit frequently and review each change like a pull request.
Modes, Rules, and MCP Discipline
Customize agents with role-based modes: ask for research, architect for planning, code for implementation. Project rules go in agents.md, the always-on context file. Skills.md holds reusable playbooks for frequent tasks. MCP servers add tools but also add tokens. Only enable relevant MCPs. Disable a Postgres MCP when doing front-end work. For internal APIs, use an OpenAPI spec, convert to markdown, or build a custom MCP server for complex workflows.
Conclusion: Get Many Reps
Agentic engineering requires practice. Pick a tool and get lots of reps to learn what the model can and cannot do. Try the research-plan-implement feedback loop. Senior engineers report more fun programming by delegating tedious work to AI and focusing on harder problems. Isolate agent work in commits and review it like a junior engineer’s pull request.
Notable Quotes
We’re now working with them. swyx · ▶ Watch (2:30)
That junior developer is incredibly fast. swyx · ▶ Watch (3:27)
I think the number one thing to think about is context engineering. swyx · ▶ Watch (4:33)
A bad line of research can potentially be hundreds of lines of bad code. swyx · ▶ Watch (13:29)
Key Takeaways
- Treat AI agents as junior developers: provide judgment and context, they provide speed.
- Manage context by trimming, isolating tasks, and starting fresh at 50% capacity.
- Use a research-plan-implement loop to avoid premature coding and wasted effort.