Open Source AI Agent Frameworks Compared: Build on ERPNext

An open source AI agent uses a language model to plan and carry out tasks through tools, and its code is under a licence that lets you run, study, change and self-host it. Here are the leading frameworks as of 15 November 2026, and how we build agents directly on ERPNext.

An open source AI agent being built in a workshop: framework tools hang on a pegboard, the agent stands on the workbench with its case open to show the code and the AI core, trays hold its tools and a stack of documents is its knowledge base, a cable links it to ERPNext data, and a person holds the approval
Published 11 min read
Open source agent frameworks compared (15 Nov 2026)
9
AutoGen status per its repo: archived, not for production
Archived
Models FinByz AI can call through LiteLLM
100+
Licence of our FinByz AI Frappe app
GPL-3.0

The basics

What is an open source AI agent?

In short

An open source AI agent is software that uses a language model to plan and carry out tasks through tools, where the agent's code is published under a licence that lets you run, study, change and self-host it. For a business, that means you can put the agent on your own server, next to your ERP data, and decide exactly which model it calls and what it's allowed to do.

Every agent has four working parts. A framework is just the code that wires them together and runs the loop.

A model

Decides the next step from the request and what has happened so far.

Tools

Named actions it can call: read a customer balance, draft an email, create a document.

Memory

The conversation, earlier results and the data it may read.

Rules

Permissions and approvals that limit what it can actually change.

"Open source" applies to that code. According to the Open Source Initiative, an open source licence must allow free redistribution, access to source code and the right to make derived works, with no discrimination against fields of use. That last point matters. A licence that bars you from running a hosted service or removing a logo is source-available, not open source, even if the code is on GitHub.

The model is a separate question. You can run an open source agent framework with a closed model such as GPT or Claude, or with open-weight models on your own hardware. In October 2024 the OSI published a separate Open Source AI Definition 1.0 for models, because "open weights" alone doesn't give you the training data information or code needed to rebuild a model.

Open source vs closed agent platforms

QuestionOpen source framework, self-hostedClosed, hosted agent platform
Where do prompts and ERP data go?Your server, plus whichever model API you chooseThe vendor's cloud
Can you swap the model?Yes, usually by changing a settingOnly to models the vendor offers
Can you read the agent's code?YesNo
Who patches and upgrades it?Your team or your partnerThe vendor
Lock-in riskLow, the code stays with youHigh if workflows live only on the platform
Effort to startHigher, you build and host itLower, sign up and configure

Why open source

Why do businesses choose open source AI agents?

Licence cost is rarely the real reason. Control is. Finance, HR and operations data sits in the ERP, and most owners we talk to want to know exactly where a prompt containing customer balances or salaries ends up.

Control of your data

Self-hosting keeps orchestration, logs, memory and tool calls on your own infrastructure. Route requests to a local model and nothing leaves the building. With a cloud model you still decide which fields get sent, and you can mask the rest.

Audit you can show

When an agent creates a draft invoice or sends a reminder, an auditor will ask why. With open code you can show the exact prompt template, tool definition and permission check that ran, not just a vendor's log screen.

Portability

Models change every few months. A framework that talks to many providers lets you move to a cheaper or better model without rebuilding the agent.

Comparison

Which open source AI agent frameworks lead in 2026?

Here are the frameworks that come up most in our projects and in public comparisons. Licences and maintenance status are taken from each project's GitHub repository on 15 November 2026; star counts are rounded and change daily.

FrameworkMaintainerLicenceStyleGood fit forGitHub stars
LangGraphLangChainMITGraph of steps with saved state, pause and resumeLong-running business processes that need human approval mid-way~45k
CrewAICrewAI Inc.MITRole-based “crews” of agents plus event-driven flowsTeams of specialised agents (researcher, writer, reviewer)~61k
Microsoft Agent FrameworkMicrosoftMITAgents and multi-agent workflows in Python and .NET, MCP and A2A supportMicrosoft-centred stacks; the successor to AutoGen~15k
OpenAI Agents SDKOpenAIMITLightweight agents with handoffs, guardrails and tracingQuick multi-agent prototypes; works with other providers too~31k
Google ADKGoogleApache-2.0Code-first toolkit for building, evaluating and deploying agentsTeams on Google Cloud and Gemini~22k
Pydantic AIPydanticMITType-checked agents with structured outputsPython teams who want validated, typed responses~21k
smolagentsHugging FaceApache-2.0Minimal agents that write and run code as their actionsResearch, data tasks, open-weight models~30k
LlamaIndexLlamaIndexMITAgents built around document parsing and retrievalDocument-heavy work: contracts, invoices, policies~53k
AgnoAgnoApache-2.0Agent runtime with memory, knowledge and a control planeTeams wanting a ready runtime rather than a library~43k

