[KongchangAI]
· 3 min read· 1,525 words

AI Agent for Beginners: Building a Commercial-Grade Coding Agent from Scratch

AI Agent for Beginners: Building a Commercial-Grade Coding Agent from Scratch

Explosive AI Agent demand is a real transformation opportunity for ordinary programmers.

The article starts from market signals: giants like Microsoft and Baidu are bullish on AI Agents, while Manus's funding and a 44.8% CAGR confirm the sector's heat, with growing job demand and relatively broad hiring requirements that are friendlier to ordinary programmers than hardware or algorithm roles. It then explains the essence of an AI Agent — a program with perception, decision-making, and action capabilities that autonomously completes tasks through a "think—act—observe" loop, illustrated by automatically creating a Vue3 project and autonomously selecting a Vue2 preset. The tech stack covers cloud and local large models, LangChain/LangGraph, MCP, LangSmith/LangFuse, and Alibaba Cloud Bailian's knowledge base. The course is project-oriented, with code written from scratch, aimed at programmers with Python/Node fundamentals.

Why AI Agents Are Programmers' New Opportunity

AI Agents are becoming one of the most closely watched directions in tech. At Build, Microsoft CEO Satya Nadella introduced the concepts of an agent network and an agent economy, predicting that by 2030, 95% of code will be generated by agents. Meanwhile, general-purpose AI Agent startup Manus closed a $75 million funding round just two months after launch, with its valuation growing nearly fivefold. Baidu founder Robin Li also publicly stated that Agent is the AI application direction he is most optimistic about. According to statistics, the AI Agent market was worth about $5 billion in 2024, with a compound annual growth rate of 44.8%.

For programmers, AI Agents bring not just anxiety, but also a transformation opportunity. Although hardware engineer and algorithm engineer roles have certain barriers to entry, agent application development is friendlier to ordinary programmers. Data from BOSS Zhipin shows that AI Agent-related technical positions are increasing rapidly, and due to the supply-demand gap, hiring requirements are relatively broad. Demand for agent development on ZBJ.com is also growing substantially. As the course instructor says, AI Agent is a genuine way out for ordinary programmers to achieve career breakthroughs — whether for a promotion in your main job, a career switch, or launching a side business, it's worth the investment.

What Is an AI Agent: The Loop of Perception, Decision, and Action

An AI Agent is essentially a program or system, but unlike an ordinary program, it can perceive its environment, reason through decisions, and take action. If we compare an agent to a person, it needs a pair of eyes to observe the real world, feed information back to a large language model — the "brain" — for reasoning and decision-making, and then use "hands" to take action.

If we compare an agent to a person

This process has three parts: thinking, taking action, and observing, then repeating in a loop. In the course, a hands-on project demonstrates this flow: having an AI Agent create a Vue3 project locally. The agent first queries its knowledge base to get terminal operation guidelines and Vue-related commands, then automatically opens the terminal, executes commands, reads the return values, and decides the next step based on the results. The entire process requires no human intervention — the agent "does one thing, looks at the result, then does the next thing," just like a person.

So it won't

Interestingly, when the task changes to creating a Vue2 project, the agent needs to decide to select the Vue2 preset. It reads the terminal content and determines it must move the cursor down before confirming. This fully demonstrates the agent's ability to make decisions on its own.

So this is the agent making its own decision

The Role of Large Language Models in Agents

The article compares large language models to the agent's "brain." Behind this analogy lies a key technical mechanism — Function Calling. A large language model itself can only receive text and output text; it cannot directly open a terminal or click a browser. Function Calling lets the model output a structured "call intent" during reasoning (for example, "execute the command npm create vue@latest"), which an outer program parses and actually executes, then feeds the execution result back to the model as new text. It is precisely this mechanism that turns a "model that can only chat" into "an agent that can take action."

ReAct (Reasoning + Acting) is another key thread, formalizing the "think—act—observe" loop into a prompting paradigm: the model first outputs a piece of reasoning, then outputs an action, the environment returns an observation, and the model continues reasoning based on that. What the article describes as "do one thing, look at the result, then do the next thing" is essentially the engineering implementation of the ReAct loop. Understand these two points, and you'll see why the same model can perform so differently across frameworks.

Core Tech Stack Analysis

The tech stack used in the course covers the mainstream tools of current AI Agent development. The underlying large model supports three deployment methods: calling Alibaba Cloud Bailian large models in the cloud, using well-known overseas models like Claude and the GPT series, or locally deploying completely free models through Ollama.

