AI Agent Development: Should You Learn a Foundational LLM Framework First?

    Understand how foundational LLM application frameworks and graph-based agent orchestration frameworks work together. This article explains their responsibilities, outlines a practical learning path from direct API calls to stateful workflows, and highlights key considerations for dependencies, observability, and modular design.

    1. Why This Question Comes Up

    Developers getting started with AI agents often encounter frameworks that use graphs to orchestrate workflows. This raises a reasonable question: can you skip foundational LLM application frameworks and start directly with graph-based orchestration?

    Another common source of confusion appears in the code itself. Even when using an orchestration framework, developers frequently rely on components and abstractions from a foundational framework. Is this a sign that the frameworks are being used incorrectly, or is it how they are intended to work together?

    To answer these questions, it helps to understand the role each layer plays in an LLM application.

    2. What Foundational LLM Application Frameworks Do

    An LLM is a powerful component, but at the level of an individual inference call, it receives input and produces output. Building a real application around it requires additional engineering: managing prompt templates, assembling and trimming context, persisting conversation history, connecting external data, and parsing and validating model responses.

    A foundational LLM application framework provides a toolkit for these tasks. It is not a model and does not replace a model provider. Instead, it offers structured abstractions such as:

    • Model invocation wrappers: Provide consistent interfaces across model services, reducing the effort required to switch between them.
    • Prompt templates: Organize prompts using reusable templates and variables rather than scattered string concatenation.
    • Chaining: Formalize sequences such as formatting a prompt, calling a model, parsing the response, and passing the result to the next step.
    • Memory mechanisms: Maintain conversation history and context state.
    • Tool calling: Allow the model to request external function or API calls, giving the application the ability to take action.
    • Retrieval augmentation: Connect vector databases and document-processing components to incorporate external data, such as internal organizational knowledge.

    One useful analogy is that the model is the brain, while the foundational framework provides connections to memory, senses, and actions. Intelligence alone is not enough to complete complex tasks in a real application; it needs supporting infrastructure.

    3. How Agent Orchestration and Foundational Frameworks Fit Together

    For straightforward question-answering or summarization applications, the abstractions in a foundational framework are often sufficient.

    Agent development introduces more complex requirements. An agent may involve multiple reasoning steps, repeated decisions, conditional branches, failure retries, and human-in-the-loop review. Expressing these nonlinear workflows as a flat chain can become cumbersome.

    Graph-based orchestration frameworks address this problem by modeling workflows as state graphs, using nodes and edges to represent execution steps and transitions. This structure supports branching, loops, and state persistence.

    The key distinction is that orchestration frameworks and foundational frameworks serve complementary roles rather than competing ones. Many orchestration frameworks build on or integrate with foundational framework components.

    In a typical implementation:

    • The orchestration layer controls which node runs next and how state moves through the workflow.
    • The components inside each node handle prompt construction, model invocation, tool binding, and output parsing.

    Using foundational framework components within an orchestration framework is therefore not a mistake. It is a normal and recommended way to combine the two layers.

    The orchestration framework answers, “How should the workflow proceed?” The foundational framework answers, “How should each step be implemented?” Together, they form a complete application stack.

    4. A Practical Learning Path

    Beginners who start directly with an orchestration framework may struggle because concepts such as message structures, tool binding, and state management often rely on underlying abstractions.

    A more gradual learning path helps build that understanding.

    Step 1: Learn the Basics of Model API Calls

    Start without a framework. Read the model provider’s API documentation and make a basic inference call directly.

    Learn how message lists, roles, and parameters such as temperature work. The goal is to develop an intuition for the underlying interface so that, when you introduce a framework, you understand what it handles on your behalf.

    Step 2: Learn the Core Abstractions of a Foundational Framework

    Focus on prompt templates, chains, output parsing, conversation memory, and tool calling.

    Build a small project, such as a conversational assistant that can retrieve real-time data. This gives you practice combining four essential elements: prompts, a model, tools, and memory.

    Step 3: Understand Basic Agent Design Patterns

    Study patterns such as:

    • The ReAct-style reasoning–action–observation loop.
    • Role assignment and message passing in multi-agent collaboration.
    • Structured responses associated with function calling.

    At this stage, prioritize the ideas behind these patterns rather than tying your understanding to one implementation.

    Step 4: Move to Graph-Based Orchestration

    Migrate the agent logic you have already built into a graph structure. Learn orchestration concepts such as nodes, edges, conditional routing, and checkpoint persistence.

    Much of your existing knowledge about foundational components will carry over, making the learning curve easier to manage.

    The following pseudocode illustrates how the two layers work together:

    1. # Pseudocode: an agent node in a graph-based workflow
    2. def agent_node(state):
    3. # The prompt comes from a foundational framework component
    4. prompt = chat_template.format(
    5. history=state["messages"],
    6. tools=tool_descriptions
    7. )
    8. # Model invocation and tool binding also use foundational abstractions
    9. result = llm_with_tools.invoke(prompt)
    10. # Return a state update; the orchestration framework handles the next route
    11. return {"messages": state["messages"] + [result]}

    The node uses foundational components to perform its work, then returns an update that the orchestration layer uses to continue the workflow.

    5. Practical Considerations

    Do Not Use a Framework Just for Its Own Sake

    If the requirement is simply a single-turn question-and-answer interaction, a direct API call may be enough.

    Introduce an orchestration layer when the application needs capabilities such as conditional branching, state management, or human intervention.

    Review Dependencies in AI-Generated Code

    AI-assisted code generation can speed up development, but generated code may introduce dependencies that are not immediately obvious.

    Review those dependencies manually and understand each component’s responsibility. Otherwise, debugging can become difficult because it is unclear which layer is causing the failure.

    Make Observability a Priority

    Agent workflows contain multiple steps and may follow different execution paths. Logs and call traces are essential for diagnosing problems.

    General-purpose monitoring components can help make workflow behavior visible and easier to investigate.

    Separate Business Logic from Orchestration Logic

    Keep prompts, tool definitions, and domain rules in separate modules.

    This separation allows you to adjust the workflow without unnecessarily changing business logic, and to update business behavior without rewriting the orchestration structure.

    Conclusion

    Learning the foundations is worthwhile before moving into agent orchestration. An orchestration framework is not a replacement for foundational LLM application components; it provides a higher-level abstraction for coordinating them.

    A practical sequence is to understand model API calls first, learn core component abstractions next, and then move on to agent patterns and graph-based workflows.

    With a clear understanding of these layers, you can approach different agent development frameworks more confidently and recognize which part of the stack is responsible for each task.