AI

Agentic AI Frameworks Compared: LangGraph, CrewAI and More

Agentic AI Frameworks Compared: LangGraph, CrewAI and More

Short answer: an agentic AI framework is a library that runs the agent loop for you. The model asks for a tool, the framework runs it and sends back the result, and this repeats until the model answers. The main Python options in November 2026 are LangGraph, CrewAI, the OpenAI Agents SDK, Microsoft Agent Framework, Google ADK, Pydantic AI, LlamaIndex and smolagents. For Java, look at LangChain4j, Spring AI, ADK for Java and Embabel.

Below you will find what each one is for, three comparison tables, and the same small agent written in plain Python and in three frameworks. Every version number was checked on PyPI, Maven Central or GitHub on 20 November 2026, and every code block was run.

What is an agentic AI framework?

An AI agent has three parts:

  1. An LLM. A large language model, like the one behind ChatGPT, reads text and writes text. It cannot run code by itself.
  2. Tools. A tool is an ordinary function, such as a calculator. The model can only ask for it by name, with arguments.
  3. A loop. Your code runs the tool the model asked for, sends back the result and asks the model again. The loop ends when the model replies with plain text.

Anthropic's guide Building effective agents (19 December 2024) draws a useful line. Workflows are "systems where LLMs and tools are orchestrated through predefined code paths". Agents are systems where LLMs "dynamically direct their own processes and tool usage". Most frameworks below support both.

The loop itself is about 20 lines, as you will see. A framework earns its place with the parts that hurt once real users arrive:

  • State and memory: keeping the conversation, or a long task, across restarts.
  • Human-in-the-loop: pausing before a risky tool runs, so a person can approve it.
  • Tracing: a log of every model call and tool call, so you can debug a wrong answer.
  • Multi-agent: several agents with different jobs handing work to each other.
  • MCP support: using tools from MCP servers. MCP (Model Context Protocol) is, in its own docs' words, "an open-source standard for connecting AI applications to external systems". Think of it as a common plug for tools.

Agentic AI frameworks list (November 2026)

Python frameworks

LangGraph calls itself a "low-level orchestration framework for building, managing, and deploying long-running, stateful agents" (README). You draw your agent as a graph: nodes are steps, edges decide what runs next. Its headline features are durable execution, human-in-the-loop and memory. It is built by LangChain Inc, "but can be used without LangChain". There is also a JavaScript version, LangGraph.js.

How LangGraph relates to LangChain. LangChain's overview says "LangChain's agents are built on top of LangGraph". Use LangChain's create_agent for a ready-made agent you can customise. Use LangGraph when you need your own control flow. Both reached version 1.0.0 on PyPI on 17 October 2025.

CrewAI is "an open-source Python framework" for multi-agent work (README). A Crew is a team of agents, each with a role, a goal and a backstory, like "Research Analyst". Flows are event-driven workflows for when you want precise control. Crews run tasks in a sequential or hierarchical process. In the hierarchical one, a manager model delegates tasks (processes docs).

OpenAI Agents SDK is "a lightweight yet powerful framework for building multi-agent workflows" (README). Its core ideas are agents, tools, handoffs (one agent passing the conversation to another), guardrails, sessions and tracing. Despite the name, it is "provider-agnostic". It supports OpenAI's APIs "as well as 100+ other LLMs". A JavaScript/TypeScript version also exists.

Microsoft Agent Framework is Microsoft's current agent framework for Python and .NET, with Go in public preview. Its overview calls it "the direct successor" to Semantic Kernel and AutoGen, "created by the same teams". It joins AutoGen's simple agent design with Semantic Kernel's enterprise features. It adds graph-based workflows on top. Version 1.0.0 reached PyPI on 2 April 2026.

What happened to AutoGen and Semantic Kernel? AutoGen's README now says "Project archived and no longer maintained". It says Microsoft gives no bug fixes or security fixes, and tells new users to start with Microsoft Agent Framework. Semantic Kernel is still supported. Microsoft's FAQ post says it will fix critical bugs and security issues. But "the majority of new features" go to Agent Framework.

Google Agent Development Kit (ADK) is Google's open-source agent framework (README). It says "While optimized for Gemini, ADK is model-agnostic". You build agents, compose them into hierarchies and connect them with graph workflows. The ADK docs cover Python, TypeScript, Go, Java and Kotlin.

