In short.
shopkeeper-agent is a Chinese-language tutorial project for developers learning AI-powered database querying, but its multi-service setup and limited production safeguards require additional engineering. The README describes a workflow that retrieves fields, business metrics and field values before generating, checking, correcting and executing SQL. Companion chapters and Git branches explain the system incrementally. Query accuracy, performance, operating cost and deployment reliability are not established, and the documented behavior remains untested.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage is limited to README.md at [https://github.com/didilili/shopkeeper-agent/blob/main/README.md], fixed to revision 5f9ec8d85e0620264b14ef8d1182f7d4d7793a8e, and its adjacent LICENSE notice. Implementation files, configurations, dependencies, embedding weights, linked tutorials, chapter branches and referenced images are excluded. Nothing was executed; setup success, SQL correctness, security enforcement, performance and production operation remain untested.
The overview
Identity
shopkeeper-agent, published under didilili, is the companion source project for the e-commerce querying portion of ai-agents-from-zero. Its intended application lets someone ask a business question in ordinary language and receive database results through a chat-style interface.
The README presents both a complete application architecture and a learning path covering warehouse concepts, metadata preparation, retrieval, agent orchestration, APIs and frontend integration. The repository address is [https://github.com/didilili/shopkeeper-agent].
Assessment
Its strongest documented value is showing how several parts of an AI application fit together: database metadata, semantic search, keyword search, model calls, workflow nodes and a streaming interface. Chapter-specific branches make those integration steps more approachable than a single finished codebase.
It is a plausible fit for guided development practice or a prototype foundation. The README does not establish reliable business answers or production readiness, and it explicitly leaves substantial governance and operational capabilities outside the teaching scope.
Users
Developers learning LangGraph, retrieval-augmented generation or natural-language-to-SQL systems are the clearest audience. More experienced developers can use the documented architecture to study service boundaries, client management, repository layers and request-level logging.
Business users are the intended audience of the resulting query interface, while installation assumes a developer environment. The README and chapter titles are in Chinese, and the specified embedding model is BAAI/bge-large-zh-v1.5. The quality of support for other languages is unknown.
Capabilities
The documented application retrieves three kinds of context: database fields, business metrics and actual field values. It then assembles and filters that context before generating SQL, checking it with EXPLAIN, attempting error correction and executing the query.
FastAPI exposes the query interface, while server-sent events stream progress, results and errors to a React frontend. The README also describes request_id logging through ContextVar and loguru. These are documented capabilities, without established runtime results.
Using it
Requirements
The stated development requirements are Python 3.14 or newer, uv, Docker with Docker Compose, Node.js and pnpm. The local stack includes MySQL, Elasticsearch, Kibana, Qdrant and a Text Embeddings Inference service. Node.js and individual service version requirements are not specified in the supplied README.
A model API key is required. The documented default is Pro/zai-org/GLM-5.1 through SiliconFlow at [https://api.siliconflow.cn/v1]. Other OpenAI-compatible endpoints can be configured by changing model_name and base_url. The embedding weights must be downloaded separately; minimum RAM, storage, GPU requirements and total download size are unknown.
Mechanism
Preparation builds a metadata knowledge base from the teaching warehouse. MySQL holds structured descriptions of tables, fields and metrics. Qdrant holds vectors for semantic retrieval of fields and metrics, while Elasticsearch indexes actual field values for keyword matching. TEI serves the embedding model that converts text into vectors.
At query time, keyword extraction drives separate retrieval paths. LangGraph coordinates merging results, filling dependent fields, filtering candidates and adding date and database context. The model generates SQL from that context, followed by the documented EXPLAIN, correction and execution stages. The checks do not establish that the resulting query correctly interprets the business question.
Setup
The documented sequence begins by cloning the repository, entering its directory and running uv sync. Copy .env.example to .env and set LLM_API_KEY. Configure another compatible provider in conf/app_config.yaml if needed.
Download the embedding weights with uv run hf download BAAI/bge-large-zh-v1.5 --local-dir docker/embedding/bge-large-zh-v1.5. Start the infrastructure with docker compose -f docker/docker-compose.yaml up -d. The README says docker/mysql/meta.sql and docker/mysql/dw.sql initialize the metadata database and teaching warehouse on the MySQL container's first start.
Build the retrieval data with uv run python -m app.scripts.build_meta_knowledge -c conf/meta_config.yaml, then start the backend with uv run fastapi dev main.py. In frontend, run pnpm install followed by pnpm dev. Vite forwards /api requests to [http://127.0.0.1:8000] by default. Successful installation and compatibility remain unassessed.
Example
The documented example sends {"query":"统计华北地区的销售总额"} to POST [http://127.0.0.1:8000/api/query]. The question asks for total sales in North China.
The interface is described as returning progress, result and error event types. The example illustrates the intended request and response protocol; it does not establish a particular SQL statement, numerical answer, response time or successful execution.
Assessment & evidence
Limitations
The README places login, role and data permissions, tenant isolation, SQL security auditing and execution allowlists outside the project's main teaching scope. Its SQL checking loop therefore does not establish production access control or safe execution policy.
Other stated exclusions include caching, rate limiting, performance governance, systematic evaluation and regression testing, monitoring and alerting, staged deployment, and more complex conversation memory and follow-up handling. Accuracy, latency, concurrency limits and recovery behavior are unknown.
The default model endpoint is a hosted service. Exact request contents, provider retention terms and privacy guarantees are not established by the supplied text.
Design rationale
The design addresses mistakes identified in the README: choosing the wrong table or field, misunderstanding a metric and inventing SQL details. Retrieving schema descriptions, metric definitions and actual values is intended to give the model more relevant context before generation.
Its division of storage responsibilities also provides a concrete lesson in system design: structured metadata in MySQL, meaning-based retrieval in Qdrant and value matching in Elasticsearch. That educational benefit follows from the documented architecture; no comparative evaluation quantifies an accuracy improvement or justifies the extra infrastructure for a particular workload.
Alternative learning routes
For a broader introduction, the README links the parent ai-agents-from-zero curriculum at [https://didilili.github.io/ai-agents-from-zero/#/]. Its content beyond the supplied README is not assessed.
Within shopkeeper-agent, branches such as 10-agent-workflow-skeleton and 14-agent-sql-loop offer narrower study stages, while main is described as the complete workflow. No competing natural-language-to-SQL product is evaluated, so relative quality, cost and operational maturity are unknown.
Evidence
The technical description comes from the revision-specific README at [https://raw.githubusercontent.com/didilili/shopkeeper-agent/5f9ec8d85e0620264b14ef8d1182f7d4d7793a8e/README.md]. It supplies architecture, requirements, commands, an API example, a chapter map and explicit capability boundaries.
The license notice is at [https://raw.githubusercontent.com/didilili/shopkeeper-agent/5f9ec8d85e0620264b14ef8d1182f7d4d7793a8e/LICENSE]. Application code, configuration contents, linked chapters, branch contents and referenced images are not assessed. The supplied text does not establish measured accuracy, performance or successful runtime behavior.
Access & freshness
Costs
The README describes the companion tutorial material as free. It supplies no model API prices, token usage per question or total operating estimate.
Running the documented stack requires local or hosted compute, storage and an external model endpoint. These may create infrastructure and API charges. Their amounts, along with hardware needs and embedding download size, are unknown.
Rights
The adjacent LICENSE is MIT, with copyright attributed to didilili in 2026. It permits use, copying, modification, distribution, sublicensing and sale of the software and associated documentation, provided the copyright and permission notice accompany copies or substantial portions. It provides no warranty.
The README states that the project is based on 尚硅谷's 大模型智能体掌柜问数 teaching project and was reorganised and refined from it. The captured LICENSE names only didilili. The evidence does not show that earlier project's terms or whether material derived from it is covered by this MIT grant, so that remains unknown. The supplied notice does not establish separate terms for externally downloaded embedding weights, model services or linked tutorial material.
Freshness
This description applies to source revision 5f9ec8d85e0620264b14ef8d1182f7d4d7793a8e, captured on 14 November 2026. The README states that the project has finished updating and that its companion tutorial, chapter branches and frontend and backend code are all available to study together; elsewhere it describes the tutorial as continuously updated.
The supplied material does not establish a project release number, last-maintenance date or subsequent changes. Continued availability of the named model endpoint and compatibility of current dependencies are unknown.
Practical next steps
For learning, begin with the warehouse and architecture chapters, then follow the environment, metadata, retrieval and agent branches in order. Use the teaching warehouse to understand how fields, metrics and values influence the generated query.
For an existing warehouse, assess the metadata mapping work and check representative questions against known-correct SQL and results. Before business deployment, implement and verify the access controls, SQL execution restrictions and operational capabilities identified as outside the teaching scope. Production suitability remains unassessed.
