The Complete Guide to Building AI Agents from Scratch: Knowledge Bases and Workflow Practices

A systematic roadmap for building real, production-ready AI Agents from scratch.
Drawing on a structured AI Agent course outline from Bilibili, this article maps a clear path from concept to deployment for beginners. It covers the core components of agents, how to build private knowledge bases using tools like Cherry Studio and Tencent IMA, tiered implementation approaches via Coze/Dify and VS Code's Cline plugin, and workflow orchestration including Deep Research capabilities. The key takeaway: master the foundational framework of model + knowledge base + tools + workflow, rather than chasing any single tool.
The Complete Guide to Building AI Agents from Scratch: Knowledge Bases and Workflow Practices
AI Agents are becoming the new infrastructure for personal and enterprise productivity. Some compare the current opportunity in building agents to the early days of WeChat Official Accounts — the earlier you start, the more likely you'll be among the first movers. But the reality is that nine out of ten learners get stuck at the same point: they've collected a ton of tutorials, yet when it's time to actually build something, they don't know where to begin. Which model to choose? How to chain workflows together? Why does the thing they build "look decent but fall apart the moment you ask it anything real"?
This article draws on a systematic AI Agent hands-on course outline from Bilibili to map out a clear path from foundational understanding to real-world deployment — helping beginners avoid the most common pitfalls.
Why Learn About Agents Now
The value of agents can be understood from two dimensions: personal and enterprise.
For individuals, an agent is more like a "capable assistant": it can handle repetitive tasks, boost efficiency, assist with content creation, grow an audience, and even open up monetization paths. For content creators, freelancers, and students, this is a skill with a relatively low barrier to entry but meaningful potential returns.
For enterprises, the commercial value is even broader. Whether it's customer service, knowledge management, or business process automation, agents can be embedded into real production workflows. The core insight emphasized in the original course is: what truly matters isn't a "looks cool" demo — it's an agent that actually works and runs real business processes.

This hits on the core pain point for most learners — plenty of tutorials consumed, but hands-on capability hasn't kept up. The key to learning about agents is moving from "understanding" to "building something and actually using it."
Course Positioning and Learning Goals
This course is designed for "everyone": working professionals, independent content creators, students, and freelancers are all within scope, and the barrier to entry is deliberately kept low.

In terms of learning goals, the course adopts a "three practical, one theoretical" structure: the first three goals focus on hands-on implementation, ensuring learners can actually build a working agent by the end; the final goal returns to underlying principles, so you understand not just the "how" but the "why."
This design philosophy is worth noting. Pure theory tends to be abstract and hard to apply; pure practice is difficult to generalize. Only by combining "how to do it" with "why we do it this way" can you adapt to new platforms and new requirements — rather than mechanically following tutorial steps.
Core Concepts Behind Agents
The first module of the course covers an overview of agents across two dimensions.
First, the evolution of understanding — from early concepts of what an Agent was to the modern definition driven by large language models. The differences are significant. Early approaches leaned toward rule-based automation, while modern agents are built on the reasoning and tool-calling capabilities of large language models (LLMs).
Second, the core components of an agent. Understanding these elements — model, prompt, tools, memory, workflow, and so on — is the foundation for building any application. The reason so many people end up with tangled workflows and agents that "fall apart when questioned" often comes down to a lack of systematic understanding of these core components, rather than just stitching together feature blocks.
Private Knowledge Bases: The Memory Foundation of Agents
A knowledge base is what makes an agent "professionally reliable." General-purpose LLMs have broad knowledge but don't understand your specific business. A private knowledge base connects your enterprise documents and personal data to the agent, giving its answers a factual foundation.