Pydantic AI comes from the team behind Pydantic, the Python data validation library (README). Its focus is type safety: tools, dependencies and outputs are typed, so your editor catches mistakes early. It runs durable agents on nine engines, including Temporal and DBOS. Human approval is built in.

LlamaIndex has offered tools for RAG and agent apps since 2023. RAG (retrieval-augmented generation) means fetching your documents and adding them to the prompt. Its agents are FunctionAgent for one agent and AgentWorkflow for several (agents tutorial). Both run on Agent Workflows, "an event-driven, step-based way to control the execution flow". Note one change. The company's README says its "primary focus has shifted towards LlamaParse", its document-parsing product. The open-source framework stays available.

smolagents is Hugging Face's small agent library (README). Its agent logic "fits in ~1,000 lines of code". Its CodeAgent writes each action as a short Python program instead of a JSON tool call. Running model-written code is risky, so the README lists sandboxed environments to run it in. Its latest release on PyPI is from 29 May 2026, older than the others here.

Java frameworks

LangChain4j aims "to simplify integrating LLMs into Java applications" (README). It states: "LangChain4j is not a Java port of LangChain (Python)". You write a Java interface and mark tool methods with @Tool. Its langchain4j-agentic module adds workflows and supervisor agents. The docs say "the whole module has to be considered experimental".

Spring AI brings Spring-style APIs to AI apps (README). It has a ChatClient, tool calling, chat memory, and MCP support through Spring Boot starters. Spring AI 2.x needs Spring Boot 4.x. Its agents guide shows Anthropic's agent patterns, such as orchestrator-workers, in Java.

ADK for Java is Google's ADK on the JVM (README). It needs Java 17 or later (Java quickstart). You build agents with LlmAgent.builder(), and MCP tools come in through McpToolset.

Embabel is "a framework for authoring agentic flows on the JVM" (README). It is written in Kotlin but usable from Java, and the README says it is "From the creator of Spring". You declare actions, goals and conditions. A planner then works out the plan, by default with Goal Oriented Action Planning (GOAP), an algorithm from game AI.

Agentic AI frameworks comparison table

The first table covers the basics. Versions and dates are the latest release on PyPI, checked on 20 November 2026.

FrameworkLatest versionLicenceLanguagesMaintainerCore abstraction
LangGraph1.2.23 (19 Nov 2026)MITPython, JS/TSLangChain IncA graph of steps that share state
CrewAI1.15.44 (19 Nov 2026)MITPythonCrewAI (crewAIInc)A crew of role-based agents, plus Flows
OpenAI Agents SDK0.25.0 (18 Nov 2026)MITPython, JS/TSOpenAIAgents run by a Runner loop, with handoffs
Microsoft Agent Framework1.26.0 (12 Nov 2026)MITPython, .NET, Go (preview)MicrosoftAgents plus graph-based workflows
Google ADK2.14.1 (12 Nov 2026)Apache-2.0Python, TypeScript, Go, Java, KotlinGoogleAgents in hierarchies, plus graph workflows
Pydantic AI2.71.0 (19 Nov 2026)MITPythonPydanticA typed Agent with tools and capabilities
LlamaIndexcore 0.14.26 (13 Nov 2026)MITPythonLlamaIndex (run-llama)Event-driven workflows; FunctionAgent
smolagents1.26.0 (29 May 2026)Apache-2.0PythonHugging FaceCodeAgent: actions written as Python code

The second table covers features. "(hosted)" marks a hosted service run by the same company. The library works without it.

