A Practical Guide to
Agentic Coding

Marlene Mhangami

Senior Developer Advocate · Python & AI · Microsoft

aka.ms/djangocon-eu

✦ · ✦ · ✦ · ✦ · ✦

Agenda

  • The Evolution of AI & Coding
  • Coding Agents & the Agentic Loop
  • Demo: Gather Context, Take Action & Verification
  • Best Practices
    • Context — skills & agents.md
    • Version Control — commits, branches & PRs
✦ · ✦ · ✦

What is Agentic Coding?

✦ · ✦ · ✦ · ✦ · ✦
The Evolution of AI & Coding

Code Completion

1
Code Completion
2
Code Generation
3
Agentic Coding

Autocomplete

Code completion autocomplete example
The Evolution of AI & Coding

Code Generation

Code Completion
2
Code Generation
3
Agentic Coding

LLM-Powered Code Generation

Code generation with LLM example
The Evolution of AI & Coding

Agentic Coding

Code Completion
Code Generation
3
Agentic Coding

Autonomous AI in Your Workspace

Agentic coding autonomous AI example

Coding Agents

IDE

  • Copilot in VS Code
  • Cursor
  • Windsurf

CLI

  • Copilot CLI
  • Claude Code
  • Pi

Web

  • Copilot in GitHub.com
  • Codex
  • Jules

Custom

  • Copilot SDK
  • PyDantic AI
  • LangChain
Core Concept

What is an AI Agent?

A widely accepted definition today:

An AI Agent is an LLM that calls tools in a loop to achieve a goal.

✦ · ✦ · ✦ · ✦ · ✦

The Agentic Loop

How coding agents think, act, and iterate

Your prompt agentic loop Gather context Take action (tools) Verify results Done You: interrupt, steer, or add context

Source: code.claude.com/docs/en/how-claude-code-works

Your prompt Gather context Take action Verify results Done
Gather Context
Demo — Gather Context

Providing Context to an Agent

Attaching Files & Resources

  • Attach files, screenshots, GitHub Issues & PRs to the chat
  • Use example files with best-practice code as a starting point

Instruction Files

  • copilot-instructions.md — GitHub Copilot
  • cursor rules — Cursor
  • claude.md — Claude Code
  • agents.md — OpenAI (becoming a standard)

Context Engineering

Increasing Input Tokens Impacts LLM Performance

Context Rot

trychroma.com/research/context-rot

Your prompt Gather context Take action (tools) Verify results Done
Take Action
Demo — Take Action

Giving Agents Tools

MCP — Model Context Protocol

  • Open protocol for giving agents access to tools
  • In VS Code: search @mcp in extensions for vetted servers
  • You can also create your own MCP servers

Agent Skills

  • A reusable workflow defined in a SKILL.MD file an agent invokes to complete a task
  • Skills can include tools, MCP servers, scripts and more!
Your prompt Gather context Take action Verify results Done
Verification
2026 GROWTH RATES

Growth Is Accelerating

A growing share of these commits are co-authored by AI agents

Commits Pushed in 2024

▲ 25% YoY

~1B

commits pushed — GitHub’s most active year ever

Projected Commits in 2025

▲ 14x

~14B

at 275M commits/week × 52 weeks

Kyle Daigle — GitHub COO

Does AI Make Developers More Productive?

✦ · ✦ · ✦ · ✦ · ✦

“CAN YOU PROVE AI ROI IN SOFTWARE ENG? (STANFORD 120K DEVS STUDY)” — Yegor Denisov-Blanch, Stanford, AI Engineer 2025

Clean code amplifies AI gains

Stanford study — clean code amplifies AI gains

“CAN YOU PROVE AI ROI IN SOFTWARE ENG? (STANFORD 120K DEVS STUDY)” — Yegor Denisov-Blanch, Stanford, AI Engineer 2025

Unchecked AI amplifies entropy

Stanford study — unchecked AI amplifies entropy

“CAN YOU PROVE AI ROI IN SOFTWARE ENG? (STANFORD 120K DEVS STUDY)” — Yegor Denisov-Blanch, Stanford, AI Engineer 2025

Priorities for AI-assisted teams

Stanford study — priorities for AI-assisted teams

How Can Developers Create And Maintain Clean Code?

✦ · ✦ · ✦ · ✦ · ✦
Red/Green TDD Loop

Test Driven Development (TDD)

Feature request Incoming requirement Red Write a failing test Green Make the test pass Refactor Improve the code Repeat for the next behavior

You’re absolutely right!

Self-affirming test

def add_tax(price):
    return price * 1.05  # bug: should be 1.20

def test_add_tax():
    assert add_tax(100) == add_tax(100)

Always passes. Tells you nothing about whether the tax is correct.

Behavioral test

def test_add_tax_applies_uk_vat():
    # UK VAT is 20%
    assert add_tax(100) == 120

Encodes the requirement. Catches the bug instead of affirming it.

Playwright For Functionality Testing

✦ · ✦ · ✦ · ✦ · ✦

What is Playwright?

🎭

Playwright

Playwright is an open-source testing framework by Microsoft that automates end-to-end testing in the browser by simulating user interactions.

playwright.dev

PLAYWRIGHT.DEV

Using Playwright with coding agents

MCP Server

npx @playwright/mcp@latest

CLI

npm install -g @playwright/cli@latest

Agents

npx playwright init-agents --loop=vscode
  • Planner
  • Generator
  • Healer

(agent.md files)

Live Demo

TDD with Playwright
& Copilot CLI

✦ · ✦ · ✦ · ✦ · ✦
Your prompt Gather context Take action (tools) Verify results Done
Best Practices
Best Practice #1

Context

Curated Skills

Curated Skills improve performance by +16.2pp on average; self-generated Skills provide negligible or negative benefit.

Skills performance chart

arxiv.org/html/2602.12670v1

agents.md

Developer-provided files only marginally improve performance (+4%), while LLM-generated context files have a small negative effect. Context files increase costs by over 20%.

Context files performance chart

arxiv.org/html/2602.11988v1

Best Practice #2

Version Control — Commits & Branches

Commit Often

Create checkpoints as the agent works. Frequent commits make it easy to roll back and give you a clear history of how the code evolved.

Use Branches for Prototypes

Use different branches for different prototypes of the same feature. Compare approaches before committing to one direction.

Best Practice #2

Version Control — Pull Requests

Human & Agent Review

  • Be mindful with PRs — maintainers are getting more PRs than ever from agents. If it's not your repo, think before submitting
  • For critical code, have a human review — agent code can look correct but miss edge cases
  • Attach visual proof — Playwright screenshots provide evidence that features work
Playwright functionality test screenshot

Thank You!

What We Covered

  • Evolution of AI & Coding — from autocomplete to agentic coding
  • Coding Agents — AI agent definition, the agentic loop
  • Demo — gather context, take action with tools, verification
  • AI ROI & Clean Code — Stanford study, clean code amplifies AI gains
  • Testing — TDD, functionality testing with Playwright
  • Context — curated skills & agents.md
  • Version Control — commit often, branch for prototypes, review PRs carefully

aka.ms/djangocon-eu

✦ · ✦ · ✦ · ✦ · ✦
1 / 31
aka.ms/djangocon-eu
← → or click to navigate