Skip to content
Free AI Tools

Curated hub

Agentic Loop — resources, frameworks & papers

A hand-curated hub on the Agentic Loop pattern: the canonical papers, the open-source frameworks that implement the agent loop in production, and the blog posts that are still worth reading three years later.

What is the agent loop?

An agent loop — sometimes called the Agentic Loop — is the repeating cycle an LLM agent runs to make progress on a task. The agent observes the current state, decides the next action (often a tool call), executes it, observes the result, and decides whether to continue, retry, reflect, or stop. Most frameworks implement a variant of the original 2022 ReAct cycle, but the modern literature generalises the loop with explicit planning, reflection, and persistence layers.

This page is a hub, not a tutorial. We link to the canonical resources — papers, docs, repos, and long-form blog posts — that practitioners actually cite. We don't re-explain the loop here; we point at the explanations that aged well.

If you want a tool-first directory instead, head back to the free AI code generators category — many of those entries ship an agent loop under the hood.

5 resources

Foundational papers

The five papers every agent loop practitioner should have actually read. They define the vocabulary — thought, action, observation, reflection — that the rest of the field now borrows from.

10 resources

Open-source agent loop frameworks

Implementations of the agent loop pattern that you can install today. Sorted loosely by adoption; each entry has the canonical repo plus a one-line take on where it sits in the landscape.

Code

LangGraph

LangChain · TypeScript & Python

A graph-based runtime where each node is a step in the agent loop and each edge is a control-flow branch. The closest thing to an industry default right now.

Read it

Code

smolagents

HuggingFace · Python

A deliberately tiny agent loop (~1k LOC of real logic) that ships with the ToolCallingAgent and CodeAgent recipes. The best place to read a minimal loop implementation.

Read it

Code

AutoGen

Microsoft Research · Python

Multi-agent conversations as the unit of computation. The conversational loop is richer than single-agent tool use and harder to debug — start here for role-play patterns.

Read it

Code

CrewAI

CrewAI Inc. · Python

Roles, tasks, crews. A more opinionated framing of multi-agent loops that's friendlier to product teams than AutoGen but narrower in scope.

Read it

Code

OpenHands (formerly OpenDevin)

All Hands AI · Python

A full software-engineering agent loop with a sandboxed runtime, a planner, and a code-edit action space. Closest open-source analog to Devin.

Read it

Code

Continue

Continue Dev · TypeScript

An in-IDE agent loop that lives inside VS Code and JetBrains. Worth reading for the dev-tooling slice of the agent loop ecosystem.

Read it

Code

Aider

Aider · Python

A terminal-native coding agent loop with a strong repo map and a well-known benchmark record. The benchmark numbers are the only honest ones in the space.

Read it

Code

Cline

Cline · TypeScript

VS Code agent loop with explicit tool approvals per step. Useful as a reference for the human-in-the-loop variant of the agent loop.

Read it

Code

Open Interpreter

Open Interpreter · Python

An agent loop that runs code locally on the user's machine rather than in a sandbox. A good cautionary reference for capability / safety trade-offs.

Read it

Code

learn-claude-code

shareAI-lab · TypeScript

A from-scratch re-implementation of the Claude Code agent loop, written for readability. Best entry point if you want to read a small production loop end-to-end.

Read it

FAQ

Agent loop questions, answered

The questions readers actually type when they land on an Agentic Loop or agent loop page.

What is an agent loop?

An agent loop is the repeating cycle an LLM agent runs to make progress on a task: observe the current state, decide the next action (often a tool call), execute it, observe the result, and decide whether to continue, retry, or stop. The pattern goes back to the 2022 ReAct paper and is the basis of every modern agent framework.

What is the Agentic Loop pattern?

The Agentic Loop pattern is the same cycle but treated as a first-class design pattern rather than an implementation detail. You name each step (plan, act, observe, reflect), put state in a typed object between steps, and treat termination as an explicit decision instead of an exception. Anthropic's "Building effective agents" essay uses this framing.

How is an agent loop different from a workflow?

A workflow has a known, fixed sequence of steps at design time. An agent loop defers the next step to a model at runtime. The same code can be either; what changes is who controls the path through the graph.

Which framework should I start with?

Read smolagents first to internalize the minimum viable loop. Then pick LangGraph if you want explicit control over state and branching, or CrewAI if you want multi-agent role-play out of the box. AutoGen is worth the time only if you need conversation-shaped loops.

What's the best paper to read first?

ReAct (arXiv 2210.03629) is the canonical reference. After that, read Reflexion (arXiv 2303.11366) for the self-critique variant and Toolformer (arXiv 2302.04761) for the self-supervised tool-use training story.

Skip the reading

Use the loop, don't just read about it

The fastest way to internalise an Agentic Loop is to ship a tiny one. The free AI tools below already ship an agent loop or expose the primitives you need to wire one up in an afternoon.