# AI agents in AmunCore

> An agent is a worker that uses your endpoints and documents: it answers questions, runs scheduled reports and alerts, and can be published as a chat or form app. It thinks with an online AI using your own key, or with AmunCore's built-in engine at no AI cost.

## Two ways an agent can think

- Online AI with your own key: OpenAI, Anthropic (Claude), Google Gemini, Groq, Cerebras, DeepSeek, Mistral, xAI (Grok), Z.ai (GLM), Moonshot (Kimi), Alibaba (Qwen), OpenRouter, Azure OpenAI, or any service that speaks the OpenAI chat format (including Ollama or LM Studio on your own servers). The provider bills you directly.
- Built-in engine (no AI): answers common questions from your records and documents in English and Arabic (including Gulf, Levantine and Egyptian phrasing), and runs steps you choose: get records, group and total, stop if, email, save, show a message. Free and instant.

## What the built-in engine understands

- Lookups: "order 1001", a name, a code.
- Filters: "orders with status cancelled", "unpaid orders this month".
- Counts, totals and averages, by group and by period, compared with the same days of the period before (each group too).
- Largest, smallest, newest and oldest records, chosen by the database among every record.
- A daily briefing of each list, and questions in two parts ("sales today and unpaid invoices").
- Late, open, finished and due (v3.50): "late jobs", "overdue invoices", "الشغل المتأخر" are the records not finished and past their due date; "open tasks" and "المهام اللي لسه متخلصتش" are the ones not finished when no status is called Open (a status called Open is used as it is); "finished tasks" the finished ones; "jobs due today", "الشغل اللي معاده بكرة", "tasks due next week", "upcoming appointments", "in the next 7 days" use the due date. "Who has the most late jobs" groups by the person responsible; grades and scores are compared by their average.
- Business pulse (v3.49): "pulse" or "نبض الشغل" shows what needs attention over every list, for any kind of data: late items and who has them, what is due this week, open items by person, this week against last week, unusual numbers. Columns are found by their roles (person responsible, due date, date, status, number). Template: Business pulse every morning.

## Templates

Grouped by what they do: Answer questions (Ask your data (no AI), Ask your data with AI, Document Q and A, Policy agent (no AI), Search chat (no AI), Public product agent), Reports and alerts (Daily report by email, Weekly summary with AI, Low stock alert, Overdue payments, Data quality check) and Forms and data entry (Request form, Lookup form, Data entry agent). Filter them by No AI or Online AI.

## Ready questions

