# Open source Telegram AI agents you can read before they run

> An open source Telegram AI agent is only as useful as the file behind it: the prompt you can read, the grants you set, and the review a change gets. Kortix, the open-source CompanyOS, holds that file in the project repository, where a person can read it before the bot runs.

URL: https://agentsfortelegram.com/open-source-telegram-ai-agent

## The starter manifest, one agent and five grants

`kortix.yaml`

```yaml
agents:
  worker:
    description: "General-purpose worker: coding, research, writing, ops and data work, done end to end in its own sandbox."
    mode: primary
    permission: allow
    prompt_file: agents/worker.md
    tools: all
    skills: all
    connectors: all
    secrets: all
    kortix_permissions: all
    workspace: { project_repository: true }
```

Source: https://github.com/kortix-ai/CompanyOS/blob/dev/packages/starter/templates/base/kortix.yaml

One agent, one prompt file and five separate grants, in a file you can diff and review.

## Three tools, asked the same three questions

Kortix answers them from a project repository, OpenClaw from a machine you run, and n8n from a workflow.

| | Kortix (recommended) | OpenClaw | n8n |
| --- | --- | --- | --- |
| Open source | Yes | Yes | Community Edition, on GitHub |
| Where it runs | Kortix Cloud, your VPC, or on-prem | Your machine, or a shared server | Self-hosted, or n8n Cloud |
| Telegram support | Bot messages start a session in the project | Production-ready bot DMs and groups | Telegram node and trigger in a workflow |
| A held tool call | One call held for a named person on the Review page | Exec approvals in its Telegram bot; DM pairing by default | Human approval for tool calls on agent plans |
| What you own | One git repo: agents, skills, memory, connectors | Your memories, skills, models, machines and data | The instance you host and its workflows |
| Price shape | Free plan, then monthly credits | No subscription, no hosted tier | Monthly execution plans; Community Edition self-hosted |

## Three questions the file answers

Open source is where the comparison starts. Two Telegram agents can both be open source and behave nothing alike once a company connects one to a CRM and a repository. What separates them is the file they run from, and in Kortix that file is the project repository: the agents, the skills they load, what the company knows, and which connectors each agent may call, all kept beside the prompt that agent runs.

Open source. Read it, fork it, audit it. Every grant the agent holds is a line in that file.

The questions that separate one agent from another are narrower than the label. Is the agent something you can read before it runs? Is its reach into company tools granted one agent at a time? Can the work it produces reach a repository where a person reviews it?

## What each line of the block grants

The starter `kortix.yaml` ships one agent called `worker`, and its block is short enough to read in a minute. `mode: primary` means a person opens sessions with it directly. `permission: allow` is the setting the starter ships for tool use, and the line a company changes first. `prompt_file: agents/worker.md` points at the behaviour: a markdown file in the project that opens by naming the agent and the project it serves.

Then come five grants, and each one answers a different question about reach. `tools: all` is what the agent may run on its sandbox. `skills: all` is the procedures it may load. `connectors: all` is the company apps it may call, and the [credential question has its own page](/telegram-agent-with-company-tools). `secrets: all` is the credentials it may see. `kortix_permissions: all` is the project actions it may take. Every one of those five shortens from `all` to a list. The last line, `workspace: { project_repository: true }`, gives the agent the project to work in.

Three checks settle most of the comparison before anything is installed. Open the `agents:` block and see whether every grant is written down. Open the prompt file it names and see whether a person outside engineering could follow it. Then look at what a session hands back: if the work comes back on its own branch with a diff and a change request, the output has somewhere to land.

One Telegram bot can serve a support lead and an engineer without the support agent holding the production credentials, because the grant belongs to the agent while the bot only carries messages. Change one block, and you change what one agent can reach.

## Where the agent runs

The file travels with the project. Run it on Kortix Cloud, in your VPC, or on your own on-prem network. Self-host is free.

Self-hosting has a limit worth knowing before you pick it. The web app, API and database run on your server, and sessions still run on cloud sandboxes from Platinum. Those sandboxes call back to the server, so it has to be reachable from the internet.

OpenClaw takes the other route. It runs on your machine or a [shared server](https://docs.openclaw.ai/concepts/multi-user), with no subscription and no hosted tier, and its [Telegram integration](https://docs.openclaw.ai/channels/telegram) is production-ready for bot DMs and groups. The n8n route builds the agent from a workflow, on your own server or on n8n Cloud, with [a Telegram node and trigger](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.telegram) rather than a chat.

## What happens to the work

An agent that can change a file is only useful if the change can be reviewed. Session work reaches `main` through a change request. Merge is default-deny for agents.

In a Slack or Teams thread, the approval card shows the title, a summary, a risk note and buttons such as Approve and Deny. Telegram has no such card. There the agent's questions arrive as buttons, and a held tool call waits on Kortix's Review page, where a project manager, or the person who started the session, approves or denies it. The [approval page](/approvals-in-telegram) covers what a held action covers and what happens when nobody answers it.

## Who may talk to the bot

Telegram has no account link, so the bot needs a list. The allowed-user list decides who may talk to it. A message from an allowed person starts a session; anyone else gets a reply showing their own Telegram user id, and a private chat with the bot also puts them under Allowed users → Wants access, where a project manager allows them with one click. In a group only commands, replies to it and mentions reach the bot, so an order typed for a colleague never arrives. One chat is one session, and a chat’s agent writes only in that chat and its topics.

OpenClaw guards the same edge with a default DM policy of pairing and group allowlists. n8n holds a credential in the workflow that uses it. Kortix writes the grant into the agent’s block instead, beside the prompt and the tools it applies to, so a person can see what the bot may reach before it runs.

## What buyers ask before they pick one

### Can I use an AI agent with Telegram?

Yes. Kortix connects a Telegram bot to a project, so an allowed person messages it and the agent replies in the same thread. A tool call that needs a decision waits on the Review page for a named person.

### Is there a free AI Telegram bot available?

Yes. Free is $0 with 500 credits per month, every feature and 1 project, on the user's own provider keys or ChatGPT subscription.

## Read the file, then connect the bot.

The starter manifest is public, and a BotFather token plus the allowed-user list are all the chat needs.

[Try Kortix](https://kortix.com) · [Read the Guide](https://kortix.com/docs/guide)
