Trying an AI Agent in a Rental Management System
· Tech · AI Agent / Flask / SQLite
I wanted to try building an AI agent, and a friend's family happened to work in the rental business in Chengdu. So I made a small rental-management system and asked them to help me test it in a realistic workflow.
The prototype only needed to run locally on one device, with no multi-device synchronization, so I intentionally kept the stack simple: SQLite for storage, Python and Flask for the application, and a basic agent for natural-language operations.
My first attempt at building an agent
I used DeepSeek, and this was also my first time building an agent, so the early version was not very reliable. It often failed to produce the expected statistical reports or complete SQL queries correctly.
I tried adding another AI as a verifier. Within a fixed number of interaction rounds, the agent was only allowed to stop after it had produced the correct output and called the required programs. This clearly reduced errors in the early version. However, the quality of the model and the accuracy of the prompt still mattered more.
Making it easier to use
They did not like opening the computer system for every small task, and some older users found detailed forms difficult to operate. I therefore added a natural-language input box. Users can describe a property as they normally would, and the AI extracts the information and maps it to the appropriate fields. After checking the parsed values, they can add the record directly.
Besides structured property records, they also had contracts and other complex documents to manage. I added a simple RAG system based on a vector database: after a document is uploaded, the system automatically generates its embeddings, and users can then search for related information in natural language. I tested the document workflow separately several times, and it ran reliably, although the way the embeddings were generated clearly affected retrieval accuracy. This part is still worth improving.
The system also exposes several REST APIs, allowing external agents to query records, call system functions, and access generated documents. They connected these APIs to a third-party AI agent that supports a WeChat bot, and then used WeChat to search for properties, generate property PDFs, and update records.
I was personally against letting AI modify data directly, but they wanted the convenience. I therefore added explicit backend restrictions: each operation can only read or write a small number of records, and the system supports data backup and import.
They later told me that the system had helped them complete several rental transactions and had genuinely improved their efficiency.