FrameworkMulti-agentMemory and persistenceHuman-in-the-loopTracingMCPModels
LangGraphSubgraphs; subagent and handoff patternsCheckpointers (short-term), stores (long-term)interrupt() pauses, then resumesLangSmith (hosted)Through LangChain's MCPAdapter (beta)Any model with a LangChain integration
CrewAICrews; hierarchical process with a managerOne Memory class, LanceDB by default; Flow @persistHuman input and feedback in crews and FlowsBuilt-in, to CrewAI AMP (hosted); OpenTelemetry toolsmcps field on an agentNative SDKs for 6 providers; others through LiteLLM
OpenAI Agents SDKHandoffs; agents as toolsSessions (SQLite, Redis, SQLAlchemy and more)Tool approvals that pause and resume a runOn by default, to OpenAI's Traces dashboardstdio, SSE, streamable HTTP and hosted serversOpenAI APIs; 100+ others via LiteLLM or Any-LLM
Microsoft Agent FrameworkGraph-based workflowsAgent sessions; context providers for memoryWorkflows built for human-in-the-loop; tool approvalTelemetry built inMCP clients built inFoundry, Azure OpenAI, OpenAI, Anthropic, Ollama and more
Google ADKAgent hierarchies; Task API delegationSessionService and MemoryServiceTool confirmation flowOpenTelemetryMcpToolsetGemini first; also Claude, OpenAI, Ollama, vLLM, LiteLLM
Pydantic AISub-agents; Pydantic GraphMemory capability; durable execution on 9 enginesDeferred tools with approvalOpenTelemetry; Logfire (hosted)MCP capability in coreOpenAI, Anthropic, Google, Bedrock, Groq, Ollama and more
LlamaIndexAgentWorkflow hand-offs; orchestrator agentMemory module; workflows can save and resumeInputRequiredEvent and HumanResponseEventOpenTelemetry and partner toolsYes, MCP tools guideMany LLM integrations
smolagentsManaged agentsStep memory within a run (agent.memory)Not covered in the docs we checkedOpenTelemetry through OpenInferenceToolCollection.from_mcptransformers, Ollama, HF providers, LiteLLM

For Java, versions are the latest release on Maven Central, checked on 20 November 2026:

LibraryLatest versionLicenceMaintainerCore abstractionMCP
LangChain4j1.24.0 (18 Nov 2026)Apache-2.0LangChain4j projectAI Services: a Java interface plus @Tool methodsYes, langchain4j-mcp
Spring AI2.1.0 (19 Nov 2026)Apache-2.0Spring teamChatClient, tool calling, advisorsYes, Boot starters
ADK for Java1.15.0 (18 Nov 2026)Apache-2.0GoogleADK agents (LlmAgent)Yes, McpToolset
Embabel1.5.4 (28 Oct 2026)Apache-2.0EmbabelActions, goals and a plannerThrough Spring AI

Every framework here is open source under the MIT or Apache-2.0 licence. Hosted tracing or deployment services from the same companies, such as LangSmith, are separate products. Check their pricing before you depend on one.

One agent, four ways

The best way to compare frameworks is to build the same thing in each. Our task: answer "What is 18% GST on Rs 2,499?" with a calculator tool.

None of the examples needs an API key or a real LLM. Each framework below ships a fake model for tests, which returns scripted replies. That keeps the runs free, fast and the same on every machine. It also shows exactly what the framework does around the model. We used a venv with Python 3.12.8 and pip install pydantic-ai-slim==2.71.0 langgraph==1.2.23 langchain-core==1.8.3 openai-agents==0.25.0.

The tool

First, one tool that every example shares. Save it as gst_tool.py:

# gst_tool.py: one safe calculator tool, shared by every example below
import ast
import operator

OPS = {ast.Add: operator.add, ast.Sub: operator.sub,
       ast.Mult: operator.mul, ast.Div: operator.truediv}


def calculator(expression: str) -> str:
    """Evaluate arithmetic with + - * / and brackets, for example '2499 * 18 / 100'."""
    def walk(node):
        if isinstance(node, ast.Constant) and type(node.value) in (int, float):
            return node.value
        if isinstance(node, ast.BinOp) and type(node.op) in OPS:
            return OPS[type(node.op)](walk(node.left), walk(node.right))
        raise ValueError(f"not allowed: {type(node).__name__}")
    return str(round(walk(ast.parse(expression, mode="eval").body), 2))


if __name__ == "__main__":
    print(calculator("2499 * 18 / 100"))
    print(calculator("2499 + 449.82"))
    try:
        calculator("__import__('os').system('ls')")
    except ValueError as e:
        print("ValueError:", e)
449.82
2948.82
ValueError: not allowed: Call

So the GST is Rs 449.82 and the total bill is Rs 2,948.82. The tool never calls Python's eval(). It parses the text into a syntax tree with the ast module and allows only numbers and four operators. A model's tool call is untrusted input, so the __import__('os') attack is rejected. The docstring and type hint matter too: frameworks turn them into the tool description the model reads.

1. Plain Python, no framework

Here is the whole agent loop. The scripted_model function stands in for an LLM. It asks for the calculator first, then answers from the result.

