Build production-grade enterprise agents in minutes, not days, weeks, or months.
openloops is an open source harness for AI agents. A TypeScript runtime that handles persistence, tool execution, MCP trust and approvals, scheduled jobs and user management, so you can focus on the one thing that makes your agent yours: the loop that decides how it thinks.
New to AI agents? See what openloops is, explained with cars
Works with
01 / What it is
An agent is built like a car
An AI agent has an engine (the model), a chassis (the harness) and a body (the loop). openloops is the chassis: it handles persistence, tools, users and approvals, so you only write the body that decides how your agent thinks.
See it explained with cars02 / Features
What you get out of the box
Multi-user by design
Chats, tasks, context and MCP servers are scoped to the current user from the start.
Zero-boilerplate persistence
Messages, tasks and every tool call are saved to MongoDB, and a conversation resumes exactly where it stopped, even in the middle of a confirmation.
Safe tool execution
Arguments are validated, destructive tools wait for the user's confirmation, and identifiers the model invents never reach a real system.
MCP with a trust flow
Connect any MCP server and its tools become regular tools. Each server is approved before its first tool runs and reviewed again when it changes.
Autonomous runs and scheduled jobs
The same agent works without a person in the chat, daily, weekly, monthly or once, with a history of every run.
Guardrails
Input guards block card numbers, emails, code or anything you define before the model sees the message.
Usage and cost tracking
Every LLM call is recorded. Get tokens and cost per answer, per chat and per user.
Users and authentication
User management and token login are included, so you don't need a parallel system for identity.
Any LLM provider
OpenAI, Anthropic, Google, self-hosted models such as Ollama and private deployments on Bedrock, GCP or Azure work the same way, chosen per chat.
03 / Code
See how little code this actually takes
A marketplace of ready-to-use loops
Don't write a customer support agent from scratch. Pick a loop built for your use case and swap it in with one line.
04 / Compare
How it compares to other frameworks
| openloops | LangGraph (OSS) | CrewAI (OSS) | |
|---|---|---|---|
| Persistence | Built in, zero config (MongoDB) | You choose and configure a checkpointer: in-memory, SQLite or Postgres, the last two in separate packages | Memory is opt-in and stored as local files (ChromaDB and SQLite, or LanceDB in newer versions), tied to the machine |
| Multi-user scoping | Built in: chats, tasks, context, and MCP servers are per-user from the start | Conversations are scoped by a thread_id. Mapping them to users, and scoping memory and tools per user, is up to you | Not a concept of the framework, you build it |
| Tool execution and retries | Validation, confirmation of destructive tools, duplicate and invented-id protection, and LLM and MCP retries are built into the harness | Per-node RetryPolicy and error handling that you configure | Retry limits are configured per agent or task |
| MCP support | Native: servers are a per-user record, tools load on demand, and every server goes through an approval flow | A separate package (langchain-mcp-adapters) with a client that you wire into the graph | Native mcps field on agents, or MCPServerAdapter. Servers are declared in code, not loaded per user |
05 / Modules
One package, organized by what you need
Agent, AgentLoop, RunContext, Harness: the runtime
AgiLoop, the default loop, and the skills loops share
Tool, BaseParams, and built-in tools such as web search
Skill, for LLM-backed reasoning steps inside a loop
Guard and ready-made input guards
MCP server management, connection checks and trust decisions
Scheduled tasks, their runs and the runner that executes them
Chats and their messages: list, read, update, delete
User management
Login and token issuing
LLM usage and cost tracking
CurrentUser, CurrentSession
Logger and shared utilities
LLMClient and the HTTP clients used by built-in tools
06 / FAQ
Frequently asked questions
Is openloops free and open source?+−
Yes. openloops is open source under the Apache 2.0 license and free for commercial use.
What do I need to run it?+−
openloops is a TypeScript package. You install it with npm or yarn, and it saves messages, tasks and every tool call to MongoDB, so a conversation resumes exactly where it stopped.
Does it include an API or an HTTP layer?+−
No. openloops is a package that your backend calls: it provides the use cases (running agents, chats, users, scheduled jobs) and your backend exposes the endpoints and owns the authorization of each one. The integration guide lists which endpoint calls which use case.
Which LLM providers does it support?+−
OpenAI, Anthropic, Google and self-hosted models such as Ollama work the same way, and the model is chosen per chat. It also supports private provider deployments in your own cloud account, such as Anthropic on Amazon Bedrock, Google Cloud (GCP) and Azure.
Does it support MCP?+−
Yes. Connect any MCP server and its tools become regular tools. Each server is approved before its first tool runs and reviewed again when it changes.
How is openloops different from LangGraph or CrewAI?+−
Persistence, per-user scoping, tool safety, MCP and cost tracking come built in instead of being something you wire yourself. The comparison page lists the differences feature by feature.
Can I use it for multi-user products?+−
Yes. Chats, tasks, context and MCP servers are scoped to the current user from the start, and user management and token login are included.
Ready to build your first agent?
Install openloops and have a working, persisted, multi-user agent running in minutes.
Not sure where to start? Read the explanation