
AI agent for libraries: catalog, loans and holds with clear limits
How an AI agent for libraries answers catalog, loan and reservation questions, logs every reply, and leaves fines and exceptions with library staff.
Want to apply this in your company?
Book a call with Juan →An AI agent for libraries checks the catalog and the loan system to report availability, published due dates and the status of holds, and it records every answer. It can place a hold within the rules the library has set. Fines, renewals outside the rules and exceptions are not its decisions. Those cases go to the library team with a summary already prepared.
The term superintelligence appears often in searches, but for a library, what gets deployed is an agent with access to only a few tools. It helps to separate the two before buying any solution. For the difference between the hype and the operation, the article on what ChatGPT is and what it is not helps align the conversation with the board.
Key takeaways
- The agent answers with data from the library system, never with its own memory of the collection.
- Holds are created by fixed rules (limit per reader, pickup window, queue order), not by model judgment.
- Fines, waivers, special extensions and exceptions belong to the library staff, with a record of who decided and why.
- Every conversation leaves a record: the question, the data consulted, the action taken and the handoff to a person, when one happened.
- A pilot should start with one type of request and an agreed metric before the scope grows.
What the agent answers on its own
Most of a library's volume is repeated questions: whether a book is available, at which branch, when a loan is due, whether a newer edition exists, what the opening hours are. These questions have objective answers and can be handled by looking up the data.
The agent needs read-only access to the catalog and to item status. It should not infer availability from old web pages or copied spreadsheets. If the system does not return the data, the correct reply is to say the information is not available at that moment and point to the desk or the official channel.
For the reader, this means a short answer with the data and the time it was checked. For the staff, it means fewer interruptions at the desk without losing traceability.
How holds work without improvisation
A hold is a promise about a place in a queue. That is why the rule must be written before the agent touches it. The points that usually define the behavior are: how many holds a reader can have at once, how long an item stays set aside after it is returned, what happens if the reader does not pick it up in time, and how the queue is ordered.
The agent creates the hold by calling a specific tool, which applies those rules and returns the result. The model does not calculate queue position or decide whether a reader can skip ahead. It only turns the reader's request into a call and explains the tool's result.
If the tool refuses the hold because the reader has reached the limit, the reply should state exactly which rule applied and how the reader can proceed, for example by cancelling an earlier hold. It should not suggest that staff can make an exception unless that role has been formally defined.
What the agent never decides
Some decisions should not pass through the agent, even when the tool is technically reachable:
- Final calculation or waiver of a fine, including requests for leniency for personal reasons.
- Loan extensions beyond what the policy allows.
- Exceptions for rare material, in-library reference items or items under restoration.
- Releasing a loan for a reader with an outstanding issue, whatever reason is given.
- Interpreting the regulations in an ambiguous case, such as a conflict between two internal rules.
The fine amount shown to the reader should come from the library system, and the agent only explains where that figure comes from. When a reader disputes it, the case goes to a person, with the loan history and the rule applied. This separation is what makes the agent useful to staff, rather than a channel that promises what nobody can deliver.
How to set up the minimum architecture
A simple design usually has four parts. The first is the entry channel, which can be the website, WhatsApp Business or the library app. The second is the model, which interprets the question and chooses the tool. The third is a small set of tools: look up the catalog, look up the reader's status in a restricted way, create a hold within the rules, and open a handoff to staff. The fourth is the decision log, which stores each call and the reason for any handoff.
Tool permissions should follow the principle of least privilege. An agent that reports availability does not need to see a reader's full loan history. If personal information is not needed to answer, it should not be sent to the model at all. For the personal data side, the practical path is to check LGPD requirements with the institution's data protection officer and follow the guidance of the national data protection authority, ANPD. For role-based access control, the OWASP authorization guidance is worth reading with the technical team.
It is also prudent to treat reader messages as untrusted input. Someone may try to persuade the agent to release a hold outside the rules by hiding instructions in the text. For that reason, the rule must live in the tool, not only in the instructions given to the model. The OWASP guidance on prompt injection prevention describes this kind of risk.
Illustrative scenario: renewal and a fine dispute
Illustrative scenario: a reader at a university library writes on WhatsApp asking to renew a book that is due today, because they need it for an exam. They also say the earlier fine was unfair and ask the agent to remove the charge.
The agent checks the system, confirms the policy allows a renewal because no other reader has a hold on that copy, and runs the renewal through the tool. In the same reply, it states the fine status as recorded in the system and explains that disputes are reviewed by the library team. It opens a handoff with the loan number, the reason the reader gave, the date of the dispute and the rule that applies, without repeating unnecessary personal details. To the reader, it gives the response time the library has published.
If another reader had a hold on that book, the renewal would be refused by the tool, and the reply would say so clearly, without promising alternatives the rules do not provide. In neither case does the agent decide on the fine.
Pilot plan in stages
The safest path is to start small. A typical plan follows this order:
- Map the current desk and message flow, including the most frequent questions and the cases that cause disputes today.
- Write the hold, renewal and fine rules in a form that can be tested, and name who has authority to change them.
- Limit the agent to lookups and to creating simple holds and renewals, with handoff for everything else.
- Test with anonymized real questions and edge cases before exposing the channel to the public.
- Agree on a success metric, such as the share of questions resolved without an incorrect handoff, and review the logs every week.
- Transfer operation to the library team with written instructions, then decide whether to expand, adjust or stop.
This is the method we follow in projects of this kind: map the process and the baseline, limit data and actions, pilot a real flow with logs and an agreed metric, then transfer and decide the next step. There is no promise of a result, only a criterion for continuing or stopping.
For a realistic view of what an agent does today, without the hype, the article on what an agent does in practice describes the scope. For customer service in general, the guide on what to automate and what to keep with people offers criteria that also apply to a library.
Organize catalog data first
The agent only answers well if the catalog is consistent. Duplicate titles, copies without updated status and location fields filled in different ways produce wrong answers that look precise. Before the pilot, review the fields the agent will read: title, author, edition, branch, item status and expected return date. The article on data that should be organized before any agent lists what to standardize first.
Frequently asked questions
Can an AI agent apply fines in a library?
It should not. The fine calculation must come from the library system, and any waiver, discount or dispute must be decided by an authorized person. The agent can explain the rule, report the recorded amount and pass the case on with the necessary history.
Can the agent create holds on its own?
Yes, as long as the creation goes through a tool that applies the library's limit, pickup and queue rules. If a hold does not meet a rule, the tool refuses it and the agent explains why, without working around the system.
Which reader data should the agent access?
Only what is needed to answer the question, with access restricted by role. Information such as a full loan history is usually not needed to report availability, and the institution should assess how this data is handled under the LGPD with its data protection officer.
How do you know if the pilot worked?
The answer depends on the metric agreed before the start, such as the share of questions resolved correctly and without unnecessary handoffs. The conversation and tool logs make it possible to review cases and decide whether the agent should be expanded, adjusted or switched off.