This section of the course covers multiple platforms, including Cherry Studio and Tencent's IMA, demonstrating how to build a "reliable and practical" enterprise or personal private knowledge base.
The value of comparing multiple platforms is that different tools vary in ease of use, data privacy, and retrieval effectiveness. For beginners, the more practical approach is to first use a lower-barrier tool to get a minimum viable knowledge base running, then gradually develop an understanding of the underlying Retrieval-Augmented Generation (RAG) logic.
RAG (Retrieval-Augmented Generation) is the core technical principle behind private knowledge bases. It works in two phases: in the offline phase, documents are chunked, converted into vectors, and stored in a vector database; in the online phase, the user's query is also converted into a vector, and similarity search retrieves the most relevant text chunks, which are then injected into the prompt as context so the LLM can generate grounded answers. The key advantage is that knowledge base content can be updated at any time without retraining the model, and it effectively reduces "hallucinations" (the model fabricating facts). Understanding RAG logic helps diagnose why a knowledge base underperforms — the root cause usually lies in poor document chunking strategies, a poorly chosen embedding model, or insufficient retrieval recall, rather than the model itself.
Implementation Paths: Entry-Level vs. Advanced Agents
The course honestly acknowledges that agent implementations are still evolving and there's no single definitive standard. Accordingly, it offers a tiered approach.
In terms of tooling, the course is built around Coze/Dify-style platforms and the Cline plugin for VS Code. The former is visual and low-barrier, ideal for rapid prototyping; the latter is more developer-oriented and offers greater flexibility.
Implementation is divided into two tiers:
- Entry-level agents: Multiple implementation approaches, focused on quick deployment and feature validation;
- Advanced agents: Three implementation approaches, covering more complex orchestration and capability expansion.
This tiered design aligns well with the learning curve — start with entry-level approaches to build confidence and a holistic understanding, then progressively tackle advanced implementations, rather than being overwhelmed by complex architecture from the start.
Coze (扣子) and Dify are currently the two most widely used no-code/low-code agent building platforms in China. Coze, developed by ByteDance, is deeply integrated with the Doubao (豆包) ecosystem, offers a plugin marketplace and Bot publishing channels, and has an extremely fast onboarding experience. Dify is an open-source project that supports private deployment, making it more popular in enterprise environments with strict data privacy requirements, and it offers more flexible workflow orchestration. The Cline plugin for VS Code represents a different approach — targeting users with some programming background, it uses a code editor as the interface to call LLM APIs, and is suited for highly customized scenarios. These three are not competing alternatives; they are layered choices for different technical backgrounds and needs.
Workflows: The Core Vehicle for Productivity
If a knowledge base is memory and the model is the brain, then workflows are how agents actually deliver productivity.

The course positions workflows as "the expression of productivity at this stage," with focused coverage of how to build them on the platform, accompanied by multiple real-world case studies. It also extends into applications like Deep Research capabilities.
At its core, a workflow chains together multiple steps, tools, and decision logic into an automatically executable pipeline. It determines whether an agent can complete complex tasks in a stable and controlled manner — rather than staying limited to single-turn Q&A. This is also the part where beginners are most likely to get tangled up. Understanding the input/output relationships between each node is the key to building robust workflows.
Deep Research is a recently emerged agent application paradigm, pioneered by LLM providers like OpenAI and Gemini. The core idea is to have the agent autonomously decompose a research question, iteratively search the web across multiple rounds, progressively filter and synthesize information, and ultimately produce in-depth content approaching the quality of a human research report. Unlike single-turn search Q&A, Deep Research relies on the workflow's ability to orchestrate the cycle of "search → read → decide whether to continue searching → synthesize." On platforms like Coze and Dify, this can be simulated using conditional branch nodes and loop nodes — making it a textbook scenario for practicing complex workflow orchestration.
Closing Thoughts
From foundational concepts and knowledge bases to entry-level and advanced implementations and workflows, this course outline sketches out a reasonably complete learning map for agents. For beginners, its value lies in bringing scattered knowledge points into a coherent system, with a strong emphasis on "actually usable" outcomes.
One important caveat: the agent space is still evolving rapidly, and specific tools and platforms will continue to change. Rather than obsessing over the operational details of any single tool, it's more valuable to internalize the unchanging core framework — model + knowledge base + tools + workflow — so you can stay competitive amid constant change.
Related articles

Chain of Thought Isn't Just for AI: How Humans Can Use CoT to Improve Thinking Quality
Chain of Thought isn't just a prompt trick for large models. Starting from a Hacker News discussion, this article analyzes why CoT works for human thinking too, breaks down actionable ways to transfer it, and highlights the key differences between human CoT and machine CoT.
Cloudflare Teams Up with OpenAI: Closi…
Cloudflare Teams Up with OpenAI: Closing the Loop from Vulnerability Discovery to Defense with AI
Cloudflare uses OpenAI Daybreak to investigate security vulnerabilities and generate reviewable remediation plans, while developers use Codex to boost coding efficiency and quality.

Orca Multi-Agent Orchestration in Practice: A Guide to Parallel Collaboration with Claude and Codex
Orca is Stable AI's free open-source agent workbench supporting 34 agents like Claude Code and Codex in parallel. Learn its Git worktree isolation, multi-model orchestration, and mobile management.