Questions people can ask the agent, ready to press. "Make questions from the data" reads a sample of what the agent can use (its ticked applications and endpoints, its documents' Excel and CSV files, or its Get records steps), works on the page as it is (also before saving), and writes questions that fit each list: how many, the total this month, this month against last month, totals by a group, customer or month, the top 5, anything unusual, the unpaid ones, the latest, an analysis, and the ageing report, collection list and cash forecast when the data has invoices and dates. Ready questions can be written in Arabic. The questions people ask most come first. An industry pack (28 trades, from retail and clinics to manufacturing, schools, hotels, logistics, lending, insurance and law firms) adds that trade's questions where the data has their lists and columns, and its words as business words pointing at the agent's own lists. People add, change or remove them (up to 40). "Test them" (built-in engine) asks each as a test, nothing kept, and shows a score such as "Answers 18 of 19". They replace the check questions of earlier versions.

They are also the team's questions: in the app's side panel, by group, next to each person's own Saved and Recent, to ask at any point of a chat. A company admin using the app adds one under any answer (Add to team questions), into a group they pick or a new one.

## Schedules and emails

Run every few hours, day, week or month at a time in the agent's own time zone. Results can be emailed as a formatted report, with a bar chart under grouped tables.

The built-in engine writes an analysis of a list when asked ("I need details with analysis for invoices", "حلل الفواتير"): what stands out, the figures, the trend by month, the top names and their share, what is owed and late, the largest records, and how it worked it out.

The built-in engine answers the questions a finance manager asks, from the lists it can read:
- "What are late payers costing me", "cost of the top 10 customers paying more than 30 days late", "تكلفة التأخير": what is owed past the due date, by customer, and what carrying it costs (unpaid amount x yearly rate x days late / 365; say a rate, "at 25%", or it uses 20% and says so).
- "What should we sell more of", "which clients am I losing money on", "ربحية المنتجات": revenue less direct cost by product or by customer, with what to do for each: Grow, Review, Reprice, Investigate or Data missing. A customer's cost of paying late is taken off too.
- "What is shrinking working capital", "why is there never cash", "رأس المال العامل": days to collect (DSO), days in stock (DIO), days to pay (DPO), the cash cycle, and the customers and items holding the most cash.
- "Ageing report", "aged receivables", "أعمار الديون": what each customer owes by days past the due date (not due yet, 1-30, 31-60, 61-90, over 90), with the totals of each.
- "Collection list", "who should I call first", "قائمة التحصيل": the customers to chase, the costliest first (amount overdue x days late), with what they owe, their oldest invoices, their phone and email (from the customers list) and what to do.
- "Cash forecast", "cash flow for the next 13 weeks", "توقع السيولة": cash expected in from customers (each invoice on its due date moved by that customer's usual delay; overdue up to 90 days spread over the next 4 weeks; older left out as at risk) and out to supplier bills, week by week; add today's cash ("starting with 250000") for the balance each week.
The cost of a product can sit on the invoice lines or as a cost price in the products list; the customer can sit on the line or on its invoice. When a list or column is missing, the answer says "Data missing" and names it. A list longer than the agent reads is worked out by the database over every record. The agent's Yearly cost of money (under Its job) sets the rate for late payment; a rate in the question wins.

The lists can also be data files: tick Documents for the application that holds them, and the built-in engine reads its Excel, CSV, JSON and XML files as records, with no step to add (the files the question names, or for a finance question those named like invoices, customers or bills; each sheet of a workbook is its own list). So a company with only an invoices sheet can ask "what are late payers costing me". Invoices that keep only a CustomerID are answered by customer name from the customers list; amounts in several currencies are answered one currency at a time ("what are late payers costing me in AED").

The built-in engine learns questions: when it cannot answer one, teach what it means (built from menus in the test console, or written, checked first), and it is answered that way from then on, also with other customers, cities, numbers or periods ("money stuck at Delta Trading last month" = "what does Delta Trading owe last month" also answers "money stuck at Nile Foods this week"). When it cannot answer, it offers up to 3 questions under "Did you mean"; with "Learn from what people choose" ticked, the one pressed is remembered. What people said lists the questions it could not answer and those marked wrong, ready to teach, and the taught ones; the weekly summary lists the questions not answered.

The built-in engine can answer a question on each run, such as "brief me" for a morning briefing, "unpaid invoices this month" or "sales by branch this month", and email the answer.

## Publish as an app

- Alerts in chat (v3.55.1): people set alerts in words in their own Telegram or WhatsApp chat ("tell me when today's sales are below 50,000"); the agent replies with the figure now and asks "Set this alert?" (Yes or No); checked as that person, sent only when the condition becomes true; "my alerts", "stop alert 2". Off until an admin switches them on (Channels page), where they also choose who can set them (team and invited people, or anyone who can chat with it). Works with offline and online AI agents. v3.55.2: also new records ("tell me when there is a new booking for Mohamed Samy", "قولي لما يكون في حجز باسم محمد سامي": it writes when there is a new one and shows it), a change, a rise or a fall ("tell me when the price of rice changes"), and "just once". v3.57: reminders ("remind me in 3 days to call Nile Foods", "ذكرني بكره الساعة 9 ابعت التقرير": a Yes first, then one message at that time, up to 90 days ahead; v3.57.2: in any wording, such as "Reminder me in 2 minutes to ..." or "اعمل تذكير بعد ساعتين ...", with free text for what to remind; v3.58: reminders for someone else, "remind Ahmed in 2 hours to call Nile Foods", people found by name or whole email, including people invited by email; an answer at a time, "كمان دقيقتين هاتلي كل المواعيد", "in 10 minutes show me today's bookings"; help or مساعدة in a chat lists what that person can do, and the Help page "What people can write" has every case; v3.58.1: on an app for people chosen by email the admin can let them send reminders and alerts to each other (Channels page, Alerts, Who can send to someone else), and a name with an email is found by the email; v3.59: every day or every week, "كل يوم الساعة 9 ابعتلي مبيعات امبارح", "every Sunday at 10 send me last week's sales", "remind me every day at 8 to take the medicine", for up to 90 days), and alerts for someone else: a person who connected their chat ("tell Ahmed when there is a new booking") or, for new records, the person a column names ("when a new booking arrives, message the doctor", "لما يوصل حجز جديد ابعت للدكتور"). Only the team can set alerts for others.
- Agents dashboard (v3.53.3): questions by channel, the latest questions (every 30 seconds), where each main agent sent its questions, those not answered (with Teach), answer times, who asks most and busy hours; filters by agent and channel. Long lists show in pages of 10 (v3.54).
- In every chat app (v3.53.2): a total as a number card; a trend by month or a top list shows its chart first; Ask next under an answer (the same for the period before, and others of the same list); dark mode (kept in that browser); a language button (English or Arabic) for an app set to Automatic.
- A main agent's app: a card for each agent it covers with its questions; Ask above the box chooses who answers (Any: it chooses); each answer under the agent's name, via the main agent.
- Questions and chat (the ready questions as buttons grouped by list, narrowed by a period and up to 3 lists of values such as Customer or City, the answer as a report, and a box to type any question) or Form (boxes and one button: look up a record, or send a request saved through your API).
- The built-in engine needs no steps to answer questions: it reads the lists it can use that a question is about. Steps are for a job (a report by email, a saved record) and use only what it can use.
- A new agent is made step by step, each part checked, with a review before Create; or all on one page.
- For your team: people sign in and the agent works as each person, with their own rules.
- For people you choose (their emails) or the invited clients of a Client Connector: they sign in with a 6-digit email code; read only; clients read as themselves.
- The coverage score on each agent's Activity page: the share of people's questions it answered, week by week.
- For anyone: no sign-in, always read only, with a limit on runs per hour from each address.
- App language: automatic, English or Arabic.
- Chat button on your website: one line (`<script src="https://YOUR-SERVER/a/SLUG/widget.js" async></script>`) adds a chat button on the websites you list (https, up to 5). An app for anyone opens in a panel on the page; an app that signs in opens in a new tab. No other website can show it.
- Short answer (built-in engine): the answer in words with figure cards; each list as a card with Excel, Word and PDF files made in the browser. People can switch to the full report.

## Main agent

Main agent (v3.53, its own kind since v3.53.1): choose Main agent under Basics; its steps are Basics, Brain, Agents (the person it works as and the agents to tick), App, Advanced, Review, with no data, ready questions, steps or schedule of its own. Each question goes to the agent it is about (by its name, description, ready questions, business words, instructions and data names, English and Arabic; when an Arabic and an English agent match the same, the question's language chooses; a follow-up stays with the last one; unclear: an AI main agent asks its model, else buttons to choose). A question about two agents is answered by both. Its app decides which it can use: team agents only when its app is for your team; public ones always; ones for chosen people or clients never (they answer only in their own app); the page marks the ones it cannot use and saving is refused until fixed. A team person reaches team agents (as themselves) and public ones (read only); others only public ones. It cannot send to itself or another main agent. Answers are labelled with the agent's name and kept on its history. One app, Telegram bot and WhatsApp number for all.

## Telegram and WhatsApp

Pictures in records show as pictures in the app: links to pictures (by their ending, or any link in a column named like Image, Photo or صورة) and pictures kept in the database (binary columns, made small for the answer, up to 40 an answer). The AI model is sent "(picture)" or "(file)" in place of stored bytes, never the bytes. AmunCore never downloads a picture link.

Read photos (optional, v3.50.1): a photo button in the app's message box (and the website chat button); the text in the photo is read on the server and asked with the same rules as Telegram and WhatsApp. The photo is not kept; 20 an hour for one person.

Telegram groups (optional, v3.47): tick "Also answer in groups I approve"; people ask with /ask or by replying to the bot; each group waits on the Channels page until an admin approves it; only people who connected their own chat can ask, each with their own access. Answers bring their suggested next questions as buttons (Telegram keyboard, WhatsApp buttons or list). A photo's text is read on the server (OCR); write the question as its caption. The offline agent answers the caption (with no caption it shows what it read and asks); agents with an AI model get the read text with the question. Voice notes are heard by agents with an AI model through their own provider (OpenAI, Groq, Gemini, or a Whisper server as Other compatible service); the offline agent asks to type. Scheduled results can go by Email, Telegram and WhatsApp (ticks under Send each run's result by, in the Schedule; v3.48); who gets them is chosen on the Channels page (Reports On). WhatsApp reports use a Meta-approved template with one variable, which gets the result on one line. WhatsApp setup follows Meta's use-case flow (Create App, Connect with customers through WhatsApp, API Setup, system user token, Configuration, publish); saving subscribes the app to the WhatsApp account.

A chat app's agent can also answer on Telegram and WhatsApp (agent page, Channels): the same answers, people and rules as its published app. Telegram is free: paste a bot token from @BotFather. WhatsApp uses Meta's WhatsApp Business Platform: paste the phone number ID, a permanent access token and the app secret, then paste the callback URL and verify token AmunCore shows into Meta's webhook settings. An app for anyone answers anyone, read only; for other apps each person connects their chat once from the app (Use on Telegram or Use on WhatsApp, a one-time code, also as a QR code to scan from a computer) or from an email invitation, and is checked again at every message. Only typed messages in a person's own chat are answered. Long lists also come as an Excel file (or a CSV file, chosen per channel). Charts come as pictures (drawn on the server with its fonts; on a server with no Arabic font, put a .ttf such as Noto Sans Arabic in App_Data/fonts), and pictures in the records come as pictures with the record's name, up to 6 an answer. Secrets are kept encrypted; every message is checked to come from Telegram or Meta.

Invitations and QR codes (v3.57.1): on the Channels page, Invite tab, tick people (or Invite everyone not connected) and AmunCore emails each their own links: Open in Telegram and Open in WhatsApp buttons for the phone, and QR codes to scan from a computer. Each link works once, for that person, for 48 hours, with the same access they have in the app. The list follows the app's access: the team, the people chosen, or the active clients; people with no email or already connected are skipped. It needs email set up on the server. An app for anyone needs no invitation: the Invite tab shows a QR code for each chat to print or put on a website.

Reports in an app for anyone (v3.51.1): the Channels page lists under Chats the people who wrote to the bot privately, each with a Reports switch (they must have written first).

Save on every step (v3.51.1): the agent page has Save on every step; if anything needed is missing, nothing is saved and that part opens at the box to fix.

Send now (v3.51): in the Schedule, runs once and sends the result by every way ticked, then says where it went or why not; each send is kept in the run's steps.

## Changes from chat

v3.56: an agent with Allow changes saves only through an endpoint that writes (POST adds, PUT changes, DELETE removes); with only lists that read it cannot change anything.

- Always a Yes first: in the app, the website chat, Telegram and WhatsApp, AmunCore shows exactly what will be saved with Yes and No; only Yes saves it, within 10 minutes; any other message drops it; Yes twice saves once.
- Then the endpoint's rules as the person who asked (required fields, row access, approvals, plan, audit log). The reply says Saved, Sent for approval (request 12), or why not.
- Approvals in chat (Channels page, Approvals tab, off by default): approvers who connected their own chat with the agent get each waiting change with Approve 12 and Reject 12 (a reason is needed; Arabic: موافقة 12, رفض 12 السبب). The person who asked in a chat hears the decision there. WhatsApp: within 24 hours of the approver's last message.
- The built-in engine (no AI, v3.56.1): "add a booking", "احجز موعد": it asks for each of the endpoint's Required fields, then shows the record with Yes and No. "field: value" in the message is taken as it is. "change booking 88: status: Confirmed", "delete booking 88". "cancel" (إلغاء) stops.
- Undo (v3.56.1): after an add, Undo (تراجع) removes the record within 5 minutes, through a list of the same table that deletes.
- Cancel a request (v3.56.1): "Cancel request 12" (إلغاء الطلب 12) in the chat it was asked in, while it waits.
- Scheduled runs and forms save as before.

## Safety

- Everything goes through the REST API as the agent's person: plan quota, row and column rules, approvals and audit log apply.
- Changes wait for approval by default.
- An agent uses only the endpoints you ticked and emails only the addresses you listed.
- Limits per agent: tool calls per request, seconds and tokens per run, runs per day, and an end date.

## Plans

Agents need a plan with MCP (Pro or Enterprise). Without numbers in the license, Pro allows 5 agents and 3,000 runs a month, Enterprise 100 agents and 100,000 runs a month.

## Related

- [App Builder](https://amuncore.com/docs/app-builder.md)
- [AI access over MCP](https://amuncore.com/docs/mcp.md)
- [AmunCore overview](https://amuncore.com/llms.txt)
