AI Agent Architecture Patterns — ReAct, Plan-Execute, and Reflection Loops
Deep dive into core agent patterns: ReAct loops, Plan-Execute-Observe, reflection mechanisms, and preventing infinite loops with real TypeScript implementations.
webcoderspeed.com
9 articles
Deep dive into core agent patterns: ReAct loops, Plan-Execute-Observe, reflection mechanisms, and preventing infinite loops with real TypeScript implementations.
Master error detection, reflection prompting, alternative tool selection, human-in-the-loop escalation, and graceful degradation for production agents.
Master agent evaluation: trajectory analysis, tool accuracy, task completion rates, efficiency scoring, and LLM-as-judge evaluation frameworks.
Build memory systems for AI agents with in-context history, vector stores for semantic search, episodic memories of past interactions, and fact-based semantic knowledge.
Secure AI agents against prompt injection, indirect attacks via tool results, unauthorized tool use, and data exfiltration with sandboxing and audit logs.
Build code generation agents that parse specs, generate code with examples, validate syntax, run tests, and iterate until code passes.
Build multi-agent systems using supervisor-worker patterns, agent specialization, shared state management, and result aggregation with LangGraph.
Build research agents that search the web, score source credibility, deduplicate results, follow up on findings, and generate well-cited reports.
Master tool schema design, description engineering, error handling, idempotency, and tool versioning to build AI agent tools that agents actually want to use.