Open source · AI agent frameworks

Open-source ai agent frameworks

There are 10 open-source ai agent frameworks worth knowing about, led by DSPy and LlamaIndex. They are most often used to replace LangChain. All can be self-hosted, which removes per-seat pricing entirely — but only pays off if someone on your side will own updates, backups and security patches.

Reviewed 2026-07-28 How we compare Full catalog

The projects

ProjectWhat it isCommonly replacesSource
DSPy Programs prompts as modules you compile rather than hand-tune. LangChain repo ↗
LlamaIndex Data framework for connecting models to your own documents. LangChain repo ↗
CrewAI Role-playing agents that co-operate on a task. LangChain repo ↗
AutoGen Microsoft's framework for multi-agent conversations. LangChain repo ↗
Dify Visual builder for LLM apps, self-hostable. LangChain repo ↗
Flowise Drag-and-drop LLM flows on top of LangChain. LangChain repo ↗
Langflow Visual authoring for agents and RAG pipelines. LangChain repo ↗
Haystack Production search and RAG pipelines from deepset. LangChain repo ↗
Pydantic AI Type-safe agents from the Pydantic team. LangChain repo ↗
Mastra TypeScript agent framework with workflows and evals. LangChain repo ↗

Don't self-host if…

We list these because they are often the right answer. We say this because they are not always the right answer.

Questions people actually ask

What is the best open-source ai agent framework?

DSPy is the most widely deployed of the 10 projects here — programs prompts as modules you compile rather than hand-tune. The honest answer depends less on features than on operations: the best one is whichever your team will actually keep patched and backed up.

Are open-source ai agent frameworks really free?

The software is free; running it is not. Budget roughly $5–20 a month for a small server, plus your own time for updates, backups and security patching. You are swapping a subscription for maintenance work, which is a good trade only if someone will actually do the work.

Can I self-host without a sysadmin?

Often yes, with Docker and a managed VPS. Several of these projects also sell a hosted version, which keeps the open-source licence and data-ownership benefits without the maintenance burden — at that point you are comparing their price against the commercial incumbent's.

Is open source safe for business use?

Widely deployed open-source software is not inherently less secure — the code is inspectable, which is an advantage. The genuine risk is operational: an unpatched self-hosted service facing the internet is far more dangerous than a maintained SaaS product. Security depends on your discipline, not the licence.