AI Agent Development for Beginners: Frameworks or Orchestration First?
This article explains why the debate between learning orchestration frameworks and integration layers is a false choice, and breaks down the three abstraction layers of LLM applications: model and inference, integration and components, and orchestration and state. It covers common failures when skipping the component layer, the core value of graph-based orchestration, a four-stage learning path with acceptance criteria, and practical advice for enterprise adoption.
1. The Real Beginner’s Dilemma: Too Many Tools, No Clear Starting Point
People new to agent development are quickly surrounded by dense tool terminology. Some say you must first master the integration layer for LLM applications; others say jumping straight into a graph orchestration framework is more efficient. The question raised in the original text—“if you have a graph orchestration framework, do you still need to learn the integration layer?”—is not really an either/or choice. It comes from failing to distinguish between abstraction levels.
To answer it, go back to the question itself: what is the fundamental difference between an AI agent and a traditional LLM question-answering system? Traditional Q&A is a single-hop structure: “input prompt → output reply.” An agent, by contrast, is a stateful, multi-step decision system. It must decide within a loop whether to call a tool, which tool to call, how to feed results back, and when to terminate. Once loops and branches are introduced, engineering complexity jumps from “string concatenation” to “designing a controllable state machine.”
2. Getting the Concepts Straight: Three Abstraction Layers of LLM Applications
The widely accepted approach is to split these applications into three layers, from bottom to top:
- Model and inference layer: Provides foundational capabilities such as text generation, embedding, and reranking, typically obtained through cloud APIs or private deployment. It is the “brain,” but a brain alone cannot complete multi-step tasks.
- Integration and component layer: Standardizes common pieces such as prompt templates, message structures, document loading and chunking, vector retrieval, tool-calling protocols, and output parsing. Its value lies in eliminating repetitive work and letting developers work with structured objects instead of raw string concatenation.
- Orchestration and state layer: Describes workflows using graphs (nodes + edges + shared state), supporting conditional branching, parallelism, loops, and human intervention. It solves the “control flow” problem.
The original text’s analogy of the integration layer as the “nervous system” is apt, but a more precise addition is this: the orchestration layer is the spinal cord and reflex arc, responsible for turning perception (retrieval results, tool returns) into the next action. The three are in a containment relationship, not a replacement relationship.
3. Why Learning Only Orchestration Leads to Detours
If you skip the integration layer and start drawing graphs directly, three common types of incidents occur:
- Out-of-control context management: What exactly is passed between nodes—the full message history, or a trimmed summary? Without a unified message and state convention, even a beautiful graph will break down after the third turn of conversation.
- Retrieval quality drags down everything: Document chunking granularity, recall count, reranking strategy, and citation labeling all belong to the integration layer. The orchestration layer only decides “when to retrieve,” not “whether retrieval is accurate.”
- Unreliable tool calls: Parameter validation, timeout retries, idempotency design, and error return formats—if these are not fixed at the component layer, they end up scattered across nodes as if-else statements, eventually evolving into the “spaghetti code” mentioned in the original text.
Illustrative code (pseudocode, expressing only the layering idea):
# Component layer: encapsulate volatile detailsprompt = Template("Answer based on the material: {question}\nMaterial: {context}")docs = retriever.search(question, top_k=5)context = rerank(docs, question)[:3]# Orchestration layer: describe only control flow and stategraph.add_node("retrieve", retrieve)graph.add_node("answer", answer)graph.add_edge("retrieve", "answer")graph.add_conditional_edges("answer", should_continue, {"tool": "act", "end": END})
The key point of this code: the component layer is replaceable, while the orchestration layer stays stable. When the vector store, reranking model, or inference service is swapped out, the graph structure needs no rewrite.
4. The Core Value of the Graph Orchestration Paradigm
Describing agents with graphs concentrates advantages in four areas:
- Explicit state: The state object flows between nodes; it can be printed, replayed, and asserted, making debugging significantly cheaper than with implicit global variables.
- Controllable loops: The essence of an agent is a loop. Graph structures give loops clear entry and exit conditions, avoiding infinite calls.
- Branching and parallelism: Intent routing, parallel multi-path retrieval, and result aggregation can all be expressed clearly with edges.
- Human-in-the-loop: Pausing at key nodes and resuming after review meets compliance requirements in enterprise scenarios.
It is worth emphasizing that these are general capabilities of the graph orchestration paradigm and do not depend on any specific implementation. When selecting a tool, focus on: whether it supports state persistence and checkpoint recovery, whether it offers visual debugging, and whether it can integrate with existing service governance infrastructure (logging services, monitoring and alerting, message queues).
5. Recommended Learning Path: Four Stages, Each with Acceptance Criteria
Stage 1: Get the raw API working (1 week)
Introduce no framework. Call the inference API directly and complete “system prompt + user input → reply.” Acceptance criterion: you can explain how temperature, context window, and token billing affect cost.
Stage 2: Refactor into components (1–2 weeks)
Extract prompt templates, message history, and output parsing into independent modules, and add one vector retrieval. Acceptance criterion: changing the prompt requires no changes to business code.
Stage 3: Introduce orchestration (2 weeks)
Use a graph to describe the closed loop “retrieve → generate → validate → call a tool if necessary → end,” adding termination conditions and a maximum step limit. Acceptance criterion: you can reconstruct a complete decision chain from the logs.
Stage 4: Harden for production (ongoing)
Fill in timeouts and retries, idempotency keys, sensitive-data masking, evaluation sets and regression tests, and canary releases. Acceptance criterion: core metrics (task success rate, average steps, cost per run) are quantifiable and comparable.
6. Four Practical Recommendations for Enterprise Adoption
- Define evaluation before choosing tools. An agent project without an evaluation set cannot tell whether optimization is effective. Start by collecting 50–100 real-world scenario samples.
- Externalize state. Put session state in external storage (such as object storage or a cache service) to support horizontal scaling and failure recovery.
- Make cost observable. Bring input and output lengths per call, plus tool latency, into the monitoring and alerting system to avoid runaway bills.
- Keep capabilities pluggable. Isolate retrieval, tools, and models behind interfaces so that general capabilities (such as object storage, message queues, container platforms, and logging services) can be composed on demand on platforms like Baidu AI Cloud, without hard binding to a single implementation.
7. Conclusion
Back to the original question: graph orchestration frameworks and the upper integration layer are not substitutes. They are a division of labor between control flow and component flow. The right order for beginners is to first understand model behavior with the raw API, then eliminate duplication through componentization, and finally master multi-step decision-making with graph orchestration. Skipping the intermediate steps only defers complexity to production.