Above the large model, LangChain and LangGraph are used as AI frameworks, while MCP (Model Context Protocol) is integrated to extend tool capabilities. For observability, LangSmith and LangFuse are used. On the agent tool side, the course both develops components like terminal controllers and browser controls in-house, and combines them with LangChain's built-in database and file operation tools. The knowledge base connects to Alibaba Cloud Bailian's knowledge base. For AI IDEs, the course introduces Cursor, Tongyi Lingma, and ByteDance's open-source Trae.

The course emphasizes enterprise-grade, hands-on projects as the core, adopting a project-oriented teaching approach rather than blindly piling up knowledge points. The project is developed from scratch, with all code handwritten throughout, and the learning curve is relatively smooth. The goal is to help programmers master LangChain, LangGraph, MCP, RPA automation, and other technologies, and to gain the ability to develop complex agents.

How LangChain, LangGraph, and MCP Divide the Work

These three terms are often lumped together, but their actual responsibilities differ. LangChain is an earlier AI application development framework, providing basic components such as model wrappers, prompt templates, tool calling, and memory management — think of it as a "parts library." LangGraph is a framework built on top of it for orchestration. It models the agent's execution process as a graph with nodes and edges, naturally supporting loops, branches, state passing, and human intervention, making it suitable for building complex agents that require multiple rounds of iteration.

MCP (Model Context Protocol) is an open protocol proposed by Anthropic to standardize the way models connect with external tools and data sources. You can think of it as the "USB-C port of the AI world": as long as a tool implements an MCP server, any model or client that supports the protocol can call it directly, with no need to write separate adapter code for each model. Combined, LangChain provides capabilities, LangGraph handles scheduling, and MCP handles extension — forming the mainstream skeleton of today's agent development.

Ollama and Local Model Deployment

Ollama is a tool that greatly simplifies running large models locally. It automatically handles model weight downloads, quantization format conversion, and inference engine configuration. Users only need one command (such as ollama run qwen2.5) to run a conversational model on their personal computer and expose an OpenAI-compatible interface.

For agent developers, local deployment offers three main benefits: first, zero calling cost, making it ideal for repeated debugging; second, data never leaves the machine, giving more control when handling sensitive information; third, it works offline, free from network limits and quotas. The trade-off is that local models' reasoning ability and context length are typically weaker than cloud flagship models, so real-world projects often adopt a hybrid strategy of "running small models locally for validation, running large models in the cloud for production." The article places Ollama alongside Alibaba Cloud Bailian and Claude/GPT precisely so that learners can freely choose along this spectrum.

Who It's For and the Path to Transition

This course is for programmers who want to use AI Agents to change their fortunes, master agent technology, and enter this field. Prerequisites include experience with large models and familiarity with Python and Node.js — the main development language is Python, with some Node.js as well.

The course instructor has experience spanning three economic cycles: the PC internet, the mobile internet, and artificial intelligence. He has served as CTO of a startup, a technical expert at a major tech company, and a front-end team lead, and currently also serves as head of AI Agent development. He emphasizes that each cycle allows you to ride the momentum for growth, and he hopes to grow together with students in the AI Agent wave through this course.

Making people feel a kind of anxiety

For programmers who want to seize the AI Agent opportunity, starting with hands-on projects, understanding an agent's perception-decision-action loop, and mastering mainstream development frameworks and toolchains is a practical and viable path forward.

One-line Summary

Explosive demand for AI Agents is a real opportunity for ordinary programmers to break through.

Paragraph Summary

The article starts from market signals, noting that giants like Microsoft and Baidu are bullish on AI Agents, that Manus's funding round and a 44.8% CAGR confirm the sector's heat, and that related job demand is growing with relatively broad hiring requirements, making it friendlier to ordinary programmers than hardware or algorithm roles. It then explains the essence of an AI Agent: a program with perception, decision-making, and action capabilities that autonomously completes tasks through a "think—act—observe" loop, using examples such as automatically creating a Vue3 project and autonomously selecting a Vue2 preset to illustrate its decision-making ability. The tech stack covers both cloud and local large models, LangChain/LangGraph, MCP, LangSmith/LangFuse, and Alibaba Cloud Bailian's knowledge base. The course takes a project-oriented approach with code written from scratch, aimed at programmers with Python/Node fundamentals.

#AI Agent#LangChain#LangGraph#MCP#Ollama#AI Agent tutorial#programmer career transition
Share:

Related articles