What happened to AutoGen?

Microsoft's AutoGen repository now says AutoGen is archived and no longer maintained, and it advises against production use. New projects are pointed to Microsoft Agent Framework, which has a 1.0 release and a migration guide from AutoGen. If an older proposal you've received is built on AutoGen, ask about the migration plan.

Platforms that look open source but aren't

Two popular tools often appear in "open source AI agent platform" lists. Both can be self-hosted and both are useful, but neither is open source in the OSI sense. Read the licence before you build a product on top of either.

1

Dify

Licensed under a modified Apache 2.0 that, among other conditions, needs a commercial licence to run it as a multi-tenant service.

2

n8n

Uses its own Sustainable Use License and calls itself fair-code. We build n8n AI agent workflows for clients too.

Selection

How do you choose the best AI agent framework?

Start from the business process, not the framework. We usually ask these questions, in this order.

  1. 1Where does the data live?If 80 percent of what the agent needs is in ERPNext, the agent should sit close to ERPNext and use its permissions, not copy data into a separate store.
  2. 2Does the process need a person to approve steps?Payments, credit notes and external emails do. Pick something that can pause, wait for a decision and resume. LangGraph and our own Workflow Builder are built for this.
  3. 3One agent or several?Most first projects need one agent with five or six tools. Multi-agent setups add cost and new ways to fail.
  4. 4Which models must it support?If data rules mean a local model, check that the framework works with an OpenAI-compatible endpoint or a router such as LiteLLM.
  5. 5Who will run it in two years?Check release activity, the licence and whether your team or partner knows the language. A framework with a quiet repository is a risk, as AutoGen users found out.
  6. 6How will you see what it did?You need traces of each model call and tool call, kept long enough for audit.

Our framework

How does FinByz build AI agents on ERPNext?

We built our agent framework as a Frappe app called FinByz AI. It's open source under GPL-3.0 and published on GitHub at github.com/finbyz/finbyzai, so it installs on any Frappe or ERPNext site with the usual bench get-app and install-app commands. We run it on our own ERP, which also serves the knowledge base behind the chatbot on this website.

Our design choice was simple: every part of an agent is a normal Frappe DocType. That means agents get ERPNext's roles, permissions, version history and REST API without extra work, and an administrator can see and change an agent from the Desk like any other record.

The building blocks

DocTypeWhat it holdsWhy it matters
LLM Provider and LLMProvider, model name, temperature, token limits; keys in encrypted password fieldsSwap models without touching the agent. Requests go through LiteLLM, which supports 100+ models including local ones through Ollama
AI AgentSystem message, agent type (ReAct, conversational, structured chat or a LangChain chain), linked LLM, tools, knowledge base, memory type, max iterations, output schemaOne record defines one agent; change behaviour by editing a form
AI ToolA Python function or provider built-in tool, its description and configuration schema, plus “requires confirmation” and “cost sensitive” flagsThe agent can only call tools that are registered and enabled
Knowledge BaseWeb links and sitemaps, uploaded PDF, DOCX or TXT files and text notes; chunked and embedded into a vector storeAnswers are grounded in your own policies and documents
AI ConversationMessage history for each sessionContext carries across turns and is kept for review

Vector stores supported

  • Pinecone
  • Qdrant
  • Supabase (pgvector)
  • Chroma

Agents can also call other agents as tools, so a coordinator can pass a question to a finance agent or a document agent without a separate multi-agent framework. Under the hood the agent loop runs on LangChain and LangGraph, and traces can be sent to LangSmith for debugging.

Workflow Builder: where agents meet business rules