# plain_loop.py: the agent loop with no framework and a scripted stand-in model
from gst_tool import calculator

TOOLS = {"calculator": calculator}


def scripted_model(messages):
    """Stands in for an LLM: first ask for the calculator, then answer from its result."""
    if messages[-1]["role"] == "user":
        return {"tool": "calculator", "args": {"expression": "2499 * 18 / 100"}}
    return {"text": f"18% GST on Rs 2,499 is Rs {messages[-1]['content']}."}


def run_agent(question, model, max_steps=5):
    messages = [{"role": "user", "content": question}]
    for step in range(1, max_steps + 1):
        reply = model(messages)
        if "text" in reply:                      # no tool requested: final answer
            return reply["text"]
        result = TOOLS[reply["tool"]](**reply["args"])
        print(f"step {step}: {reply['tool']}({reply['args']}) -> {result}")
        messages.append({"role": "tool", "content": result})
    return f"stopped after {max_steps} steps"


print(run_agent("What is 18% GST on Rs 2,499?", scripted_model))
step 1: calculator({'expression': '2499 * 18 / 100'}) -> 449.82
18% GST on Rs 2,499 is Rs 449.82.

That is the core of every framework in this post: call the model, run the tool, append the result, repeat. max_steps stops a model that never stops asking for tools. Swap scripted_model for a real API call and this is a working agent.

To run this loop against a real local model, follow our guide to building an AI agent from scratch in Python.

2. Pydantic AI with FunctionModel

Pydantic AI's testing guide offers TestModel and FunctionModel. FunctionModel lets a plain Python function play the model, so we reuse the same script:

# pydantic_ai_agent.py: the same task in Pydantic AI, with FunctionModel as the stand-in LLM
from pydantic_ai import Agent, ModelResponse, TextPart, ToolCallPart, ToolReturnPart
from pydantic_ai.models.function import FunctionModel

from gst_tool import calculator


def scripted_model(messages, info):
    """Called by Pydantic AI in place of an LLM. Same script as the plain loop."""
    last = messages[-1].parts[-1]
    if isinstance(last, ToolReturnPart):
        return ModelResponse(parts=[TextPart(f"18% GST on Rs 2,499 is Rs {last.content}.")])
    return ModelResponse(parts=[ToolCallPart("calculator", {"expression": "2499 * 18 / 100"})])


agent = Agent(FunctionModel(scripted_model), tools=[calculator])
result = agent.run_sync("What is 18% GST on Rs 2,499?")
for message in result.all_messages():
    for part in message.parts:
        print(f"{type(part).__name__:>14}: {getattr(part, 'args', None) or part.content}")
print(result.output)
UserPromptPart: What is 18% GST on Rs 2,499?
  ToolCallPart: {'expression': '2499 * 18 / 100'}
ToolReturnPart: 449.82
      TextPart: 18% GST on Rs 2,499 is Rs 449.82.
18% GST on Rs 2,499 is Rs 449.82.

tools=[calculator] is all it took to register the tool. Pydantic AI read the name, type hint and docstring itself. In a real app you would replace FunctionModel(...) with a model name string. One small thing we saw: on its first run in a terminal, version 2.71.0 printed a banner about its Logfire tracing service. The banner went to stderr, not stdout. Setting PYDANTIC_AI_NO_BANNER=1 hides it, as the package source documents.

3. LangGraph with a fake chat model

LangChain's unit testing page documents GenericFakeChatModel. It replays a list of messages, one per call. Here we also build the graph by hand, because the graph is LangGraph's core idea:

# langgraph_agent.py: the same task as a LangGraph graph, with a fake chat model
from langchain_core.language_models.fake_chat_models import GenericFakeChatModel
from langchain_core.messages import AIMessage
from langchain_core.tools import tool
from langgraph.graph import START, MessagesState, StateGraph
from langgraph.prebuilt import ToolNode, tools_condition

from gst_tool import calculator

calc_tool = tool(calculator)                  # wrap the plain function as a LangChain tool

# The stand-in model returns these two messages in order: a tool call, then the answer.
model = GenericFakeChatModel(messages=iter([
    AIMessage("", tool_calls=[{"name": "calculator", "args": {"expression": "2499 * 18 / 100"},
                               "id": "call_1"}]),
    AIMessage("18% GST on Rs 2,499 is Rs 449.82."),
]))


