Blog

Thoughts on AI, software, life and more. Short notes and longer write-ups.

Three Patterns of Multi-Agent Orchestration: Sequential, Concurrent, Conditional

Jun 22, 2026

Multi-agent systems are not just about having multiple agents. The real challenge is orchestration — how do agents pass data? How do they execute in parallel? How do you branch based on intermediate results? This article implements three orchestration patterns — sequential, concurrent, and conditional — using both LangGraph and qwen-agent, breaking down the core primitives and use cases of each.

Read more

Planning Design Pattern: Task Decomposition + Structured Output + Multi-Agent Execution

Jun 16, 2026

Complex tasks can't be solved in one shot. The Planning Design Pattern separates 'thinking' from 'doing' — the Planning Agent decomposes user requests into a structured list of subtasks, and the Concierge Agent executes them in dependency order. This post dissects task decomposition, Pydantic structured output, and the planning-execution separation through a complete 7-day Paris trip case study.

Read more

System Message Framework: Auto-Generating High-Quality System Prompts with LLMs

Jun 14, 2026

Hand-writing system prompts is time-consuming, inconsistent, and hard to scale. The System Message Framework uses a single meta-prompt to let an LLM automatically generate system prompts — you only need to provide the role, company, and responsibility. This post dissects the two-step generation flow and explores its connection to building trustworthy AI Agents.

Read more

Agentic RAG: Letting the Agent Decide When and What to Retrieve

Jun 11, 2026

Traditional RAG follows a fixed retrieve-then-generate pipeline. Agentic RAG returns retrieval authority to the Agent — letting the LLM autonomously decide when to retrieve, what keywords to use, and whether a second retrieval is needed for verification. This post dissects Agentic RAG's core mechanism and the Producer-Checker iterative pattern through a complete travel knowledge base search case study.

Read more

Agent Tool Use Design Patterns: Multi-Tool Composition, Structured Output, Tool Approval

Jun 10, 2026

When an Agent has multiple tools, how does the LLM orchestrate call order? How can downstream code reliably consume Agent output? How do you add human approval for side-effect operations (booking, charging)? This post covers three tool-use design patterns through a complete travel booking agent case study.

Read more

Agentic Design Patterns: Good Instructions, Structured Output, Split Responsibility

Jun 09, 2026

Building AI Agents isn't just about code — it's about design. This post covers three fundamental design patterns: using clear instructions to constrain Agent behavior, using Pydantic to make outputs verifiable, and splitting complex tasks with single-responsibility agents. Each pattern comes with runnable code comparisons.

Read more

Dissecting Agent Frameworks: Four Layers, Thirty Lines of Truth

Jun 08, 2026

Last time we hand-wrote a tool calling loop. Now we go one level up: what does an Agent framework actually do? We break it into four layers — Client, Agent, Tools, Session — mapping each from raw code to qwen-agent. You'll see that a framework is nothing more than engineered packaging of those 30 lines.

Read more

AI Agents from Scratch: Understanding the Essence in 30 Lines of Code

Jun 07, 2026

Strip away all frameworks. Using only the openai SDK connected to the Qwen API, hand-write the tool calling loop. In 30 lines of core code, understand: what an AI Agent really is, what Agent frameworks actually do under the hood, and why understanding this loop matters more than learning any framework.

Read more

From Zero to One: Building My AI Researcher Personal Homepage

Feb 26, 2026

Sharing how I built a modern personal homepage for AI researchers and developers using Next.js 16. This article covers technology selection, feature design, and how to leverage AI-assisted development.

Read more