-
Notifications
You must be signed in to change notification settings - Fork 149
Telegram bot
igardev edited this page Jul 24, 2026
·
13 revisions
- Tools server
- Embeddings server (if search_source tool is used)
You can program from your phone with llama-vscode and Telegram. Part of the agent functionality of llama-vscode could be used from Telegram (i.e. from phone) via a Telegram Bot. The user creates a Telegram Bot and sets it's token in setting telegram_api_token. After that all messages to this bot are forwarded to the agent in llama-vscode. The AI agent answers are sent to the user in Telegram. For security reasons, only users from a white list (setting telegram_bot_users) are allowed to use the bot. The bot answers, for example to /help command, are provided in the language, which is set in setting "Language".
- Create a Telegram Bot and set it's token in setting telegram_api_token. Creating a bot in Telegram is simple - open bot @BotFather, click Start and execute the command /newbot. There you will see the bot API token.
- Set the bot API token in setting telegram_api_token
- Find your user id in Telegram (in Telegram bot @userinfobot send "/start") and add it to setting telegram_bot_users
- Enable the bot in setting telegram_bot_enabled
- From your Telegram (for example from your phone) send a message to the bot The message will be forwarded to the agent in llama-vscode and the bot will send back the answer. Here are the commands (messages, which starts with "/"), which the bot can execute (if the message doesn't start with "/", it is sent to the agent) : /env - shows the current tools model and agent /models - shows the available models /agents - shows the available agents /set-model n - sets the model to the n-th model. (models numbers are available from command /models) /set-agent n - sets the agent to the n-th agent. (agents numbers are available from command /agents) /stop - stops the agent /status - shows the current status of the agent /chat n - gets the last n characters of the current chat. If n is not specified, the last 1000 characters are returned /help - shows help information for using the bot
- telegram_api_token - Telegram Bot token
- telegram_bot_users - List of users, which are allowed to use the bot.
- telegram_bot_enabled - Enable/disable the bot
- telegram_chunk_size - The size of the chunks (in chars), which are sent as AI response to Telegram. Each chunk is a separate message.
- language - The language, on which the bot provides help and other bot specific answers.