Docs › Upgrades & Flow AI
Frappe Flow AI in ERPNext
Frappe Flow AI explained: connect Anthropic, OpenAI or a local model, give users the Flow User role, chat with your ERPNext data, and run agents with triggers.
Frappe Flow AI is the AI assistant built into Frappe sites from v16.60. You ask in plain language, for example "show unpaid invoices older than 60 days", and Flow does the work inside ERPNext with your permissions. It is also a framework for building your own agents, with their own instructions, tools and knowledge, that can run on a schedule or when a document changes. Frappe calls it alpha/beta: it can make mistakes, so start with low-risk tasks.
What you can do with Flow
- Ask about your data: "Top 10 customers by sales this quarter", "Which items are below reorder level?"
- Run reports and get the answer in the chat.
- Create, update and submit documents and move them through a workflow, for example a draft quotation from a WhatsApp enquiry.
- Customise the site: add DocTypes, custom fields, workflows and print formats.
- Run agents for recurring work, such as a Monday summary of overdue payments.
Flow is different from Automation Flow, which runs fixed no-code steps without AI.
Frappe Flow AI setup, step by step
- Be on v16.60 or newer. Flow ships with the Framework, so there is no separate app to install. See upgrade to v16.60.
- Connect a provider. As a System Manager, open /flow on your site. On a new site, choose a provider (for example Anthropic or OpenAI), paste its API key, click Connect and pick the default model for new chats. If a provider is already connected, go to Settings > Models > Connect provider.
- Or use a local model. Choose Custom provider and enter the URL of a server that speaks the OpenAI API, such as Ollama or LM Studio. Your data then stays on your own server.
- Give people access. Add the Flow User role to each user who should use Flow.
- Optional settings. In Settings > General, set a cheaper Helper Model for small jobs such as naming chats, and a Search Provider if agents should search the web.
Agents, knowledge and triggers
- Agents are assistants for one job, each with instructions, a model and a set of tools. Users pick an agent in the chat.
- Knowledge gives an agent your own reference material, such as policies or price rules.
- Triggers start an agent automatically. Go to Settings > Triggers > New trigger, or ask Flow to create one and approve it. Choose an Agent, an Event ("DocType Event" for create, save, submit, cancel or delete, or "Scheduled" with a Cron Expression such as
0 9 * * 1for Mondays at 9:00), an optional Python Condition, a Prompt Template that can use the document's fields, and Run As, the user whose permissions the agent uses. - Every run is saved as a Flow Run with what the agent did and any errors. If a trigger doesn't run, check that it's enabled, the scheduler and workers are running, the Run As user can read the document, and the condition is true.
Permissions, privacy and cost
- Flow acts with the permissions of the person asking, so it can't see or change anything that user can't. Give each trigger's Run As user only the roles it needs.
- With a cloud provider, the data Flow reads is sent to that provider. For sensitive accounts or payroll data, consider a local model or limit which users have the Flow User role.
- You pay the AI provider for usage with your own key. Frappe has said AI credits will later be bundled on Frappe Cloud.
Practical Flow ideas for Indian businesses
| Job | How |
|---|---|
| Daily sales summary on WhatsApp-style text | Scheduled trigger at 9:00 with a prompt that lists yesterday's Sales Invoices and totals |
| Overdue payment follow-up | Weekly agent that lists customers with invoices past due and drafts reminder emails for approval |
| Purchase bill entry | Upload bills to the queue, then ask Flow to fill the Purchase Invoice beside each file and check it before submitting |
| Stock alert | Scheduled agent that lists items below reorder level by warehouse |
Developers can add their own tools, agents, triggers and skills: see Frappe Flow skills and tools. Want Flow set up and tested on your ERPNext? See our AI automation service.
Sources
Written from the official documentation and source code below. Menus and fields can differ between versions, so check the docs for your version.
