A well-stocked workshop.
A huge catalog of parts — models, tools, retrievers, memory, middleware — that you assemble in Python or JavaScript, inside your own app. Powerful and flexible. Also yours to wire up, host and keep running.
Both help an AI model use tools: look up an order, check stock, open a ticket. LangChain is a library you build into your app. theloop is a separate service your app calls over HTTP. That one difference decides almost everything else.
A huge catalog of parts — models, tools, retrievers, memory, middleware — that you assemble in Python or JavaScript, inside your own app. Powerful and flexible. Also yours to wire up, host and keep running.
You hand over everything in one request: model, key, prompt, history, tools. It runs the loop, streams the answer and hands back the bill. Then it forgets you ever came by.
| Question | LangChain | theloop |
|---|---|---|
| What is it? | An open-source framework for Python and JavaScript | An open-source HTTP service. Run it with Docker or Node |
| How do you use it? | Import it and write the agent in code | Send POST /runs from any language or low-code platform |
| Where does the agent live? | Inside your app's process | Nowhere. Your app sends the full recipe with every request |
| Memory | Checkpointers from LangGraph, the runtime under its agents: in memory, Postgres and others | None. History lives in your database and goes in full with each run |
| Who runs the tools? | Your process calls your Python or JS functions | theloop calls your HTTPS endpoints through a host allowlist |
| Risky actions: refunds, deletes | Opt-in human-in-the-loop middleware pauses the agent. Needs a checkpointer | Built in. Write tools never execute: they answer deferred, and your system approves |
| Billing | Token usage on model responses, plus tracing and costs in LangSmith | One usage record per provider attempt, failed and interrupted ones included |
| Ecosystem | Massive: integrations, RAG, Deep Agents, LangSmith LangChain wins | Small on purpose: one loop, done carefully |
Not either-or. Put a LangChain retriever behind an HTTPS endpoint, and it becomes a read tool for theloop. LangChain does the searching, theloop runs the conversation.