You are probably using AI every day right now. You open ChatGPT, Claude, or Gemini in your browser, type a prompt, get an answer, and copy-paste it somewhere. That works for casual questions. But when you want to automate a repeatable workflow — like generating a CV for every job application — the browser becomes a bottleneck.

This is Part 1 of a 2-part series on building an AI agent with OpenCode. In Part 1, we will cover the fundamentals: what an AI coding agent is, why you need one instead of a browser, why OpenCode beats the alternatives, and how to write your first command. By the end, you will have a working AI agent that reads a file and returns a structured summary.

In Part 2, we will take everything you learned and build something real: a CV & Cover Letter Agent that reads your experience, analyzes a job description, rewrites your CV bullets with quantified impact, and generates a polished cover letter — all as a reusable command you can run again and again.

The ultimate goal of this series: help you move from copy-pasting prompts in a browser to building reusable AI agents that automate real workflows.

Situation

Let's be honest: most of us started with a browser.

image.png

You open ChatGPT, Claude, or Gemini. You type a prompt. You get an answer. You copy-paste it somewhere. You do this every day for writing emails, summarizing documents, brainstorming ideas, or debugging a small piece of code.

That works. But it has a hidden cost.

Every time you want to do something repeatable — tailoring a CV for a new job, rewriting a cover letter, summarizing a batch of files, or debugging a recurring error — you have to start from scratch. You re-type the same context, re-paste the same data, and re-explain the same instructions.

Here is what that looks like:

What you want to do In a browser (ChatGPT/Claude/Gemini)
Explain a function Paste the code, wait for an answer
Refactor a module Copy-paste, get suggestions, paste back
Run tests after changes Manually open a terminal, type the command
Generate a CV for Job A, then Job B Re-type everything each time
Debug an error Paste the error message, hope for a fix
Automate a workflow Not possible

The problem is not the AI. The problem is the interface. You are using AI as a consultant — someone you ask questions of. But for real work, you want an agent — someone who does work on your behalf, in your project, with your tools.

That is where OpenCode comes in.

AI Coding Agent

What is an AI Coding Agent?

An AI coding agent is not just a chatbot. It is an AI system that can take actions in your development environment.

A chatbot answers questions. An agent does work.

Here is what an AI coding agent can do: