Agent Development for Beginners: Do You Need an Orchestration Framework or a Model Integration Framework First?
This article breaks down the layers of an agent application—model integration, context and prompting, orchestration and state, and runtime governance—to answer whether beginners should learn graph orchestration frameworks or general LLM application frameworks first. It explains that the two are not competing choices but complementary layers, then outlines a five-stage learning path from basic model calls to observability, along with common pitfalls and a minimal code example.
1. Where the Question Comes From: A Common Beginner’s Dilemma
Almost everyone new to agent development runs into the same confusion: graph-based workflows are everywhere these days, so do I still need to learn a general-purpose framework for building applications around large language models?
The confusion comes from mixing up layers. An agent application is not a single technique. It is a full chain that spans model integration, prompt organization, context management, tool calling, workflow orchestration, state transitions, and runtime monitoring. Graph orchestration is only one layer of that chain. It answers how nodes connect, how state is passed, and how loops terminate. A general model application framework answers a different set of questions: how to wrap calls to different models in a unified way, how to organize prompts and messages, how to parse structured output, and how to plug in retrieval and tools.
So the answer is not either/or. Understand the layers first, then choose your learning order based on your goal.
2. Breaking Down the Stack: Four Layers of an Agent Application
1. Model Integration Layer
This layer hides the differences between model services in authentication, request formats, streaming responses, and error codes, so that upper layers can issue calls in a uniform way. Beginners who hand-assemble raw API requests quickly get bogged down in retries, timeouts, rate limits, and stream parsing.
2. Context and Prompt Layer
This includes prompt templates, message roles (system, user, assistant, tool result), history trimming, summary compression, and retrieval augmentation. It determines what the model actually sees and directly affects output quality.
3. Orchestration and State Layer
This turns a single call into a multi-step flow: conditional branching, parallel execution, reflective loops, human-in-the-loop steps, and failure rollback. Graph structures are used here because they naturally express flows that are stateful, loopable, and conditionally routed.
4. Runtime and Governance Layer
Logging, tracing, evaluation, cost tracking, sensitive-data filtering, and access control. This layer is often ignored during prototyping, but once a system reaches production, it determines whether the system can be operated and audited.
3. What a General Model Application Framework Actually Teaches You
The core value of a general framework for building LLM applications is abstraction and reuse. It packages repetitive work—organizing prompts, constructing messages, parsing output, describing tools, assembling retrieval results—into structured objects, so you do not hand-write string concatenation and API adaptation every time.
One common misconception needs clearing up: this kind of framework is not a model, and it does not replace model providers. It is closer to a developer toolkit that sits between the model and application logic. By analogy, the model is the brain, and the framework is the nervous system that connects the brain to the outside world.
What you gain from learning it is three transferable capabilities:
- A unified calling pattern: switching models requires minimal changes, which makes canary releases and fallback easier;
- Structured data contracts: prompts, messages, and tool results are all objects, which makes testing easier;
- A reusable component ecosystem: retrieval, memory, output validation, and similar scenarios do not have to be built from scratch.
4. What Graph Orchestration Frameworks Solve
Graph orchestration frameworks focus on flow topology. They decompose an agent into nodes (model calls, tool execution, conditional checks) and edges (state transitions), with shared state defined explicitly. They are good at handling:
- reflective loops and retries that require iteration;
- multi-path decisions that require conditional branching;
- interruptions and resumptions that require human approval;
- tasks that fan out in parallel and then converge.
What they usually do not do is decide for you how to integrate the model, how to write prompts, or how to chunk documents. Those still belong to the model integration layer and the context layer.
5. Conclusion: Not Replacement, but Layered Collaboration
Treating the two as opposites is the most common misjudgment at the beginner stage. A more accurate framing:
- A graph orchestration framework is the process skeleton;
- A model application framework is the capability component library;
- The two can collaborate in the same project, or you can use only one layer.
If your scenario is single-turn Q&A with simple retrieval, mastering model integration and prompt organization is enough. If you have a multi-step, loopable business flow that needs human intervention, adding graph orchestration pays off clearly.
6. A Phased Learning Path
Stage 1: Build solid model-calling fundamentals. Be able to hand-write a call with a system prompt, history messages, and streaming output, and understand general concepts such as temperature, maximum output length, and structured output.
Stage 2: Master context engineering. Learn templated prompts, history-trimming strategies, and reranking and assembly of retrieval results, and build the intuition that input determines output.
Stage 3: Introduce tool calling and state management. Understand how tool descriptions influence model selection, and learn to pass intermediate results between steps with shared state.
Stage 4: Adopt graph orchestration and refactor the flow. Rewrite the earlier linear code into nodes and edges, and fill in loop termination conditions, exception rollback, and interruption recovery.
Stage 5: Add the governance layer. Introduce log tracing, an offline evaluation set, cost tracking, and access checks so the system becomes operable.
7. A Minimal Runnable Sketch
The code below only illustrates the layered idea and is not tied to any specific vendor API:
# Pseudocode: model integration layer + orchestration layer working togetherdef call_model(messages, model_cfg):# Unified wrapper for auth, timeout, retry, and stream parsingreturn model_client.chat(messages, **model_cfg)def node_retrieve(state):docs = vector_store.search(state["query"], top_k=4)return {"context": docs}def node_answer(state):prompt = template.render(question=state["query"], context=state["context"])reply = call_model([{"role": "user", "content": prompt}], MODEL_CFG)return {"answer": reply}# Graph orchestration: retrieve -> answer -> end; a reflection loop can be added heregraph = Graph(state_schema=State)graph.add_node("retrieve", node_retrieve)graph.add_node("answer", node_answer)graph.add_edge("retrieve", "answer")
The point of this example is not the syntax. It is to show that model calls are consolidated in one place, the flow is expressed explicitly in another, and the responsibilities of each are clear.
8. Common Pitfalls and How to Avoid Them
- Pitfall 1: Learning the framework first and filling in fundamentals later. You end up knowing the framework API but still stuck when facing rate limits, truncation, or malformed formats. Avoid it: hand-write one raw call first.
- Pitfall 2: Treating prompts as business logic. Avoid it: put prompt templates under version control and build an evaluation set.
- Pitfall 3: Introducing complex orchestration too early. Avoid it: get a linear flow working end to end first, then add branches and loops gradually.
- Pitfall 4: Ignoring observability. Avoid it: log input summaries, latency, and failure reasons from day one.
9. Additional Considerations for Enterprise Deployment
In an enterprise environment, beyond functionality you also need to consider the stability and fallback strategy of model services, sensitive-data masking, call quotas and cost management, and building a reliable runtime foundation with general cloud capabilities such as object storage, message queues, container platforms, log services, and monitoring and alerting. Baidu AI Cloud is typically used to carry these general capabilities in such scenarios, but the specific choice should still be based on business metrics and evaluation results, not framework popularity.
10. Summary
Back to the original question: if you have learned graph orchestration, do you still need to learn a model application framework? Yes, but there is no need to treat them as competitors. Build hard fundamentals in model calling and context engineering first, let graph orchestration carry complex flows, and then fill in governance and evaluation. This path is the friendliest for beginners and the least likely to require rework.
