<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Agent on KnightLi Blog</title>
        <link>https://www.knightli.com/en/tags/agent/</link>
        <description>Recent content in Agent on KnightLi Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Thu, 23 Apr 2026 13:13:40 +0800</lastBuildDate><atom:link href="https://www.knightli.com/en/tags/agent/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>AI Terms Explained: Agent, MCP, RAG, and Token in Plain Language</title>
        <link>https://www.knightli.com/en/2026/04/23/ai-terms-agent-mcp-rag-token-explained/</link>
        <pubDate>Thu, 23 Apr 2026 13:13:40 +0800</pubDate>
        
        <guid>https://www.knightli.com/en/2026/04/23/ai-terms-agent-mcp-rag-token-explained/</guid>
        <description>&lt;p&gt;When people first get into AI, what pushes them away is often not the models themselves, but the long list of terms that keeps showing up in every discussion. &lt;code&gt;Agent&lt;/code&gt;, &lt;code&gt;MCP&lt;/code&gt;, &lt;code&gt;RAG&lt;/code&gt;, &lt;code&gt;AIGC&lt;/code&gt;, and &lt;code&gt;Token&lt;/code&gt; all look familiar, but without a simple explanation, many people only recognize the words without really understanding them.&lt;/p&gt;
&lt;p&gt;This article follows a common beginner-friendly line of explanation and condenses 10 high-frequency AI terms into a set of meanings that is easier to remember. The goal is not to sound academic. It is to help you build a basic mental model that lets you follow everyday AI conversations.&lt;/p&gt;
&lt;h2 id=&#34;10-common-ai-terms-and-what-they-mean&#34;&gt;10 common AI terms and what they mean
&lt;/h2&gt;&lt;h3 id=&#34;1-agent-an-ai-that-does-more-than-chat&#34;&gt;1. Agent: an AI that does more than chat
&lt;/h3&gt;&lt;p&gt;&lt;code&gt;Agent&lt;/code&gt; can be understood as an AI assistant that actually gets work done.&lt;/p&gt;
&lt;p&gt;A normal chatbot usually works in a simple question-and-answer pattern. An &lt;code&gt;Agent&lt;/code&gt; goes a step further. It can break a task into steps, arrange a process, call tools, and return a finished result. If you ask it to organize materials, look something up, or generate a document, it may do more than give advice. It may actually chain those actions together and complete them.&lt;/p&gt;
&lt;p&gt;That is why the key point of an &lt;code&gt;Agent&lt;/code&gt; is not whether it can talk, but whether it can act.&lt;/p&gt;
&lt;h3 id=&#34;2-openclaw-an-ai-assistant-that-stays-on-your-computer&#34;&gt;2. OpenClaw: an AI assistant that stays on your computer
&lt;/h3&gt;&lt;p&gt;Here, &lt;code&gt;OpenClaw&lt;/code&gt; is described as a kind of AI assistant that lives on your computer.&lt;/p&gt;
&lt;p&gt;You can think of this type of tool as a more desktop-oriented AI helper. It does not only receive text. It may also observe the interface, call local tools, and execute tasks step by step. Compared with a normal web chat interface, this kind of tool emphasizes operational ability much more.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;Agent&lt;/code&gt; is the abstract idea of an execution-oriented AI, this kind of desktop assistant is a more concrete personal-computer version of that idea.&lt;/p&gt;
&lt;h3 id=&#34;3-skills-capability-packs-added-to-an-agent&#34;&gt;3. Skills: capability packs added to an Agent
&lt;/h3&gt;&lt;p&gt;&lt;code&gt;Skills&lt;/code&gt; can be understood as functional modules or operating instructions for an &lt;code&gt;Agent&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The same &lt;code&gt;Agent&lt;/code&gt; can behave very differently depending on which &lt;code&gt;Skills&lt;/code&gt; it has. Some may focus on copywriting, some on data organization, and some on code-related work. They are a bit like apps on a phone, and a bit like reusable workflows.&lt;/p&gt;
&lt;p&gt;So in many cases, it is not that the model suddenly became smarter. It is that a clearer set of rules, tools, and steps was added behind it.&lt;/p&gt;
&lt;h3 id=&#34;4-mcp-a-unified-way-for-ai-to-connect-to-tools&#34;&gt;4. MCP: a unified way for AI to connect to tools
&lt;/h3&gt;&lt;p&gt;&lt;code&gt;MCP&lt;/code&gt; stands for &lt;code&gt;Model Context Protocol&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In everyday terms, it is a bit like a &lt;code&gt;Type-C&lt;/code&gt; connector for the AI world. In the past, connecting a model to different tools often meant building separate integrations one by one. With a unified protocol, the way those tools connect becomes more standardized and easier to reuse.&lt;/p&gt;
&lt;p&gt;For most users, the most important thing to remember is this: &lt;code&gt;MCP&lt;/code&gt; is not about whether a model can answer a question. It is about how a model can connect to external tools and resources in a safe and stable way.&lt;/p&gt;
&lt;h3 id=&#34;5-gacha-ai-output-is-inherently-random&#34;&gt;5. Gacha: AI output is inherently random
&lt;/h3&gt;&lt;p&gt;The term &amp;ldquo;gacha&amp;rdquo; often appears in &lt;code&gt;AI&lt;/code&gt; image generation, video generation, and creative work.&lt;/p&gt;
&lt;p&gt;The idea is simple. Even with the same prompt and the same general direction, the result can still be different each time. Sometimes the output is great. Sometimes it falls apart. That is why people compare repeated generation attempts to pulling gacha in a game.&lt;/p&gt;
&lt;p&gt;What this really reminds us is that AI generation is not a fixed formula. It is a probabilistic process with variation.&lt;/p&gt;
&lt;h3 id=&#34;6-api-the-connection-between-an-app-and-a-model&#34;&gt;6. API: the connection between an app and a model
&lt;/h3&gt;&lt;p&gt;&lt;code&gt;API&lt;/code&gt; stands for &lt;code&gt;Application Programming Interface&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can think of it as the standard entry point through which programs communicate. When you call a model service from your own app, script, or editor, you are essentially using an &lt;code&gt;API&lt;/code&gt; to send a request and receive a result.&lt;/p&gt;
&lt;p&gt;If you compare a model service to a restaurant, then:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the menu is like the &lt;code&gt;API&lt;/code&gt; documentation&lt;/li&gt;
&lt;li&gt;placing an order is like making an &lt;code&gt;API&lt;/code&gt; request&lt;/li&gt;
&lt;li&gt;the kitchen sending back the dish is like the model returning a result&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That is why many tools may look different on the surface while still calling some form of &lt;code&gt;API&lt;/code&gt; underneath.&lt;/p&gt;
&lt;h3 id=&#34;7-multimodality-ai-handles-more-than-text&#34;&gt;7. Multimodality: AI handles more than text
&lt;/h3&gt;&lt;p&gt;&lt;code&gt;Multimodality&lt;/code&gt; means AI no longer only reads and writes text. It can process multiple kinds of input and output.&lt;/p&gt;
&lt;p&gt;For example, it may be able to read images, understand voice, interpret video, generate pictures, or even support real-time voice and video interaction. Compared with early text-only models, multimodal models are much closer to having the combined abilities to see, hear, speak, and write.&lt;/p&gt;
&lt;p&gt;That is also why many AI products are no longer centered around a single text box.&lt;/p&gt;
&lt;h3 id=&#34;8-rag-retrieve-information-first-then-generate-an-answer&#34;&gt;8. RAG: retrieve information first, then generate an answer
&lt;/h3&gt;&lt;p&gt;&lt;code&gt;RAG&lt;/code&gt; stands for &lt;code&gt;Retrieval-Augmented Generation&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It is useful for solving a practical problem: a model&amp;rsquo;s training data has a time boundary, and it does not automatically know your company&amp;rsquo;s newest documents, customer-service records, or business rules. The idea behind &lt;code&gt;RAG&lt;/code&gt; is to retrieve relevant material from specified sources first, and then generate an answer based on that material.&lt;/p&gt;
&lt;p&gt;Its value usually shows up in three ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;answers are more likely to stay close to real source material&lt;/li&gt;
&lt;li&gt;you can trace where the answer came from&lt;/li&gt;
&lt;li&gt;new documents can be added and reflected quickly&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That is why many enterprise knowledge bases, AI customer-service systems, and internal Q&amp;amp;A tools rely on &lt;code&gt;RAG&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;9-aigc-the-general-term-for-ai-generated-content&#34;&gt;9. AIGC: the general term for AI-generated content
&lt;/h3&gt;&lt;p&gt;&lt;code&gt;AIGC&lt;/code&gt; stands for &lt;code&gt;AI Generated Content&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It is not a single tool. It is a broad label for content produced by AI, including text, images, audio, video, and more. AI writing, AI illustration, AI short-form video generation, and AI voice synthesis all fit under the umbrella of &lt;code&gt;AIGC&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;What matters most about this term is that it describes a way of producing content, not one specific model.&lt;/p&gt;
&lt;h3 id=&#34;10-token-the-unit-used-to-measure-model-processing&#34;&gt;10. Token: the unit used to measure model processing
&lt;/h3&gt;&lt;p&gt;&lt;code&gt;Token&lt;/code&gt; can be understood as the basic unit a model uses to process text.&lt;/p&gt;
&lt;p&gt;It is not exactly the same as one character or one word, but in practice, you can treat it as the common unit used for model computation and billing. Your input consumes &lt;code&gt;Token&lt;/code&gt;, the model&amp;rsquo;s output consumes &lt;code&gt;Token&lt;/code&gt;, and the context kept in memory also takes up &lt;code&gt;Token&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;That is why model services keep talking about context length, cost control, and prompt compression. At the core, all of those topics are tied to &lt;code&gt;Token&lt;/code&gt;.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Claude Code Multi-Agent Collaboration: How to Choose Between Subagents and Agent Teams</title>
        <link>https://www.knightli.com/en/2026/04/22/claude-code-subagents-vs-agent-teams/</link>
        <pubDate>Wed, 22 Apr 2026 21:35:52 +0800</pubDate>
        
        <guid>https://www.knightli.com/en/2026/04/22/claude-code-subagents-vs-agent-teams/</guid>
        <description>&lt;p&gt;When people talk about multi-agent collaboration in Claude Code, the easiest two concepts to mix up are &lt;code&gt;Subagents&lt;/code&gt; and &lt;code&gt;Agent Teams&lt;/code&gt;. They both sound like “spin up several agents to work together,” but they are meant for different kinds of work. In short, the former is better for splitting off independent tasks, while the latter is better when several agents need to collaborate around the same problem and cross-check each other over time.&lt;/p&gt;
