AI Agent Core Architecture: LLM + Memory + Tools + Planning
A first-principles breakdown of AI Agent architecture: how the LLM brain, memory systems, tool interfaces, and planning modules form an autonomous reasoning loop.
Java Backend Engineer specializing in Spring Boot, distributed systems, and microservices architecture. Passionate about open source and continuous learning.
❯ neofetch
weiguang@dev-workspace
━━━━━━━━━━━━━━━━━━━━━━━━━
Role
Stack
Terminal
Editor
GitHub
Status
●●●●●●
import React from 'react'; const DevWorkspace = () => { const [isLoading, setIsLoading] = React.useState(true); React.useEffect(() => { const timer = setTimeout(() => { setIsLoading(false); }, 2000); return () => clearTimeout(timer); }, []); return ( <div className="workspace"> {isLoading ? ( <LoadingScreen /> ) : ( <Projects /> )} </div> ); }; export default DevWorkspace;
Passionate about technology with a focus on backend development, dedicated to sharing technical insights and contributing to open source.
Java Backend Developer & Tech Blogger
I'm a Java Backend Engineer with extensive experience in Spring Boot, MySQL, Redis, and distributed systems. I've accumulated rich backend architecture experience and love exploring new technologies while sharing my learnings through blog posts. In my spare time, I enjoy studying open source projects and applying good design principles to real-world work.
Driven by code, fueled by coffee, and inspired by creativity. Let’s build something amazing together!
Dive into my thoughts on coding, tech trends, and developer life. Explore my latest posts below.
A first-principles breakdown of AI Agent architecture: how the LLM brain, memory systems, tool interfaces, and planning modules form an autonomous reasoning loop.
Five essential design patterns for building AI agents — from simple ReAct loops to multi-agent collaboration, graph-based workflows, and agent handoffs. With code examples and framework recommendations.
A practical comparison of the six major AI agent frameworks in 2026 — with code examples, feature matrices, and selection guidance for different use cases.
Understanding the protocol layer that connects agents to tools, other agents, and frontends — MCP, A2A, AG-UI, and native Function Calling compared.
Taking agents from prototype to production — covering observability with Langfuse, evaluation strategies, security guardrails, low-code platforms, and deployment architecture.
A silent bug in Hugging Face Transformers caused GPT-2 attention scaling configs to be ignored when using SDPA or FlashAttention backends. Here's how I traced, fixed, and tested it through three rounds of maintainer review.
55 DeepInfra models had tool_choice support but were missing the function_calling flag, causing upstream frameworks to silently skip tool use. A data-layer fix with regression coverage.
PydanticAI's custom exceptions lost attributes during pickle round-trips, breaking error propagation in Celery, Ray, and multiprocessing. Fixed with __reduce__ methods and 16 parameterized tests.
Gradio's BrowserState component converted Pydantic models to Python repr strings instead of JSON dicts, breaking the frontend data contract. Fixed with model_dump() and 8 regression tests.
Gradio's App.create_app() hardcoded debug=True, ignoring the user's launch(debug=False) setting. A clean one-line fix with tests.
How a one-line serialization regression broke Notion sync for all Dify v1.13.0 self-hosted users, and how I traced it through a masking test fixture to deliver a clean fix with regression coverage.
Added runner-level regression tests to verify MCP tool failures produce proper tool_call_output_item events in both sync and streaming paths.
A practical deep dive into merged PR #4625: how a JSON schema compatibility gap broke tool calling for Vertex AI Gemini, and how I fixed it with focused regression coverage.
A deep technical breakdown of merged PR #4584 in langchain4j: protocol negotiation failures, transport-level design tradeoffs, and a production-safe fix with regression tests.
A practical, engineering-first guide to Retrieval-Augmented Generation covering architecture, chunking, hybrid retrieval, prompt grounding, and evaluation loops.
When an agent was invoked as a tool, it silently lost the parent's RunConfig — breaking tracing, model_provider, and privacy settings in nested agent chains. Fixed with ToolContext propagation.
A read-only operation (marking conversation as read) was incorrectly updating the conversation's updated_at timestamp, corrupting sort order in the chat list.
Workflow tool output fields showed empty descriptions in the UI even when the schema contained them. Fixed the parameter builder to properly hydrate from output_schema.
Workflow-as-tool file outputs were rejected with 'missing file_marker' errors. Fixed the protocol-level data contract and added 237 lines of test coverage.
SwanLab's training callback didn't forward resume-related init parameters, breaking experiment continuity when resuming training runs.
Modular conversion was generating incorrect default mlp_layer_types for GlmMoeDsa, causing the model config to diverge from source-of-truth. Fixed by correcting the init chain.
High-frequency pydantic serialization warnings were polluting logs in the Agents SDK core path. Fixed with a targeted model_dump wrapper and fallback strategy.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
Advanced Spring MVC features including interceptors, exception handling, file upload, async processing, and RESTful best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
Declarative REST client with Feign covering integration with Spring Cloud, load balancing, circuit breakers, and error handling.
Implementing distributed locks using Redis and Zookeeper with comparison of different approaches and failure handling strategies.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
In-depth technical analysis with code examples and enterprise best practices.
Advanced Spring MVC features including interceptors, exception handling, file upload, async processing, and RESTful best practices.
Understanding Spring Boot auto-configuration mechanism, starter dependencies, and application startup process internals.
Deep dive into Spring MVC internals covering DispatcherServlet, handler mappings, view resolvers, and request processing flow.
Complete ActiveMQ guide covering JMS concepts, message patterns, persistence, clustering, and integration with Spring.
Understanding MySQL index internals including B+ tree structure, page organization, and how indexes accelerate query performance.
Configure single and multiple data sources in Spring Boot with connection pooling, transaction management, and dynamic routing.
Master Aspect-Oriented Programming in Spring including pointcuts, advice types, annotations, and practical cross-cutting concern examples.
Complete MySQL tuning guide covering query optimization, index strategies, configuration parameters, and performance monitoring.
Comprehensive overview of distributed transaction patterns including 2PC, TCC, Saga, and eventual consistency implementations.
Master garbage collection algorithms and JVM performance tuning including heap sizing, GC selection, and monitoring techniques.
In-depth technical analysis with code examples and enterprise best practices.
Essential Maven guide for Java developers covering project structure, dependencies, plugins, lifecycle phases, and multi-module projects.
In-depth technical analysis with code examples and enterprise best practices.
Complete reference for MyBatis SQL mapping files including result maps, dynamic SQL, associations, and advanced mapping techniques.
Quick start guide to MyBatis ORM framework covering configuration, mappers, CRUD operations, and integration with Spring.
Evolution of data storage from files to databases to caching, with comprehensive Redis guide covering data types, persistence, and clustering.
Real-world MySQL index optimization cases with execution plan analysis, covering index selection, composite indexes, and query tuning.
In-depth technical analysis with code examples and enterprise best practices.
High-performance web server configuration guide covering Nginx and Tengine setup, reverse proxy, load balancing, and optimization techniques.
Comprehensive guide to Java concurrency covering threads, synchronized, locks, concurrent collections, thread pools, and JUC utilities.
Getting started with Spring Framework fundamentals including IoC container, dependency injection principles, and core module architecture.
Complete guide to Spring IoC container basics including XML configuration, dependency injection, bean scopes, lazy loading, and autowiring strategies.
Deep dive into Java Memory Model covering CPU cache coherence, MESI protocol, memory barriers, happens-before relationships, and volatile semantics.
Comprehensive test cases for MySQL transaction isolation levels covering dirty reads, non-repeatable reads, and phantom reads with practical SQL examples.
Master Spring IoC annotation-based configuration including @Component, @Autowired, @Qualifier, and component scanning for enterprise applications.
Hear from those who’ve worked with me about the impact of my code and collaboration.
CEO, TechTrend
John's expertise in React and Node.js transformed our app's performance. His attention to detail is unmatched!
Product Manager, InnovateCo
Working with John was a breeze. He delivered clean, efficient code ahead of schedule.
Founder, StartUpX
John's creative solutions and dedication made our project a success. Highly recommend!
CTO, WebCore Solutions
John brought fresh ideas and robust architecture to our development team. He’s a true professional.
Design Lead, Creativa
His collaboration with the design team was seamless. The final UI exceeded expectations!
Marketing Director, BrandReach
From code quality to communication, John delivers top-tier results every time.
Have a project in mind or just want to chat about code? Drop me a message, and let’s make things happen!
I'm always open to discussing new projects, creative ideas, or opportunities to be part of your vision.
Click below to send me an email directly:
Send EmailOr reach out directly at weiguang.li.dev@gmail.com