Oğuz Erol Full-Page Visual System Explainers
07 / 10 All Explainers (10) oguzerol.com Türkçe

The Modern AI Ecosystem: How 10 Layers Work Together

An architectural map of all 10 AI stack layers, from foundation models and unified agent frameworks through RAG, MCP, state, guardrails, observability, and durable workflows.

Central Execution Spine Core Request & Harness Bus

10 Color-Coded Ecosystem Layers

Data contracts, responsibilities & ecosystem tools
Prompt → Plan01
01

Foundation Models (LLM & Multimodal)

Reasoning & synthesis: Receives prompt and context → emits plans, tool calls, or structured text/JSON.
OpenAI GPTAnthropic ClaudeGoogle GeminiMeta LlamaMistralvLLMOllama
Loop & Handoff02
02

Agent & Orchestration Frameworks

Single loop & multi-role handoffs: Runs the loop → governs tool turns, state transitions, and multi-agent routing.
LangGraphClaude Agent SDKOpenAI Agents SDKGoogle ADKPydanticAICrewAIAutoGen
Docs → Chunks03
03

Document Parsing & RAG Pipelines

Chunking & cited retrieval: Parses PDFs, tables, and policies → returns clean chunks with source metadata.
LlamaIndexHaystackDSPyRAGFlowDocling
Semantic Score04
04

Embeddings & Reranking

Semantic similarity scoring: Turns text into vectors → re-ranks candidate passages by true semantic relevance.
OpenAI EmbeddingsCohere Embed & RerankVoyage AIBGE
Evidence Index05
05

Hybrid Search & Vector Stores

BM25 + Vector indexing: Combines exact keyword filters and vector search → returns permissioned evidence.
PostgreSQL pgvectorQdrantWeaviatePineconeElasticsearch
Typed Tools06
06

Tool & Context Protocol (MCP)

Standardized tool & API access: Accepts schema-typed calls → connects safely to databases, files, and ERP APIs.
MCP SDKFastMCPPostgreSQL MCPFilesystem MCPGitHub / Slack MCP
Checkpoints07
07

Memory & State Management

Session state & crash recovery: Persists step checkpoints → enables crash recovery and cross-turn working memory.
RedisPostgreSQLLangGraph CheckpointerZepMem0
Policy & Mask08
08

Security, Permissions & Guardrails

Auth, PII masking & defense: Inspects inputs/actions → masks PII, isolates sandboxes, and blocks unsafe writes.
ACL / SandboxMicrosoft PresidioNeMo GuardrailsLakera Guard
Trace & Eval09
09

Observability & Evaluations

Traces, cost & regression evals: Captures full trace spans → measures latency, token cost, and offline eval accuracy.
LangSmithLangfuseArize PhoenixPromptfooOpenTelemetry
Queue & Retry10
10

Durable Workflows & Scheduling

Long jobs, retries & queues: Coordinates retries, timers, and human-in-the-loop queues across long-running jobs.
TemporalCloudflare WorkflowsPrefectApache AirflowMake

Signal Flow Across Layers in a Single Customer Request

01RequestCustomer order or return inquiry enters
02(08) Input GuardrailAuth, prompt-injection & PII checks run
03(02+01) Agent & Model PlanFramework + LLM draft step-by-step plan
04(03+04+05) RAG EvidenceHybrid search retrieves cited policy clauses
05(06) ERP Read via MCPLive order & stock read via typed schema
06(07) Checkpoint SaveIntermediate state persisted to SQL/Redis
07(10) Approval QueueWrite action pauses in durable human queue
08(09) Trace & Cost LogSpans, latency, and eval cost recorded