Skip to main content
Draft: these steps await verification against the current release of AgentKit.
Outcome: an agent reads (and, if you allow, writes in) a Telegram account through the Telegram capability. Telegram needs two things: once per Mac, your own Telegram app, and then one connection per account. AgentKit ships no shared Telegram app, so a block on one app never breaks anyone else’s login.

What you need

  • The Telegram capability installed and allowed in Capabilities. See Capabilities.
  • An app of your own from my.telegram.org: its App api_id and App api_hash.
  • The Telegram app on your phone, signed in to the account you want to connect, and the account’s two-step password if it has one.
  • Optionally, for transcribing voice messages, a Deepgram key in Settings > Transcription.

Steps in the app

1

Open the Telegram capability

For a shared connection any agent can be granted, open Capabilities and press Telegram. For the agent’s own account, open the agent’s page and press its Telegram tile instead.
2

Set up the Telegram App

The Telegram App block sits above Connections. Enter App api_id as shown on my.telegram.org and App api_hash, then Save. Beside the block’s title, AgentKit shows whether Telegram accepts the app, rejects it, or has blocked it, with Telegram’s reason. A link at its right shows the steps to create the app.Until the app is set, Add stays disabled with the reason.
3

Add the connection by QR code

Press the last tile in Connections. A sheet shows a QR code. On your phone, open Telegram’s settings, choose to link a device, and scan it.
4

Enter the two-step password, if asked

When the account has a two-step password, the sheet asks for it next.Logging in by phone number and code is the second way, a link away in the same sheet.
5

Grant it to an agent

A connection added on the capability’s page is shared. On the agent’s page, open its Telegram tile and use Give access, choosing read or read and write. A connection added on the agent’s page is already that agent’s own and granted to it.

Steps by command line

The capability’s own command covers the same setup and login; telegram help gives its reference, and telegram doctor checks that it is ready.

Check it worked

  1. The connection’s tile shows the account’s name and its Telegram id, with a health dot once checked. Use Check from its ⋯ menu.
  2. In the agent’s view, the connection shows as granted, marked read or read and write.
  3. Ask the agent in a session to read a recent chat.

Common failures