An agent that only chats isn't much use to an operations team. So the second half of FinByz AI is a Workflow Builder: a visual canvas at /workflow for record-based automations with triggers, conditions, actions and AI steps. Three parts of it do the safety work.

Human approval

An AI step can stop and create an approval with the agent's draft, its evidence and instructions for the reviewer. The reviewer approves, edits, rejects or lets it expire, and the decision is stored with the run.

Policy checks

When a record changes mid-run, the workflow re-checks whether the goal is already met or the record is no longer eligible, so the agent doesn't keep chasing a customer who has paid.

Run history

Every run, action attempt, audit event and failed delivery is a record. Failures go to a dead-letter list instead of disappearing.

A typical agent we set up

Take overdue receivables. The agent's ERPNext user has read access to Sales Invoice, Customer and Payment Entry, and nothing else. Its tools list overdue invoices for one customer, fetch the last three payment dates and draft a reminder in the customer's language. A workflow triggers it daily for invoices 15 days past due. The draft lands in an approval for the credit controller, who edits a line if needed and approves. Only then does the email go out.

What we see go wrong most often is the opposite: a single "run any query" tool with an admin login. It works in a demo and fails the first audit.

How-to

How do you build your first open source AI agent on ERPNext?

  1. 1Pick one processChoose one with clear inputs and a measurable result, such as reminder drafts, supplier invoice matching or answering staff questions about HR policy.
  2. 2Install the app on a test copyUse bench get-app and bench --site <site> install-app finbyzai on a copy of your site, not production.
  3. 3Set up an LLM Provider and LLMUse a cloud model to start, or point LiteLLM at a local model if data must stay on-premise.
  4. 4Create a dedicated ERPNext user and roleGive the agent the smallest set of DocType permissions it needs. Add User Permissions to limit it by company or territory.
  5. 5Register three to six narrow toolsAdd them as AI Tool records. Turn on “requires confirmation” for anything that writes.
  6. 6Add a Knowledge BaseOnly if the agent must follow your policies or SOPs.
  7. 7Create the AI AgentWrite a short system message, set max iterations and attach the tools.
  8. 8Wrap it in a workflow and run in shadow modeAdd an approval step, run it for two weeks and compare its drafts with what your team actually did.
  9. 9Go live on one teamReview a sample of runs every week, then widen access.

For the wider picture of governance and rollout, read our guide to enterprise AI agents and how to deploy them on ERP.

Limits

When should you not use an open source AI agent?

Agents aren't the right answer for every task, and open source adds work of its own.

  • The rule is fixed. If the logic is "send a reminder at 15, 30 and 45 days", a normal ERPNext notification or dunning setup is cheaper and fully predictable.
  • Nobody will own it. A self-hosted agent needs someone to patch dependencies, rotate keys and read the traces. If that person doesn't exist, a managed product may be safer.
  • The data isn't clean. An agent working on duplicate customers and wrong ledger balances will produce confident, wrong drafts.
  • The output can't be checked. If no one can tell whether the agent's answer is right, keep a person in the loop or don't automate it yet.
  • Copyleft is a problem for you. FinByz AI and ERPNext are GPL-3.0. That's fine for running them in your business, but plan accordingly if you intend to distribute modified code as a product.

Security needs attention from day one. The OWASP Top 10 for Agentic Applications lists risks such as goal hijacking, tool misuse and privilege abuse, and emails or PDFs an agent reads can carry hidden instructions. Treat everything the agent reads as untrusted, and let permissions, not prompts, decide what it can do.

Next step

What should you do next?

Start small

List three processes where your team copies data between screens or writes the same email every day. Pick the one with the cleanest data and an obvious approver. That's your first agent.

FinByz has delivered 200+ projects in 15+ countries since 2016, and we build ERPNext AI agents with the same open source stack described here. Our AI consulting team can give you a second opinion on a framework choice, and our AI implementation service covers the first agent design and rollout.

Talk to our Experts

Ready to Scale with Smart Tech? Let's Talk.

Transform your business processes with AI-powered automation and expert implementation.

Trusted by clients in 15+ countries since 2016
Questions buyers ask

Frequently Asked Questions

Find answers to common questions about our services