def call_model(state: MessagesState):
    return {"messages": [model.invoke(state["messages"])]}


graph = StateGraph(MessagesState)
graph.add_node("model", call_model)
graph.add_node("tools", ToolNode([calc_tool]))
graph.add_edge(START, "model")
graph.add_conditional_edges("model", tools_condition)   # tool call? go to "tools", else END
graph.add_edge("tools", "model")
app = graph.compile()

final = app.invoke({"messages": [("user", "What is 18% GST on Rs 2,499?")]})
for m in final["messages"]:
    print(f"{m.type:>5}: {m.tool_calls if getattr(m, 'tool_calls', None) else m.content}")
human: What is 18% GST on Rs 2,499?
   ai: [{'name': 'calculator', 'args': {'expression': '2499 * 18 / 100'}, 'id': 'call_1', 'type': 'tool_call'}]
 tool: 449.82
   ai: 18% GST on Rs 2,499 is Rs 449.82.

The loop is now visible as a graph. model runs first. tools_condition sends a tool call to tools and anything else to the end. tools always goes back to model. Be honest about one detail. GenericFakeChatModel replays fixed messages, so the 449.82 in the final answer is typed into the script. The 449.82 in the tool line is real: LangGraph ran calculator to get it.

The LangGraph graph from section 3 START goes to the model node. tools_condition sends a tool call to the tools node, which always goes back to model. With no tool call, model goes to END. START model tools END tool call always back no tool call tools_condition picks the edge after model
model runs first; tools_condition routes a tool call to tools, and anything else to END.

This is more code than the other examples. In return, every step and edge is yours to change. Adding a checkpointer to compile() gives the graph memory and the ability to resume.

4. OpenAI Agents SDK with ScriptedModel

The SDK's testing page documents ScriptedModel. It runs in memory and makes no model requests. ModelStep.respond lets the second turn read what the SDK sent back:

# openai_agents_sdk.py: the same task in the OpenAI Agents SDK, with its ScriptedModel
from agents import Agent, ItemHelpers, RunConfig, Runner, function_tool
from agents.testing import ModelStep, ScriptedModel, assistant_message, function_call

from gst_tool import calculator


def answer(call):
    """Second model turn: read the tool result the SDK sent back, then answer."""
    result = call.input[-1]["output"]
    return [assistant_message(f"18% GST on Rs 2,499 is Rs {result}.")]


model = ScriptedModel([
    [function_call("calculator", {"expression": "2499 * 18 / 100"}, call_id="call_1")],
    ModelStep.respond(answer),
])
agent = Agent(name="GST helper", model=model, tools=[function_tool(calculator)])
result = Runner.run_sync(agent, "What is 18% GST on Rs 2,499?",
                         run_config=RunConfig(tracing_disabled=True))
for item in result.new_items:              # what happened, step by step
    if item.type == "tool_call_item":
        print("tool call  :", item.raw_item.name, item.raw_item.arguments)
    elif item.type == "tool_call_output_item":
        print("tool result:", item.output)
    elif item.type == "message_output_item":
        print("answer     :", ItemHelpers.text_message_output(item))
model.assert_complete()                    # fails if a scripted step was never used
print("model calls:", len(model.calls), "| items sent each time:", [len(c.input) for c in model.calls])
tool call  : calculator {"expression":"2499 * 18 / 100"}
tool result: 449.82
answer     : 18% GST on Rs 2,499 is Rs 449.82.
model calls: 2 | items sent each time: [1, 3]

Look at the last line. The first model call got one item, the question. The second got three: the question, the tool call and the tool result. Every step resends the whole history, and with a paid model you pay for those tokens each time. tracing_disabled=True matters too. The SDK's tracing docs say "Tracing is enabled by default".

What changed and what did not

The calculator function was reused unchanged in all four examples. Everything around it changed names:

Plain PythonPydantic AILangGraphOpenAI Agents SDK
Register the toolA dicttools=[calculator]tool(calculator) + ToolNodefunction_tool(calculator)
Fake model for testsYour own functionFunctionModel, TestModelGenericFakeChatModelScriptedModel
Run itrun_agent(...)agent.run_sync(...)app.invoke(...)Runner.run_sync(...)
Tool request is calledreply["tool"]ToolCallParttool_calls on an ai messagetool_call_item
Default step limitmax_steps=5 (ours)50 model requests10,007 super-steps10 turns

