9.6.9 Framework Selection Guide
Learning Objectives
Section titled “Learning Objectives”- Learn to judge frameworks based on task structure, not popularity
- Build several of the most practical selection dimensions
- Understand a minimal framework scoring example
- Know when you should even delay using a framework at all
Why is framework selection essentially an architecture decision?
Section titled “Why is framework selection essentially an architecture decision?”Because once a framework is chosen, many things follow from it:
- Code organization
- Team learning cost
- Debugging approach
- Observability integration method
- Deployment and maintenance complexity
So it is not a trivial dependency. It is more like:
You are deciding how the system will grow.
That is also why “which one is hottest” is usually not the most important question.
First, look at the five most important selection dimensions
Section titled “First, look at the five most important selection dimensions”Is the task a complex state flow?
Section titled “Is the task a complex state flow?”If your system has:
- Clear branching
- Loops
- Rollbacks
- Explicit intermediate states
Then graph/workflow-style abstractions are more valuable.
Is the system knowledge / retrieval driven?
Section titled “Is the system knowledge / retrieval driven?”If the core challenges are:
- Document ingestion
- Indexing
- Retrieval
- Query organization
Then a knowledge-oriented framework will feel more natural.
Does the task naturally look like role collaboration?
Section titled “Does the task naturally look like role collaboration?”If the task is something like:
- Research
- Writing
- Review
Then team-role division makes a role-based framework a better fit.
What does the team care about more?
Section titled “What does the team care about more?”For example:
- Higher control
- Lower learning cost
- Faster prototyping
- More stable long-term maintenance
Is the project a demo or a long-term system?
Section titled “Is the project a demo or a long-term system?”This difference is very important.
- A demo values speed of setup
- A long-term system values clear structure and maintainability
A minimal selection scoring example
Section titled “A minimal selection scoring example”This example is not meant to give you a “standard answer.” It is here to teach you:
First spread out the task dimensions, then make the judgment.

frameworks = { "langgraph": {"stateful_flow": 9, "knowledge": 6, "role_collab": 6, "ease_of_start": 6}, "llamaindex": {"stateful_flow": 5, "knowledge": 9, "role_collab": 4, "ease_of_start": 7}, "crewai": {"stateful_flow": 5, "knowledge": 5, "role_collab": 9, "ease_of_start": 8}}
weights = { "stateful_flow": 0.35, "knowledge": 0.25, "role_collab": 0.20, "ease_of_start": 0.20}
def score(framework_info, weights): return sum(framework_info[k] * weights[k] for k in weights)
for name, info in frameworks.items(): print(name, "->", round(score(info, weights), 3))Expected output:
langgraph -> 7.05llamaindex -> 6.2crewai -> 6.4What really matters in this code is not the score
Section titled “What really matters in this code is not the score”What really matters is that you start asking:
- What does my system care about most?
- Why is this dimension weighted more heavily?
That is the framework-selection mindset itself.
Intuitive choices for several typical tasks
Section titled “Intuitive choices for several typical tasks”If you are building a complex state-flow Agent
Section titled “If you are building a complex state-flow Agent”Prioritize:
- Graph / workflow-style frameworks
Because you need more of:
- Explicit state
- Conditional edges
- Rollback and retry
If you are building around a knowledge base / RAG main line
Section titled “If you are building around a knowledge base / RAG main line”Prioritize:
- Retrieval- and knowledge-organization-oriented frameworks
Because your key problems are:
- How documents enter the system
- How retrieval is organized
If you are building a role-based multi-Agent prototype
Section titled “If you are building a role-based multi-Agent prototype”Prioritize:
- Team / role collaboration frameworks
Because what matters most here is:
- Natural expression of task division
- Clear role relationships
When should you avoid rushing into a complex framework?
Section titled “When should you avoid rushing into a complex framework?”A very common but easily overlooked case
Section titled “A very common but easily overlooked case”If your project is just:
- One model
- One tool
- One linear workflow
Then in many cases:
- Handwritten code
- Lightweight wrapping
Is already enough.
Why might that actually be better?
Section titled “Why might that actually be better?”Because frameworks bring:
- Learning cost
- Abstraction cost
- Debugging cost
If the system is still small, the framework may become extra overhead.
So remember this first:
Not every project needs “framework-ness.”
Why can’t team factors be ignored?
Section titled “Why can’t team factors be ignored?”A framework does not only serve an individual developer; it also affects the whole team:
- Is it easy for newcomers to get started?
- Is there enough community documentation?
- Is it easy to investigate issues?
- Will it be easy to maintain later?
A framework that is technically powerful may still have a high real-world cost if no one on the team knows it and the documentation is sparse.
So “team fit” is a very practical dimension in framework selection.
Several of the most common wrong ways to choose
Section titled “Several of the most common wrong ways to choose”Choosing what is most popular
Section titled “Choosing what is most popular”This is almost the most common misunderstanding.
Choosing what looks coolest in a demo
Section titled “Choosing what looks coolest in a demo”A good-looking demo does not mean it is suitable for a long-term system.
Choosing a framework before understanding the task structure
Section titled “Choosing a framework before understanding the task structure”This can turn into “forcing a framework onto the problem” instead of “choosing abstractions based on the problem.”
Expecting one framework to solve every problem
Section titled “Expecting one framework to solve every problem”In reality, many systems are naturally mixed:
- One style for the retrieval layer
- Another style for the workflow layer
A more practical selection order
Section titled “A more practical selection order”Instead of “listing frameworks first,” it is better to follow this path:
- First write out the main task flow
- Sketch the state flow or workflow
- Identify whether knowledge, tools, or roles are the dominant need
- Then choose the matching abstraction
This way, when you choose a framework, your basis will be much clearer.
Evidence to Keep
Section titled “Evidence to Keep”Keep this page’s proof of learning as a small evidence card:
- Problem Shape
- workflow graph, retrieval app, role team, or experiment
- Framework Choice
- what abstraction it adds and what control it hides
- Trace
- state, node, tool call, message, or run id
- Failure Check
- framework magic hides state, retries, or permissions
- Decision
- choose framework only after the single-agent loop is clear
Summary
Section titled “Summary”The most important thing in this section is not to find one “uniquely correct framework,” but to learn to:
First look at the shape of the task, then look at the shape of the framework.
When you start thinking in terms of state flow, knowledge organization, role collaboration, and team constraints, framework selection is no longer just about following trends.
Exercises
Section titled “Exercises”- For your current project, assign weights to the four dimensions: “state flow / knowledge organization / role collaboration / ease of getting started.”
- Think about this: why can forcing a complex framework onto a simple project actually make long-term progress slower?
- Explain in your own words why framework selection is an architecture decision, not a library choice.
- If your team values controllability and observability especially highly, what style of framework would you prioritize?
Project reference and review notes
- A practical weighting should start from the project’s main uncertainty. For a RAG-heavy app, knowledge organization may dominate; for a long-running Agent, state flow may dominate; for a team simulation, role collaboration may dominate.
- A complex framework can slow a simple project because learners must debug both the business logic and the framework abstraction. The extra machinery can hide the real failure point.
- Framework selection is an architecture decision because it shapes state, observability, testability, team workflow, deployment, and future migration cost. It is not just an import statement.
- For high controllability and observability, prioritize explicit graph/workflow designs, strong tracing, and clear state objects. Avoid abstractions that make the run loop hard to inspect.