Software Engineering with Agentic AI

Build software without drowning in prompts!

Sonny Bhatia

Sunday, July 26, 2026

The Problem

  • Syntax is now a commodity
    • AI can write and analyze and explain programs
    • Software Architecture requires deliberate thought
  • The “Black Box” Trap
    • Unstructured prompting (“vibe coding”) bypasses systems thinking and domain expertise
    • Students lack architectural understanding
  • Brittle Outcomes
    • Trial-and-error prompting does not scale to complex, reliable software

How do we transition from unstructured prompting to disciplined, agentic systems engineering?

Defining Success

Measure of Performance

Measure of Effectiveness

  • Resources spent
    • GPU
    • Electricity
    • Time
  • Model availability - frontier vs open weights
  • Scrum team velocity per dollar spent?
  • Token cost per line of code?
  • Understanding of your work…?
  • Model maxxing: Efficient Model Routing

The Big Idea: Agentic AI

Architect

Analyst

Architect

Planner

Planner

Tech Lead

Tech Lead

Tech Lead

Proposal

Design

Specifications

Tasks

Developer

Tester

Reviewer

  • Agent = specific role with a focused set of instructions
  • Artifacts = agent output at each step
  • Humans validate intermediate artifacts
  • Example above was inspired by OpenSpec

Core Concepts

Harness

  • Framework that manages the control flow and context for agents
  • Exposes tools to language models
  • Makes your AI agents agentic!

Tools

  • Functions for agents to call (~API)
  • Typically provided by the harness
  • Allow agents to interact with systems
  • MCP servers provide tools for all harnesses

AGENTS.md

  • README.md for agents
  • Per-directory context; grab the closest
  • Given to every agent, always!
  • Keep it really short and focused

Skills

  • Reusable instructions for AI agents
  • Agents can load skills as needed
  • Typically add 5k-20k tokens of context
  • Adds new capabilities; bloats context window

Guiding Principles

  1. Markdown everywhere.
  2. Own your prompts.
  3. Context window: keep it compact.
  4. Control flow: manage agent interactions and artifacts.
  5. Agents: small, simple, and focused. Each agent does one thing well.

Inspiration: 12 Factor Agents: Principles for building reliable LLM applications

Markdown: The Lingua Franca

## Markdown: The Lingua Franca

- Beautiful, simple, and human-readable.
    - `#` and `##` for headings.
    - `-` for lists.
    - `1.` and `1.` and `1.` for numbered lists.
    - __bold__ and _italic_ for emphasis.
    - single backtick for inline code and three backticks for code blocks
    - `>` for blockquotes.
    - `---` for horizontal rules.
    - [Link](https://example.com) for hyperlinks.
    - ![description](image.png) for images.

- Human-readable + machine-parsable = ✨

- [Markdown Syntax Cheatsheet](https://www.markdownguide.org/cheat-sheet/)

- Text-based Diagrams
    - [Mermaid](https://mermaid.js.org/intro/)
    - [Graphviz](https://graphviz.org/gallery/)
    - [...and many more](https://kroki.io/)

Own Your Prompts

  • Agent prompts define roles, processes, and expectations
  • Focused instructions; no data or product artifacts
  • Modular: Keep prompts scoped to a single, focused objective
  • Chain various agents to orchestrate a complex process
  • Treat prompts as code; use version control

Context Window

  • Context is precious; don’t dump extensive amounts of texts into it.
  • Models (and people) perform better on focused tasks with smaller contexts.
    • Shorter context = faster responses, cheaper calls, and fewer hallucinations.
  • Start new conversations often!
    • Artifacts provide continuity.
  • Skills often bloat context windows. Use them judiciously.
    • Pulled on-demand by agents probablistically; cost a lot of tokens.
  • Use custom agents that will do one thing well.
    • The “Need to Know” Basis: Feed agents only the specific files or functions they need.
    • OpenCode subagents start with fresh context and a small set of instructions.

Control Flow

  • Ideally: deterministic processes manage agent interactions.
  • Realistically: a more powerful model manages the long-running goal-driven task.
    • Tasks sub-agents sequentially or in parallel as needed.
    • Frontier models excel at this.
  • Use intermediate artifacts to pause execution, allow human review, and ensure reliable outcomes.
  • Open-ended prompting enables discussion around artifacts.
    • Start new conversations often!
  • LLM-as-a-judge: Use models to review and approve artifacts
  • Implementation is driven by artifacts, not prompts

Agents: Small, Simple, and Focused

Architect

Analyst

Architect

Planner

Planner

Tech Lead

Tech Lead

Tech Lead

Proposal

Design

Specifications

Tasks

Developer

Tester

Reviewer

  • Analyst: Develop a proposal. Produce specifications.
  • Architect: Write the design / architecture document.
  • Planner: Develop and refine the plan. Identify dependencies and opportunities to parallelize tasks.
  • Tech Lead: Review and execute the plan. Delegate extensively.
    • Developer: Implement the plan.
    • Tester: Test the implementation. Write unit tests.
    • Reviewer: Ensure each task is complete to standard.

Agents task sub-agents as needed.

Where to Start?

Open Source Harnesses

Open Weight Models

Use your local GPU

  • Do this if you have a GPU with 24GB+ VRAM
  • LM Studio - easiest setup
  • Ollama - easy setup, models just work
  • vLLM - complex, high performance

Hosted Models

OpenCode Agentic Development Workshop

  1. Install Docker, Git, WSL
  2. Clone this repo
  3. Inspect the files and artifacts
  4. Run docker compose up to start the harness
  5. Open http://localhost:4096 in your browser
  6. Configure OpenCode
  7. Add project /workspace and start a new session.
  8. Start interacting with the agents!

See detailed instructions and code at github.com/aadityabhatia/opencode-docker