The defaults come from Pydantic AI's usage limits (request_limit), LangGraph's graph API docs (recursion limit) and the SDK's run_config.py (DEFAULT_MAX_TURNS = 10). A LangGraph super-step is one round of nodes running, so one model call plus one tool call uses two.

Only the tool moves unchanged between frameworks One central box, calculator(expression), with arrows to four boxes: plain loop uses a dict, Pydantic AI uses tools=[...], LangGraph uses ToolNode, the OpenAI Agents SDK uses function_tool. calculator(expression) Plain loop a dict Pydantic AI tools=[...] LangGraph ToolNode OpenAI Agents SDK function_tool
Only the tool moves unchanged between frameworks.

How to choose an agentic AI framework

There is no single best framework. Match it to your situation.

You are learning. Write the plain loop first, as in the example above. Then try Pydantic AI or the OpenAI Agents SDK. Both have small core APIs, and both ship fake models, so you can practise without paying for API calls.

You need one agent with a few tools. The OpenAI Agents SDK, Pydantic AI and Google ADK all handle this in a few lines. If your company already uses Gemini or Google Cloud, ADK fits best. Do not pick a multi-agent framework for a single-agent job.

You need durable, long-running workflows. These are tasks that run for hours, wait for a person, or must survive a crash. LangGraph was built for this, with checkpointers and interrupt(). Pydantic AI runs agents on durable engines such as Temporal. Microsoft Agent Framework and LlamaIndex Agent Workflows also save state and resume.

You want role-based multi-agent teams. CrewAI's crews map directly to "a researcher, a writer and an editor". Google ADK and Microsoft Agent Framework also do multi-agent orchestration with more explicit control. Test whether several agents actually beat one agent with more tools. They cost more model calls.

You work in a Java shop. On Spring Boot, start with Spring AI. Otherwise, LangChain4j works with plain Java, Quarkus, Helidon and Micronaut. Use ADK for Java if you want Google's agent model on the JVM. Embabel suits goal-driven planning, where the framework works out the order of steps.

You are on Microsoft or .NET. Use Microsoft Agent Framework, not AutoGen. AutoGen is archived.

You want to stay vendor-neutral. Pick a framework that supports many model providers, and check how it does that. Some use native SDKs, others go through LiteLLM, a library that gives many providers one interface. Keep tools as plain functions, like gst_tool.py. Expose shared tools through MCP so other apps can use them too. Prefer OpenTelemetry tracing, an open standard, over a single vendor's dashboard.

Honest limits: where frameworks hurt

Abstraction lock-in. In our example, only the tool moved between frameworks unchanged. The graph, the crew, the agent setup and the trace formats did not. Moving a real app means rewriting all of that. Keep business logic in plain functions so the framework layer stays thin.

Harder debugging. Anthropic's guide warns that frameworks "can obscure the underlying prompts and responses, making them harder to debug". It suggests "start by using LLM APIs directly". Each framework above ships a fake model for this reason. Use one to test the loop, and turn tracing on to see real prompts.

Version churn. These libraries change fast. In the 90 days to 20 November 2026, PyPI shows 45 releases of pydantic-ai, 27 of crewai and 12 of langgraph. Pydantic AI 2.0.0 (23 June 2026) and Google ADK 2.0.0 (19 May 2026) were new major versions this year. The OpenAI Agents SDK is still at 0.25.0. Under Semantic Versioning, version zero means "Anything MAY change at any time". LangChain's MCP adapter is in beta, and LangChain4j's agentic module is experimental. Pin exact versions and read changelogs before you upgrade.

The cost of loops. Every loop step is another model call, and it resends the history. Our SDK run sent one item, then three. A real 10-step run resends far more. Anthropic notes that agents mean "higher costs, and the potential for compounding errors". The default step limits (10, 50 and 10,007 in the table above) are not budgets. Pydantic AI also offers a cost_limit in US dollars. Set your own limits on steps and spending.

Prompt injection through tools. A tool that reads a web page, file or email puts outside text into the model's input. Hidden instructions in that text can steer the agent. OWASP's LLM01: Prompt Injection calls this indirect prompt injection. It says "it is unclear if there are fool-proof methods of prevention". Its advice includes least privilege and requiring "human approval for high-risk actions". Frameworks give you approval hooks: interrupt(), tool approvals, tool confirmation, deferred tools. None of them make an agent safe on their own. Give tools the smallest access they need. Treat model-written arguments as untrusted, as gst_tool.py does.

