Lazychat Erpnext

LazyChat — an AI assistant docked inside your ERPNext desk. Chat with your data, draft reports, stage edits (Apply-gated). Bring your own LLM: any OpenAI-compatible or Anthropic key, stays in your browser. Also ships an MCP server (101 permission-scoped tools).

Install Lazychat Erpnext

bench get-app https://github.com/soumyasethy/lazychat-erpnext

Tags

  • agentic
  • agentic-ai
  • ai-agent
  • ai-assistant
  • anthropic
  • byo-llm
  • claude
  • desk-assistant
  • erp
  • erpnext
  • frappe
  • frappe-app
  • llm
  • mcp
  • mcp-server

Add the Frappe Gems badge to your README

Maintain Lazychat Erpnext? Paste this into your README:

[![Listed on Frappe Gems](https://frappegems.com/api/method/frappe_gems.seo.badge?app=soumyasethy%2Flazychat-erpnext)](https://frappegems.com/gems/apps/soumyasethy/lazychat-erpnext)

About Lazychat Erpnext

lazychat-erpnext # lazychat-erpnext **Talk to ERPNext like a senior consultant.** 95 permission-scoped tools · two-phase mutations · composer-critic verification · BYO LLM
![ERPNext 15](https://img.shields.io/badge/ERPNext-15-success?style=flat-square) ![Python 3.11+](https://img.shields.io/badge/Python-3.11+-blue?style=flat-square) ![Tools 95](https://img.shields.io/badge/Tools-95-d97757?style=flat-square) ![License MIT](https://img.shields.io/badge/License-MIT-green?style=flat-square) ![GitHub stars](https://img.shields.io/github/stars/soumyasethy/lazychat-erpnext?style=flat-square)

78-second flagship walkthrough — stakeholder ask → tool dispatch → report URL → BYO LLM in one shot. Plays muted on loop.
78-second flagship walkthrough — stakeholder ask → tool dispatch → report URL → BYO LLM in one shot. (Want HD? ▶ download the MP4.)

Still hero — chat panel docked on Sales Invoice list with the conversation showing tool dispatch + a 324-row paid-invoices result table for December 2025
↑ Still hero — the post-dispatch state of the panel, mid-conversation.
## From stakeholder request to delivered report — in minutes > *"Hey, I need to verify which December purchase invoices have payment entries against them. Can we get a report by EOD?"* That ask used to mean opening 3 Frappe doctypes, writing a custom Query Report, debugging joins, fixing field names, and probably a meeting. With lazychat, the consultant types the stakeholder's words verbatim into the chat panel.
Step 1 — Type the stakeholder's request
The consultant pastes the verbatim ask into the chat composer.

Composer with the stakeholder's verbatim question typed in
Step 2 — Lazychat dispatches tools, returns data
describe_doctyperun_sql_select → inline result table. Real data. No copy-pasting from /api/method.

Tool dispatch cards with byte counts and a result table of 324 paid invoices
Step 3 — Stage the report, click Apply
prepare_create_report validates the SQL via execute-probe, shows sample rows, the critic LLM grades it. One click commits.

Apply card with sample rows + Open Report button after a successful prepare_create_report commit
Step 4 — Share the URL with the stakeholder
Copy the report URL. Done. Time elapsed: ~2 minutes.

The same flow works for cross-doctype reconciliations, variance reports, ad-hoc audits, and bulk operations. 95 permission-scoped tools back the chat — see the catalog below for what each can do.
--- ## Bring your own LLM in 30 seconds Self-hosted LM Studio? Anthropic? NVIDIA NIM? OpenRouter? Together? Groq? You don't fill out a form. You **paste a `curl` snippet from the provider's own docs** — and lazychat parses it into endpoint, model, auth, headers, streaming flag, even provider-specific payload extras. **The API key stays in the browser** (browser-LLM path); no server-side credential storage, no shared org-key risk. ### The 4-step flow
Model picker with built-in models and Add custom model button
1. Open the model picker
From the chat composer, click the model chip (bottom-left) → + Add custom model.
Add custom model dialog with a NVIDIA NIM curl snippet pasted; the form on the left has populated endpoint, model, format, streaming, and bearer token fields
2. Paste any provider's curl into the right-hand panel
Endpoint, model, auth, format, streaming, max_tokens, temperature, top_p, extra headers, extra payload — all auto-fill on the left.
Add custom model form fully populated, ready to Test connection or Add model
3. Click Test connection → green ✓ → Add model
Test connection makes a 1-token probe request, shows the HTTP status + first 800 chars of the response. Green check = ready to ship.
Model picker now showing three custom models in a CUSTOM section: Kimi K2 (NVIDIA) selected as active, Claude Haiku 4.5 (direct API), and LM Studio (localhost). The composer chip at the bottom shows kimi-k2.6 as the active model.
4. Switch instantly, per session
Custom models appear under a CUSTOM section in the picker. Click to switch — the chat composer's model chip updates immediately. Mix free / paid / local on different chats.
### Tested provider snippets (paste these verbatim)
NVIDIA NIM — auto-detects OpenAI format, picks up chat_template_kwargs for thinking-mode ```bash curl -X POST "https://integrate.api.nvidia.com/v1/chat/completions" \ -H "Authorization: Bearer nvapi-..." \ -H "Accept: text/event-stream" \ -H "Content-Type: application/json" \ -d '{ "model": "moonshotai/kimi-k2.6", "messages": [{"role":"user","content":""}], "max_tokens": 16384, "temperature": 1.0, "stream": true, "chat_template_kwargs": {"thinking": true} }' ``` Auto-fills label `Kimi K2 (NVIDIA)`, endpoint, format=`openai`, streaming=✓, bearer token, max_tokens, temperature, plus `chat_template_kwargs` lands in the **Extra payload** field verbatim.
Anthropic (direct, no Frappe LLM Provider needed) — auto-detects messages format + x-api-key auth ```bash curl https://api.anthropic.com/v1/messages \ -H "x-api-key: sk-ant-..." \ -H "anthropic-version: 2023-06-01" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-haiku-4-5", "max_tokens": 4096, "stream": true, "messages": [{"role":"user","content":""}] }' ``` Auth type → `API Key`, header name → `x-api-key`, format → `anthropic`, response parser → `anthropic-sse`. The custom `anthropic-version` header lands in **Extra headers**.
OpenAI ```bash curl https://api.openai.com/v1/chat/completions \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{"model":"gpt-5","messages":[{"role":"user","content":""}],"stream":true}' ```
OpenRouter — gateway to 200+ models ```bash curl https://openrouter.ai/api/v1/chat/completions \ -H "Authorization: Bearer sk-or-..." \ -H "HTTP-Referer: https://your-site.example.com" \ -H "X-Title: Lazychat" \ -d '{"model":"meta-llama/llama-3.3-70b-instruct","stream":true}' ``` The `HTTP-Referer` and `X-Title` extras are required by OpenRouter and land in **Extra headers**.
LM Studio (localhost) — fully local, no API key ```bash curl http://localhost:1234/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model":"meta-llama-3-8b-instruct","stream":true}' ``` Auth type → `none`, format → `openai`, streaming → ✓. Browser-LLM path makes localhost work because requests originate from the user's browser, not the Frappe server.
### What the parser auto-fills from the curl | Curl part | Form field | |---|---| | `https://api.anthropic.com/v1/messages` | URL ends `/messages` → **Format** = `anthropic` | | `https://*/v1/chat/completions` | URL ends `/chat/completions` → **Format** = `openai` | | `-H "Authorization: Bearer XYZ"` | **Auth type** = Bearer; **Token** = `XYZ` | | `-H "x-api-key: XYZ"` | **Auth type** = API Key; **Header name** = `x-api-key`; **Token** = `XYZ` | | `-H "Accept: text/event-stream"` | **Streaming** = ✓ | | Any other `-H "X: Y"` (e.g. `anthropic-version`, `HTTP-Referer`) | **Extra headers** (kv list) | | Payload `"model":"X"` | **Model** = `X` | | Payload `"max_tokens":N` / `"temperature":N` / `"top_p":N` | **Defaults** block | | Payload `"stream":true` | **Streaming** = ✓ | | Any payload key not in the above | **Extra payload** (preserved as JSON, merged into request body verbatim) | | Hostname (`api.anthropic.com`) | **Label** auto-generated as `Anthropic Direct`-style title | > **Test connection** sends one `messages: [{"role":"user","content":""}]` request to the configured endpoint with the parsed auth + extras. Returns the HTTP status + first 800 chars of the response body in a green/red panel — instant proof the credential and endpoint work before you start using the model in real chats. > Same auto-fill works for `requests.post(...)` snippets too — paste a Python snippet from a provider's quickstart and it parses identically. --- ## Charts and dashboards rendered in-chat Tools like `make_chart`, `dashboard_chart_data`, and `number_card_value` don't return raw JSON to the user — the chat-ui's `ChartBlock` renders them inline as proper Vega charts and KPI cards, in the panel, alongside the conversation. The consultant asks *"chart of paid PIs by month"* and the chart appears as the answer. No tab-switching, no exporting to a BI t

Related Accounting apps for Frappe & ERPNext

  • Books — Free Accounting Software
  • Lending — Open Source Lending software
  • Payments — A payments app for frappe
  • Banking — Load your bank transactions into ERPNext and reconcile them with your vouchers.
  • Erpnext Quota — App to manage ERPNext Site, User, Company and Space limitations
  • Utility Billing — The Utility Billing & Property Management App is a powerful addition to ERPNext, designed to streamline utility billing, property leasing, and tenant management. Ideal for municipal utilities, real estate managers, and property developers.
  • Expense Request — ERPNext Expense Requests
  • Vendor Payments — A frappe app that has workflows and reports to make payments to vendors by a company and track them