AI Agent 0.3.0: The assistant in Telegram, voice input and a time limit on chats
AI Agent 0.3.0 lets people use the PhoenixKit AI assistant from Telegram, speak to it instead of typing, and gives site owners a time limit on chats and a choice of the file types it accepts. The chat panel also works better on a phone.
The assistant in Telegram
A person who linked their Telegram chat to the site’s bot (Profile → Telegram) can now write to the bot, and the assistant answers there with that person’s own rights, model, instructions and limits. It is off by default: an administrator switches on Answer in Telegram in Settings › AI Agent, and each role that should use it needs the new Agent in Telegram permission, which no role gets by itself, Admin included.
A change the assistant wants to make arrives as a card with ✅ Confirm and ❌ Cancel. Nothing changes until the person confirms, and the card then shows how it ended, also when the change was settled on the site. Photos and image files go into the conversation like an upload in the panel, and an album is one question. /new starts a new conversation and /help says what the bot reads. The same chats show in the site’s chat panel with a Telegram badge.
Assistant in Telegram, switched off here.
Voice input
With a Speech recognition model chosen in Settings › AI Agent, a microphone button (Dictate) appears next to the message box. The recording is written down into the box, so you can correct it before sending. In Telegram a voice message is written down, the bot shows 🎙 Recognised: with the words, and then answers them. A recording can be up to two minutes. Neither the audio nor the words are logged or kept, and what recognition costs counts toward the person’s spending limits.
A time limit on chats
A new Keeping chats card lets an Owner set Keep chats for, days. Each night, chats whose last message is older than that are deleted for good, with their messages and files. Archived chats are included. Before saving, the card shows how many chats the next run would delete. It is empty by default, and then nothing is deleted. Each run is recorded in the Activity log, with counts only.
Accepted types of file
Types of file in chats limits what people may attach: any of PNG, JPG, WebP, HEIC, PDF, XLSX, CSV, TXT and MD. The server checks the type by the file’s content, also for pictures sent in Telegram, and a refused file names the types the site takes.
How long chats are kept, and which files people may attach.
A better chat panel
- Files upload in parts and carry on after a lost connection or a reload. A file stays with the chat it was added to.
- On a touch phone every button is at least 44 × 44 px, and Enter starts a new line instead of sending.
- A chat’s Rename and Archive now sit behind its ⋯ button, and Escape closes them.
- The panel stays open when you move to another admin page and keeps the latest message in view.
- A Stop within 600 ms of Send, the second click of a double click, is ignored.
- A Settings form that someone else saved meanwhile saves only the fields you changed, and refuses when one of those changed too.
Upgrading
AI Agent 0.3 needs PhoenixKit 3.5.0 or later and AI 0.27 or later; voice input needs AI 0.28 or later. Run mix phoenix_kit.update so the nightly clean-up job is added; the module’s tables do not change. To answer in Telegram, add config :phoenix_kit, :telegram_updates_reader, {PhoenixKitAgent.Telegram.Reader, :holds?, []}, make sure the bot has no webhook, switch the assistant on in Settings › AI Agent and grant Agent in Telegram to the roles that should use it.
Full release notes: AI Agent 0.3.0
0.3.0 · 15 November 2026
The assistant in Telegram, voice input, an optional time limit on chats, a setting for the accepted types of file, and a chat panel that works on a touch phone and fits into a host’s own header.
Requirements
phoenix_kit >= 3.5.0 and < 4.0.0(was>= 2.64.0): the chat panel’s resumable uploads (UploadManager,ResumableUpload), the linked Telegram chat as an actor, and the writes such a chat holds for confirmation.phoenix_kit_ai ~> 0.27(was~> 0.26). Voice input needs aphoenix_kit_aiwithtranscribe/3(0.28 or later); without it, voice is off and Settings says so.- Run
mix phoenix_kit.updateafter updating, so the host’s crontab gets the nightly retention job. There is no new migration of the module’s tables. - To answer Telegram, a host declares
config :phoenix_kit, :telegram_updates_reader, {PhoenixKitAgent.Telegram.Reader, :holds?, []}and switches the assistant on in Settings → AI Agent (see the README).
Added
- The assistant in Telegram (
PhoenixKitAgent.Telegram.*, off by default,agent_telegram_enabled). A person who linked their Telegram chat to the site bot, and whose role has the new opt-in permissionagent.telegram, writes to the bot. The assistant answers there with that person’s own rights, model, instructions and limits.- One reader polls the bot across the cluster. The offset is stored before a batch is handed on, so an update is answered at most once.
- A queue for each chat keeps its messages in order;
/newstarts a new conversation and/helpexplains what the bot reads. - A requested change is shown as a card with ✅ / ❌ buttons. It is made only when the person confirms, and the card is edited to the outcome, also when the change was settled on the site.
- Photos and image documents go into the conversation like a panel upload, and an album is one question.
- Every answer, part and retry is checked against the current link and rights before it is sent.
- Voice input (
PhoenixKitAgent.Speech): a speech model (agent_speech_endpoint_uuid, the AI taskagent.speech) writes down a recording from the panel’s microphone into the composer, or a Telegram voice message, which is then answered. The limits are checked again right before paying, and neither the audio nor the words are logged or kept. - An optional time limit on chats (
agent_retention_days, Owner only, empty by default, which deletes nothing;PhoenixKitAgent.Retention,RetentionWorker). Each night, the chats whose last message is older than the period, and the chats users deleted, are deleted for good with their messages, attachments and library files. A chat in use is left for the next night. Each run ends with a sweep of library files a failed release left behind. The page previews what a typed period would delete, and the run is recorded in the Activity log (counts only). - The accepted types of file (
agent_attachment_types, Settings → AI Agent): a sublist of png, jpg, webp, heic, pdf, xlsx, csv, txt and md. Empty means all of them. The server checks the type by content, also for Telegram pictures before they are downloaded. - A Storage
file_uuidin a ready attachment’s history line, andAttachments.file_for_user/2, so that a host tool can act on the file after checking its owner. A confirmed write keeps itsok/failedcounts. - The chat panel on a touch phone: every button is at least 44 × 44 px
under a coarse pointer, and Enter breaks the line there. A host can show
the panel’s header buttons in its own header (class
pk-agent-compacton<body>), and hearspk-agent:turn(start/done) onwindowwhen the panel starts or stops showing a turn.
Changed
- The panel’s file input is core’s upload manager, with chunked, resumable uploads that a lost connection or a reload continues. A file stays with the chat it was added in.
- The panel on live navigation stays open and keeps the latest message in view; a reader who scrolled up keeps their place over a reconnect.
- A chat’s Rename and Archive are behind its “⋯” button, and Escape closes them.
- A Stop that comes within 600 ms of Send (the second click of a double click) is ignored.
- A stale Settings form saves only the fields the person changed, and is refused when one of them changed meanwhile.
Fixed
- A confirmed write whose click was lost, then refused before core reached the row, reads as confirmed, not failed.
- A recognition is not paid for when the panel will have given up waiting for it.
- Turn and confirmation locks are judged by the database’s clock.
AI Agent 0.3.0. Install or update: {:phoenix_kit_agent, "~> 0.3"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.