&lt;p&gt;If you have used Skills before, this framing also helps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A Skill defines the workflow and rules&lt;/li&gt;
&lt;li&gt;A Subagent or Agent teammate does the actual execution&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So the real question is not which one is “more advanced,” but what kind of collaboration problem you are solving.&lt;/p&gt;
&lt;h2 id=&#34;subagents-split-off-side-tasks&#34;&gt;Subagents: split off side tasks
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;Subagents&lt;/code&gt; are closer to temporary worker copies launched from the current session. Each one gets its own context window, and when it finishes, it returns only a summary of the result. The main conversation stays cleaner because it does not have to absorb all the intermediate logs and output.&lt;/p&gt;
&lt;p&gt;That gives Subagents a few very practical strengths:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The main thread stays clean instead of being flooded by test logs, search results, or long output&lt;/li&gt;
&lt;li&gt;Independent research or execution tasks can run in parallel&lt;/li&gt;
&lt;li&gt;They work well for tasks where “just bring me the result” is enough&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The original article notes that Claude Code comes with three built-in kinds of Subagents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Explore&lt;/code&gt;: read-only, useful for quickly searching a codebase&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Plan&lt;/code&gt;: read-only, useful for gathering information in the background during plan mode&lt;/li&gt;
&lt;li&gt;&lt;code&gt;General-purpose&lt;/code&gt;: can read and write, suitable for tasks that mix exploration and editing&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;custom-subagents&#34;&gt;Custom Subagents
&lt;/h3&gt;&lt;p&gt;If the built-in options are not enough, you can define your own Subagent. The mechanism is simple: write a Markdown file in one of these locations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.claude/agents/&lt;/code&gt;: only active in the current project&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.claude/agents/&lt;/code&gt;: active across all your projects&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The file format looks like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;19
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;20
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;21
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;22
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;23
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;24
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;25
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;26
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;27
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;28
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;29
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;30
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;31
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;---
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;name: code-reviewer
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;tools: Read, Grep, Glob, Bash
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;model: inherit
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;---
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;You are a senior code reviewer ensuring high standards of code quality and security.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;When invoked:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;1.&lt;/span&gt; Run git diff to see recent changes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;2.&lt;/span&gt; Focus on modified files
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;3.&lt;/span&gt; Begin review immediately
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Review checklist:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Code is clear and readable
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Functions and variables are well-named
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; No duplicated code
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Proper error handling
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; No exposed secrets or API keys
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Input validation implemented
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Good test coverage
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Performance considerations addressed
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Provide feedback organized by priority:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Critical issues (must fix)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Warnings (should fix)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Suggestions (consider improving)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Include specific examples of how to fix issues.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The key field here is &lt;code&gt;description&lt;/code&gt;. Claude uses it to decide when this Subagent should be called, so the more precise the description is, the more reliable the trigger tends to be.&lt;/p&gt;
&lt;p&gt;A few other common configuration fields are also worth knowing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;tools&lt;/code&gt;: limits which tools the Subagent can use&lt;/li&gt;
&lt;li&gt;&lt;code&gt;model&lt;/code&gt;: chooses between &lt;code&gt;sonnet&lt;/code&gt;, &lt;code&gt;opus&lt;/code&gt;, &lt;code&gt;haiku&lt;/code&gt;, or &lt;code&gt;inherit&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;permissionMode&lt;/code&gt;: controls edit permissions and permission prompt behavior&lt;/li&gt;
&lt;li&gt;&lt;code&gt;memory&lt;/code&gt;: gives the Subagent a cross-conversation memory directory&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you only need a Subagent temporarily, you can also define it through the CLI:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;claude --agents &lt;span class=&#34;s1&#34;&gt;&amp;#39;{
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;  &amp;#34;code-reviewer&amp;#34;: {
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    &amp;#34;description&amp;#34;: &amp;#34;Expert code reviewer. Use proactively after code changes.&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    &amp;#34;prompt&amp;#34;: &amp;#34;You are a senior code reviewer. Focus on code quality, security, and best practices.&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    &amp;#34;tools&amp;#34;: [&amp;#34;Read&amp;#34;, &amp;#34;Grep&amp;#34;, &amp;#34;Glob&amp;#34;, &amp;#34;Bash&amp;#34;],
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    &amp;#34;model&amp;#34;: &amp;#34;sonnet&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;}&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;when-subagents-fit-best&#34;&gt;When Subagents fit best
&lt;/h3&gt;&lt;p&gt;&lt;code&gt;Subagents&lt;/code&gt; are usually the best fit for tasks like these:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Running tests and returning only the failure summary instead of flooding the main thread with thousands of log lines&lt;/li&gt;
&lt;li&gt;Investigating several unrelated modules in parallel&lt;/li&gt;
&lt;li&gt;Splitting “find the issue” and “fix the issue” into a simple pipeline&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Research the authentication, database, and API modules in parallel using separate subagents
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Use the code-reviewer subagent to find performance issues, then use the optimizer subagent to fix them
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;But if a task needs constant back-and-forth adjustments, shares a lot of context across stages, or concentrates changes in only one or two files, handling it directly in the main conversation is often simpler than spinning up a Subagent.&lt;/p&gt;
&lt;h2 id=&#34;agent-teams-multiple-independent-sessions-working-together&#34;&gt;Agent Teams: multiple independent sessions working together
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;Agent Teams&lt;/code&gt; operate at a different level. Instead of launching worker copies inside one session, they start multiple fully independent Claude Code instances that collaborate around a shared task list and can also message one another directly.&lt;/p&gt;
&lt;p&gt;That makes an Agent Team feel more like a real small team than a simple side-task worker setup.&lt;/p&gt;
&lt;p&gt;The article notes that this is currently an experimental feature and needs to be enabled first:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;#34;env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Once this is added to &lt;code&gt;settings.json&lt;/code&gt;, you can ask Claude to organize a team around a specific goal. For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I&amp;#39;m designing a CLI tool that helps developers track TODO comments across
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;their codebase. Create an agent team to explore this from different angles: one
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;teammate on UX, one on technical architecture, one playing devil&amp;#39;s advocate.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;what-an-agent-team-consists-of&#34;&gt;What an Agent Team consists of
&lt;/h3&gt;&lt;p&gt;An Agent Team mainly includes three parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Team lead: the main session you are using, responsible for organizing, assigning, and summarizing&lt;/li&gt;
&lt;li&gt;Teammates: multiple independent Claude Code instances&lt;/li&gt;
&lt;li&gt;Task list and Mailbox: the shared task list and communication channel&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The biggest difference from &lt;code&gt;Subagents&lt;/code&gt; is that teammates can communicate directly with one another instead of routing everything through the lead. Tasks usually move through states such as &lt;code&gt;pending&lt;/code&gt;, &lt;code&gt;in progress&lt;/code&gt;, and &lt;code&gt;completed&lt;/code&gt;, and once a teammate finishes one task, it can pick up the next one.&lt;/p&gt;
&lt;h3 id=&#34;when-agent-teams-fit-best&#34;&gt;When Agent Teams fit best
&lt;/h3&gt;&lt;p&gt;When a task needs several perspectives, active discussion, conflicting hypotheses, or parallel work across modules, &lt;code&gt;Agent Teams&lt;/code&gt; are a better fit.&lt;/p&gt;
&lt;p&gt;The article gives several representative examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Several reviewers inspect the same PR in parallel, each focusing on a different dimension&lt;/li&gt;
&lt;li&gt;Multiple agents investigate the same bug with competing explanations and challenge each other’s conclusions&lt;/li&gt;
&lt;li&gt;Frontend, backend, and testing move forward in parallel on different parts of the project&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, parallel code review:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Create an agent team to review PR &lt;span class=&#34;ni&#34;&gt;#142&lt;/span&gt;. Spawn three reviewers:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; One focused on security implications
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; One checking performance impact
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; One validating test coverage
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Have them each review and report findings.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;And for debate-style debugging:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Users report the app exits after one message instead of staying connected.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Spawn 5 agent teammates to investigate different hypotheses. Have them talk to
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;each other to try to disprove each other&amp;#39;s theories, like a scientific
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;debate. Update the findings doc with whatever consensus emerges.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The common pattern here is that you do not just want one answer. You want several agents to exchange judgments, challenge assumptions, and gradually converge on a stronger conclusion.&lt;/p&gt;
&lt;h2 id=&#34;how-to-choose-between-them&#34;&gt;How to choose between them
&lt;/h2&gt;&lt;p&gt;If you want a quick rule of thumb, use this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you just need the result, use &lt;code&gt;Subagents&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;If the work requires discussion and cross-validation, use &lt;code&gt;Agent Teams&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Expanded a bit further, the main differences are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Communication style: &lt;code&gt;Subagents&lt;/code&gt; mainly report results back to the main session, while &lt;code&gt;Agent Teams&lt;/code&gt; members can talk directly to one another&lt;/li&gt;
&lt;li&gt;Coordination model: &lt;code&gt;Subagents&lt;/code&gt; depend more on the main conversation to orchestrate them, while &lt;code&gt;Agent Teams&lt;/code&gt; work from a shared task list that members can claim themselves&lt;/li&gt;
&lt;li&gt;Token cost: &lt;code&gt;Subagents&lt;/code&gt; are cheaper, while &lt;code&gt;Agent Teams&lt;/code&gt; cost more because each teammate is an independent instance&lt;/li&gt;
&lt;li&gt;Best-fit tasks: &lt;code&gt;Subagents&lt;/code&gt; are better for independent, result-oriented work, while &lt;code&gt;Agent Teams&lt;/code&gt; are better for discussion-heavy and cross-check-heavy work&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;practical-cautions&#34;&gt;Practical cautions
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;Agent Teams&lt;/code&gt; are more powerful, but that does not mean every task deserves a full team. The article specifically calls out a few practical concerns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;token usage is noticeably higher&lt;/li&gt;
&lt;li&gt;if multiple teammates edit the same file at once, overwrite conflicts become very likely&lt;/li&gt;
&lt;li&gt;adding too many teammates increases coordination cost without guaranteeing better results&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A safer default is usually:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;start with 3 to 5 teammates&lt;/li&gt;
&lt;li&gt;split tasks by module or file to avoid edit conflicts&lt;/li&gt;
&lt;li&gt;if the lead starts doing teammate work too early, explicitly tell it to wait for the others first&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The current experimental version also has a few limitations, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;no support for &lt;code&gt;/resume&lt;/code&gt; and &lt;code&gt;/rewind&lt;/code&gt; for in-process teammates&lt;/li&gt;
&lt;li&gt;task status can lag and sometimes needs manual correction&lt;/li&gt;
&lt;li&gt;one lead can manage only one team at a time&lt;/li&gt;
&lt;li&gt;teammates cannot spawn child teams of their own&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;short-conclusion&#34;&gt;Short conclusion
&lt;/h2&gt;&lt;p&gt;These two features are not substitutes for one another. They solve two different collaboration problems.&lt;/p&gt;
&lt;p&gt;If your goal is “parallelize side tasks and keep the main context clean,” start with &lt;code&gt;Subagents&lt;/code&gt;. If your goal is “let several agents work like a small team, discuss, and cross-check each other,” then &lt;code&gt;Agent Teams&lt;/code&gt; are the better tool.&lt;/p&gt;
&lt;p&gt;Trying both in a real task usually makes the distinction obvious very quickly: one is optimized for context isolation and result collection, and the other is optimized for multi-perspective collaboration and ongoing interaction.&lt;/p&gt;
&lt;h2 id=&#34;related-links&#34;&gt;Related links
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Original article: &lt;a class=&#34;link&#34; href=&#34;https://cloud.tencent.com/developer/article/2652960&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://cloud.tencent.com/developer/article/2652960&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        
    </channel>
</rss>