Telemetry and data. Check what a framework sends out by default. The OpenAI Agents SDK traces runs by default. CrewAI's telemetry docs say it collects anonymous usage data, and CREWAI_DISABLE_TELEMETRY=true turns it off. Read these pages before you process customer data.

Common interview questions

  1. What does an agent framework add over a plain loop? State and memory, human approval, tracing, multi-agent handoffs, durable execution and MCP tools. The loop itself is small.
  2. What is the difference between a workflow and an agent? In a workflow, your code fixes the path. In an agent, the model chooses the next step and tool.
  3. How do you unit test an agent? Replace the LLM with a scripted fake model, such as FunctionModel, GenericFakeChatModel or ScriptedModel. Then assert on tool calls and results.
  4. How do you stop an agent loop running forever? Set a step limit and a spending limit. Default limits differ a lot between frameworks.
  5. What is indirect prompt injection? Instructions hidden in content a tool fetches. Limit tool permissions and require approval for risky actions.

FAQ

What are agentic AI frameworks?

They are libraries that run the agent loop for you. A model asks for a tool, the framework runs it, sends back the result and repeats until the model answers. On top of that loop, frameworks add memory, human approval, tracing, multi-agent handoffs and MCP tool support. LangGraph, CrewAI and the OpenAI Agents SDK are well-known examples.

Which agentic AI framework is best for beginners?

Start with no framework. Write the 20-line loop from this post with a scripted model, so you see every step. Then try Pydantic AI or the OpenAI Agents SDK. Both have small APIs and ship fake models for tests, so you can learn without an API key. Move to LangGraph or CrewAI when your project needs them.

Are agentic AI frameworks open source?

Yes. Every framework in this post is open source. LangGraph, CrewAI, the OpenAI Agents SDK, Microsoft Agent Framework, Pydantic AI and LlamaIndex use the MIT licence. Google ADK, smolagents and the Java libraries use Apache-2.0. Some companies also run hosted tracing or deployment services, but the libraries work without them.

What is the difference between LangChain and LangGraph?

LangGraph is the low-level framework: you define your agent as a graph of steps with shared state. LangChain sits on top. Its docs say "LangChain's agents are built on top of LangGraph". Use LangChain's create_agent for a ready-made agent. Use LangGraph directly when you need custom control flow, durable execution or human-in-the-loop pauses.

Which agentic AI frameworks work with Java?

The main options are LangChain4j, Spring AI, Google's ADK for Java and Embabel. Spring AI fits Spring Boot projects. LangChain4j also works with Quarkus, Helidon and Micronaut. ADK for Java needs Java 17 or later. Microsoft Agent Framework covers Python, .NET and Go instead. All four Java libraries are Apache-2.0 licensed.

Is AutoGen still maintained?

No. AutoGen's GitHub README says the project is archived and no longer maintained, with no bug fixes or security fixes. Microsoft tells new users to start with Microsoft Agent Framework, which it calls the direct successor to both AutoGen and Semantic Kernel. A migration guide from AutoGen is on Microsoft Learn.

Do agentic AI frameworks support MCP?

All eight Python frameworks in our tables can use tools from MCP servers. The details differ. CrewAI uses an mcps field on agents. Google ADK uses McpToolset. LangChain's MCPAdapter was still in beta when we checked. In Java, LangChain4j, Spring AI and ADK for Java support MCP too. Check the transport you need, such as stdio or HTTP.

Keep going

To write the agent loop yourself and run it free on a local model, read how to build an AI agent from scratch in Python. For the bigger picture of LLM apps, read how to build your own Jarvis with LLMs. Then read whether AI will replace developers and how agents are changing software work.

If you want to build and ship LLM apps, RAG systems and agents with mentors reviewing your work, look at Crio's Fellowship Program in AI Engineering.

You've successfully subscribed to Crio Blog
Great! Next, complete checkout to get full access to all premium content.
Welcome back! You've successfully signed in.
Unable to sign you in. Please try again.
Success! Your account is fully activated, you now have access to all content.
Error! Stripe checkout failed.
Success! Your billing info is updated.
Billing info update failed.