Back to Blog
EngineeringProduct

The 8-Layer AI Agent Stack: Why Most Platforms Only Give You Two

B
Balaji Viswanathan · Founder
·February 5, 2026·8 min read
The 8-Layer AI Agent Stack: Why Most Platforms Only Give You Two

Here's an uncomfortable truth about the AI agent ecosystem: most platforms are shipping incomplete products and hoping you won't notice.

We spent months analyzing 9 major platforms — Dify, CrewAI, n8n, Gumloop, Lindy, StackAI, Voiceflow, and others. We mapped every feature they offer against what enterprise AI applications actually require in production. The results were striking.

Every platform covers layers 1-2. Most cover layer 4. Almost none cover layers 5-8.

Those missing layers? They're exactly what separates a working demo from a production system your enterprise customers will trust.

The Full Stack

Here are all 8 layers, what they do, and why each one matters:

Layer 1: UI

What it does: Chat interfaces, forms, tables, dashboards — the surface your users interact with.

Why it matters: This is table stakes. Every platform offers some kind of UI. The difference is in the depth: Kapi ships 70+ production-tested UI patterns, not just a chatbot widget. Forms that capture structured input. Tables that display agent outputs. Dashboards that visualize trends. The UI layer isn't just "a chat box" — it's the entire interaction surface.

Tech: React + Next.js with composable components.

Layer 2: Graph

What it does: Agent orchestration — routing, planning, multi-agent coordination, state management.

Why it matters: Simple chatbots don't need this. But the moment you have an agent that needs to make decisions ("should I search the knowledge base or call an API?"), route between specialists ("this is a billing question, not a technical one"), or coordinate multiple agents, you need a graph layer.

Tech: LangGraph — the industry standard for agent orchestration.

Layer 3: Integrations

What it does: Connects your agent to the real world — CRM, email, Slack, Jira, Google Workspace, and 150+ other tools.

Why it matters: An agent that can only read and write text is a toy. An agent that can update your CRM, send an email, create a Jira ticket, or schedule a meeting is a product. Most platforms offer a handful of integrations. Kapi offers 150+ through Composio and MCP, configured once per workspace and available to every blueprint.

Tech: Composio + Model Context Protocol (MCP).

Layer 4: Knowledge

What it does: RAG pipeline — document upload, chunking, vector search, citation generation.

Why it matters: This is the most commonly supported layer after UI and Graph, because RAG is the most popular AI use case. But there's a massive difference between "we have RAG" and "we have production-grade RAG." Kapi supports advanced patterns: Self-RAG with reflection, CRAG with web fallback, multi-hop reasoning, and hybrid search that combines vector and keyword retrieval.

Tech: Azure AI Search with multiple retrieval strategies.


Here's where most platforms stop. Everything below is what separates demos from products.


Layer 5: Memory

What it does: Cross-session context — user preferences, entity memory, conversation history, key fact extraction.

Why it matters: Without memory, every conversation starts from zero. Your agent asks the same questions, forgets previous decisions, and treats returning users like strangers. Memory is what makes an agent feel intelligent rather than merely responsive.

Enterprise applications especially need this. When a support agent remembers that this customer had a billing issue last week, or when an HR agent remembers that this employee is in the London office, the interaction quality improves dramatically.

Tech: Built-in memory store + Mem0 for advanced entity memory.

Layer 6: HITL (Human-in-the-Loop)

What it does: Approval queues, escalation routing, review-before-send, audit trails.

Why it matters: This is the layer that makes enterprise adoption possible. Without proper human oversight, no CISO, no compliance officer, and no risk-conscious executive will approve deploying an AI agent in production.

HITL isn't "send a Slack notification." It's a formal governance layer with four distinct patterns:

  • Autonomous: Low-risk actions execute immediately
  • Approval: Human approves before execution
  • Review: Human edits output before sending
  • Escalation: Agent routes to human when confidence is low

Each pattern includes timeout handling, role-based routing, and a complete audit trail. Read our deep dive on HITL.

Tech: LangGraph interrupts with persistent approval queues.

Layer 7: Eval

What it does: Quality metrics, safety guardrails, faithfulness scoring, compliance checks.

Why it matters: Would you ship code without tests? Then why are we shipping AI agents without evaluation frameworks?

Kapi ships 18 evaluation criteria across four categories:

  • Core (6 criteria): Correctness, relevance, groundedness, faithfulness (RAGAS), context precision, answer relevance
  • Quality (3 criteria): Citations, coherence, completeness
  • Safety (3 criteria): PII detection, toxicity, prompt injection defense
  • Compliance (6 criteria): EU AI Act transparency, human oversight, bias & fairness, data protection, NIST AI RMF, documentation

These run on every interaction — not just during development. Explore the full eval system.

Tech: 5 evaluator engines including LLM-as-Judge, semantic similarity, and human review queues.

Layer 8: Observability

What it does: Full tracing, cost tracking per interaction, latency monitoring, debugging tools.

Why it matters: When your agent starts behaving differently — and it will — you need to know immediately. Not from customer complaints. From automated monitoring.

Observability gives you:

  • Run timelines: Step-by-step breakdown of every agent action
  • Cost tracking: Token usage and dollar cost per interaction
  • Latency: Per-step timing to identify bottlenecks
  • Debug traces: Full context for troubleshooting failures

Tech: Langfuse integration, always-on by default.

The Competitive Gap

Here's what the landscape actually looks like:

Layer Kapi Dify CrewAI n8n Gumloop
1. UI Full suite Chat only None Basic Chat only
2. Graph LangGraph Basic Multi-agent Workflow Basic
3. Integrations 150+ Limited Limited 400+ 100+
4. Knowledge Advanced RAG Basic RAG Basic Via nodes Basic
5. Memory Cross-session None None None None
6. HITL 4 patterns None None None None
7. Eval 18 criteria None Basic None None
8. Observability Full tracing Basic None None None

n8n wins on raw integration count. But integrations without memory, HITL, evals, and observability is like having a car with a powerful engine but no brakes, no dashboard, and no seatbelts.

Why This Architecture

This isn't arbitrary. The 8-layer stack is derived from analysis of cognitive architectures — SOAR, ACT-R, and BDI (Belief-Desire-Intention) — adapted for the specific challenges of enterprise AI agents.

Cognitive science tells us that intelligent behavior requires: perception (UI), reasoning (Graph), action (Integrations), knowledge (Knowledge), memory (Memory), metacognition (Eval), and monitoring (Observability). HITL is our addition — because unlike human cognition, AI systems need external oversight.

What This Means for You

If you're evaluating AI agent platforms, ask one question: which layers do they actually ship?

If the answer is "UI + Graph + maybe RAG," you're looking at a demo platform. You'll need to build layers 5-8 yourself — or more likely, you'll skip them entirely and wonder why your agent fails in production.

If you want the full stack from day one, with every layer configurable and every line of code exportable — start a project on Kapi.


Every Kapi blueprint ships all 8 layers. Toggle what you need, deploy in 30 seconds, export full source code when you're ready.

Build AI products with confidence

Spec-driven development, built-in evaluations, and portable manifests.