From: aidotengineer
The landscape of AI engineering is rapidly evolving, with a key debate centering on the best approach to building AI agents: using established frameworks or focusing on fundamental AI primitives. Many production-ready AI agents are notably not built on top of AI frameworks [01:16:11].
The Case Against AI Frameworks
According to Ahmed, frameworks for AI agents often present several issues:
- They don’t add significant value [01:21:38].
- They are “bloated” [01:23:09].
- They move “super slowly” in a fast-evolving space [01:24:99], [02:54:26].
- They are “filled with these abstractions that nobody really needs” [01:27:01].
- Frameworks can be hard to debug [05:05:07].
- They can lead to difficulty in migrating off abstractions when LLMs improve at agentic workflows [01:19:00], [01:54:26].
Instead of frameworks, the recommendation is to build on top of AI primitives [01:31:00].
The Power of AI Primitives
AI primitives are described as fundamental, low-level building blocks for AI agents [02:46:00], [03:56:00]. They offer several advantages:
- Native Scalability: Primitives possess a “native ability of working really, really well in production” and can scale massively, much like Amazon S3 [02:29:00], [02:46:00]. When AI primitives are composable and cloud-integrated (e.g., memory with an auto-scaling vector store), they enable serverless AI agents that handle heavy lifting automatically [05:15:00], [05:22:00], [05:35:00], [05:44:00].
- Simplicity and Composability: They are simple, low-level components that can be used to build a wide variety of solutions [02:46:00], [02:47:00].
- Faster Development: Building on predefined, highly scalable, and composable AI primitives is presented as the fastest way to build a production-ready AI agent [04:48:00], [05:15:00].
- Flexibility: Primitives allow engineers to build their own custom “AI framework” on top of them, avoiding the constraints of a pre-built, bloated framework [01:59:00].
Examples of AI Primitives
Core AI primitives highlighted include:
- Memory: An autonomous “rag engine” or long-term memory, often incorporating a vector store, capable of handling terabytes of data for similarity searches [05:24:00], [10:28:00], [12:17:00].
- Threads: For storing and managing context and conversation history within an agent [04:01:00], [10:35:00], [11:41:00]. This includes “scratch pad” functionality for temporary context [11:58:00].
- Parser: To extract context from various data formats (e.g., PDF to text) [08:14:00], [10:41:00].
- Chunker: To split extracted context into smaller, manageable pieces for efficient processing [08:20:00], [10:44:00].
- Tools Infrastructure: The ability to automatically call tools and connect to APIs (e.g., MCPS) [11:33:00], [13:37:00].
Building AI Agents with Primitives
The core idea is that an AI agent is a “new way of writing code” [03:32:00], and it’s large enough that a single framework abstraction might not suffice [03:48:00]. Instead, focus on small, reusable building blocks [03:56:00].
Most engineers are expected to transition into AI engineering roles, needing efficient ways to build and ship AI products [04:17:00], [04:29:00], [04:40:00].
Chai, a platform, demonstrates building AI agents without frameworks by providing AI primitives to streamline the process [00:34:00], [02:28:00], [02:32:00], [05:28:00].
Common AI Agent Architectures using Primitives
Different architectures for AI agents can be built purely with AI primitives:
- Augmented LLM: An agent that takes input, generates output using an LLM, and has access to tools, threads, and memory [11:18:00].
- Prompt Chaining and Composition: Multiple agents work together sequentially, where one agent’s output influences the next [13:06:00].
- Agent Router / LLM Router: An agent or LLM that decides which other specialized agent should be called next based on the input task (e.g., summary, reasoning, coding) [14:00:00], [14:24:00].
- Parallel Agents: Multiple agents run simultaneously to process different aspects of an input, often managed using JavaScript’s
Promise.all
[16:47:00]. - Agent Orchestrator Worker: An orchestrator agent plans and creates subtasks, which are then distributed to multiple worker agents for execution, with another agent synthesizing the results [17:10:00], [17:36:00]. This pattern is common in deep research agent architectures [17:30:00].
- Evaluator Optimizer: An agent generates content (e.g., marketing copy), and a separate LLM acts as a “judge” to evaluate it, providing feedback for optimization if rejected [20:08:00].
- Memory Agent (RAG): An agent that uploads data to a memory primitive (like a vector store), retrieves relevant information, and then answers questions based on that data [21:50:00], [21:59:00].
These patterns illustrate how AI primitives enable the creation of complex and specialized AI agents without relying on cumbersome frameworks [22:24:00]. This approach covers approximately 80% of the most intricate AI agents [22:29:00].
Conclusion
In a rapidly evolving AI landscape where new paradigms and LLMs emerge frequently [02:54:26], AI primitives offer a more stable and flexible foundation for AI native development patterns [02:54:26], [02:57:00]. The argument is to build AI agents on top of these robust, pre-built, or custom-developed primitives, avoiding unnecessary abstractions that can hinder scalability and adaptability [02:57:00], [03:00:00].