David Baddiel Tries to Understand is a BBC Radio 4 series where David explores a topic suggested by someone. After research, he shares his understanding back to them. Inspired by this, today’s post should, perhaps, be called Phil Tries to Understand AI Agents. Nvidia’s CEO says, The age of AI Agentics is here. That sounds important, I thought. Hence, this week I’m asking a rhetorical question: What are AI agents and how would I go about building one? Time to channel my inner Radio 4 presenter.
Types of AI apps
Workflows are best suited for predictable, structured tasks, whereas agents excel in flexible and adaptive environments. - Anthropic
AI apps are software programs that use artificial intelligence techniques, e.g. natural language processing, to perform tasks that typically require human intelligence, e.g. ChatGPT. AI apps are of two types:
AI Workflows follow predefined paths with rigidly encoded logic and tool use, executing tasks in a structured manner, e.g. customer support chatbot that follows a strict decision tree.
AI Agents autonomously manage their processes, making dynamic decisions to accomplish tasks, e.g. AI powered research assistant that searches databases, summarises findings and refines answers based on feedback.
Simplicity as a design principle
Everything should be made as simple as possible, but not simpler. - Albert Einstein
When developing AI apps, it is tempting to build complex systems. However, simplicity is the most effective design principle. Overly complex AI Agents are slow, costly and hard to debug.
Anthropic, Claude.ai makers, advise, Start with the simplest solution that works and add complexity only when absolutely necessary. In AI app design, workflows should be prioritised for structured, predictable tasks, while agents should only be introduced when a problem demands flexibility and autonomy. Developers should resist the urge to implement agents when a straightforward script or deterministic model can achieve the desired outcome.
Common design patterns for AI Agents
By leveraging well established agentic patterns, developers can design systems that are both scalable and maintainable. - Anthropic
To build effective AI Agents, developers often use a set of established design patterns, including:
Augmented LLMs: Enhances large language models (LLMs) with additional tools such as retrieval augmented generation (RAG) and memory. The model pulls relevant data dynamically rather than relying solely on training data.
Prompt Chaining: Instead of a single LLM call attempting to solve a complex problem, tasks are broken into sequential steps where each prompt builds on the previous response. Reasoning is more effective and traceable.
Routing Systems: An AI Agent classifies inputs and directs them to subprocesses. Useful in multi functional systems where different requests require different workflows.
Orchestrator Worker Model: A central AI (orchestrator) breaks a task into smaller subtasks, assigns them to specialised worker models and then synthesises the results. Effective for complex problem solving.
Evaluator Optimiser Loops: One model generates responses, while another evaluates and refines them iteratively. Commonly used in self improving AI agents that optimise their own performance over time.
AI Agent development tools
Black box AI leads to black box decisions. If we want reliable AI, we need visibility into its reasoning. - Sam Altman
Tools and frameworks to build and deploy AI Agents include:
Hugging Face Transformers: The most widely used framework for integrating pre-trained language models into AI systems. Has become an industry standard with broad adoption in research and production applications.
Make.com: Workflow automation tool. Primarily used in broader automation contexts rather than AI agent development specifically. It integrates AI agents into business processes effectively. I find it intuitive.
LangChain: Framework for building LLM powered applications, heavily used for implementing reasoning, memory and tool usage in AI agents.
OpenAI's Function Calling: A rapidly growing tool for improving LLM interactivity with APIs and external systems. Widely used in OpenAI’s ecosystem for structuring AI interactions.
By leveraging these tools with appropriate design patterns, developers build reliable, scalable and useful AI agents.
Other resources
Vertical AI Agents Could be 10x Bigger than SaaS talk by Y Combinator
Blockchain: Fad or future? post by Phil Martin
My 5 Step Learning Process post by Phil Martin
When David Baddiel plays back his understanding, he has a topic expert listening in who gives him a score out of 10. How would you score my answer?
Have fun.
Phil…