 In Telegram Beta for macOS 13.1.0 (_283365_), a new «Agent» feature has been discovered, which will allow users to connect third-party AI services using their own API keys.

Five providers are currently supported:
× OpenAI (_ChatGPT_)
× Anthropic (_Claude_)
× Google (_Gemini_)
× xAI (_Grok_)
× OpenRouter
The list of providers is loaded from the server, so new services can be added without updating the app.

To set it up, users will need to select an AI provider and enter their own API key. Each service has a direct link to the page where users can obtain a key. Once connected, the message «_You can now use _`@``agent`» will appear, indicating that the selected AI service is ready to use via `@agent`.

Users will be able to connect multiple providers at the same time and switch between them by selecting the active provider for `@agent`. For each connection, Telegram stores the date it was added and the last four characters of the API key. These settings are also synchronized across devices.

The code also includes support for individual AI models, their names, and search functionality. One of the providers mentions «_Hundreds of models_», which likely refers to OpenRouter. However, the ability to manually select a specific model has not yet been confirmed.

The API key is sent through Telegram's servers during the connection process, and the system checks whether the key is valid and the provider is available.

The feature is being developed separately from AI Editor. It is still unknown exactly how users will interact with `@agent`, through a private chat, inline mode, or another mechanism.

The feature is not yet available to users.

[@telelakel](https://t.me/telelakel) | [#new_tgbeta](?q=%23new_tgbeta)