Arlem

Insights / Legatus

An AI agent in the group chat: a Telegram walkthrough

What it looks like when an AI agent joins the team as a member rather than a tool: taking dictation, checking the database, issuing documents, and asking before it writes. A short walkthrough with a tea wholesaler as the example.

TopicAI agents
SystemsLegatus
PublishedSeptember 2026
Reading time7 min

A member, not a menu

Most "AI features" are a button inside an app the team has to open. An agent is the opposite: it lives where the team already talks, in this case a Telegram group, and it does the work a back-office person would do if the company had one. It has a name, a set of things it is allowed to do, and a database it reads and writes through code.

Below is a compressed version of a real morning for a two-founder specialty tea importer. The numbers are illustrative. The behavior is exactly what runs today.

The walkthrough

Kura Matcha · operations Telegram
FounderSold 5 kg ceremonial to Café Norte, they paid 3 kg today in pesos, transfer to Galicia. Rest on account.
LegatusPreview:
Sale · Café Norte · 5 kg Ceremonial @ list · total 1,250,000 ARS
Collection · 750,000 ARS → Galicia ARS · today
Balance Café Norte after: 500,000 ARS (was 0)
Stock Ceremonial after: 41 kg (≈ 38 days at current pace) Confirm?
FounderConfirm. Send the delivery note.
LegatusRecorded (sale #418, movement #1,207). Delivery note 0041 issued → PDF attached. Want it with prices or without?
FounderWithout. Who owes us more than 30 days?
LegatusThree accounts, oldest first:
Tea Shop Palermo · 380,000 ARS · 44 days
Casa Kyoto · 1,200 USD · 37 days
Café Sur · 210,000 ARS · 31 days
Total ≈ 2.0 M ARS at today's rate.
FounderRemind Casa Kyoto politely, in English, and copy me.
LegatusDraft to Casa Kyoto: "Hi Ana, a gentle reminder that invoice 0392 (1,200 USD, due Aug 1) is still open. Let us know if you need the details again. Thanks!" Send?
Under the hoodThe model decided what to do. The code computed every number from the database. Nothing was written until the founder said "confirm".
Amounts and names are examples. The flow, the preview and the confirmation step are the production behavior.

What happened underneath

Each message went through the same four steps.

  1. Understand. The model reads the message with the company's vocabulary loaded: product names, customers, accounts, currencies. "Galicia" resolves to a specific peso account; "ceremonial" to a specific product.
  2. Ask the database. Before proposing anything, the agent calls tools that read the record: list price, current balance, stock, days of stock. These are functions in code, not guesses. The same tools are available in Claude through MCP for whoever prefers a desktop.
  3. Preview. The agent shows exactly what it intends to write, including the consequences (new balance, new stock). This is the moment a human catches "no, that was 4 kg".
  4. Write, then act. On "confirm", code writes the rows inside one transaction, and only then produces the document, the PDF or the reminder.

Other jobs the same agent takes

  • Data entry from documents. A supplier's price list arrives as a PDF or an Excel in the chat; the agent turns it into rows, flags what changed since last week, and asks to load it.
  • Quotes and orders. "Price for 20 kg culinary to a new café in Rosario" returns list, discount rule and delivery cost from the database, and an order draft if you say yes.
  • Documents. Delivery notes, invoices with tax, statements per customer, produced from the record with the numbering the accountant expects.
  • Reading the inbox. Supplier confirmations, bank notifications and customer emails classified and summarized into the same chat, with the relevant rows updated after confirmation.
  • Questions. Cash by account, what a customer bought last quarter, exchange difference this month. Same figures as the dashboard, because it is the same code.

What it is not allowed to do

Write without a preview. Talk to anyone outside an allowlist of people and groups. Exceed a rate of actions per minute. Compute a price, a margin or a balance itself; it must call the function. Delete history; corrections are new rows. Every action is logged with who asked, what was proposed and what was written.

The result is an agent the founders trust with money, because it behaves like a careful new employee: it reads the file, shows its work and asks before it commits.