ederign.me
Published on

Blog Series: Learning Agentic AI End-to-End

Authors

Two of my main goals for this year are to learn Agentic AI end-to-end and to embrace AI assistance in my daily life—both in coding and in studying. With that in mind, I decided to start this blog series based on the book "Agentic Design Patterns" by Antonio Gullí, using Claude as my research companion throughout the process.

Repository: github.com/ederign/Agentic-AI-end-to-end Note: These findings emerged from collaborative exploration with Claude (Anthropic), including hands-on implementation and documentation research.

What Are Agentic Design Patterns?

Agentic design patterns are reusable architectural approaches for building AI applications that go beyond simple prompt-response interactions. These patterns enable:

  • Multi-step reasoning - Breaking complex tasks into manageable steps
  • Tool usage - Integrating external capabilities (search, APIs, databases)
  • Self-correction - Evaluating and improving outputs
  • Autonomous workflows - Coordinating multiple AI components

The Three Approaches

This documentation series explores agentic AI design patterns and compares their implementation across three approaches:

  • OpenAI APIs - OpenAI-compatible APIs (Responses/Completions) with LlamaStack as infrastructure
  • LangChain - LangChain for orchestration with LlamaStack as infrastructure
  • ADK - Google's Agent Development Kit with LiteLLM as infrastructure

Architecture Overview

┌─────────────────────────────────────────────────────────────┐
Application Code└─────────────────────────┬───────────────────────────────────┘
┌─────────────────────────▼───────────────────────────────────┐
Orchestration Layer (choose one)│                                                             │
│   ┌──────────────┐  ┌──────────────┐    ┌──────────────┐    │
│   │  LangChain   │  │     ADK      │    │  Manual Code │    │
│   │              │  │              │    (OpenAI APIs) │    │
│   └──────────────┘  └──────────────┘    └──────────────┘    │
└─────────────────────────┬───────────────────────────────────┘
OpenAI-compatible API
┌─────────────────────────▼───────────────────────────────────┐
Infrastructure Layer│                                                             │
│   ┌────────────────────────┐  ┌────────────────────────┐    │
│   │       LlamaStack       │  │        LiteLLM         │    │
  (OpenAI APIs +        (ADK)           │    │
│   │   LangChain)           │  │                        │    │
│   └────────────────────────┘  └────────────────────────┘    │
└─────────────────────────┬───────────────────────────────────┘
┌─────────────────────────▼───────────────────────────────────┐
Model Providers│                                                             │
OpenAI  │  vLLM  │  OllamaTGIAnthropic...└─────────────────────────────────────────────────────────────┘

Approach Comparison

ApproachOrchestrationInfrastructureBest For
OpenAI APIsManualLlamaStackLearning fundamentals, full control
LangChainLangChain/LCELLlamaStackComplex workflows, rich abstractions
ADKGoogle ADKLiteLLMStructured agents, multi-agent systems

LlamaStack provides model freedom and data sovereignty. LangChain on top of LlamaStack gives you both rich orchestration and infrastructure flexibility. ADK offers a structured, agent-first approach with LiteLLM providing similar model flexibility.

Pattern Index

#PatternDescriptionStatus
1Prompt ChainingSequential prompt execution with output passingDone
2RoutingComing soonPlanned
3ParallelizationComing soonPlanned
4ReflectionComing soonPlanned
5TBDComing soonPlanned

Repository Structure

packages/
├── common/             # Shared utilities
└── patterns/           # All pattern implementations
    └── prompt_chaining/
        ├── raw.py      # OpenAI APIs (Responses/Completions)
        ├── langchain.py # LangChain + LlamaStack
        ├── adk.py      # ADK + LiteLLM
        └── run.py      # Unified CLI

Running Patterns

# Start LlamaStack (required for OpenAI APIs and LangChain approaches)
make llama-server

# Run prompt chaining with different approaches
make prompt-chaining-raw       # OpenAI APIs
make prompt-chaining-langchain # LangChain + LlamaStack
make prompt-chaining-adk       # ADK
make prompt-chaining-all       # Compare all three

References