Skip to content

Always-On Agent in 5 Minutes

Get an always-on AI agent responding on a messaging platform with file access, shell commands, and web search. Total time: about 5 minutes.

Terminal window
curl -fsSL https://raw.githubusercontent.com/auser/agentzero/main/scripts/install.sh | bash

Open Telegram, message @BotFather, send /newbot, follow the prompts. Copy the bot token it gives you.

OpenRouter gives you access to all models with one key:

Terminal window
export OPENAI_API_KEY="sk-or-v1-..."

Or save it permanently:

Terminal window
echo 'OPENAI_API_KEY=sk-or-v1-...' >> ~/.agentzero/.env

Save this as agentzero.toml in your working directory:

[provider]
kind = "openrouter"
model = "anthropic/claude-sonnet-4-6"
[security]
allowed_root = "."
allowed_commands = ["ls", "pwd", "cat", "echo", "grep", "find", "git", "cargo", "python3", "node"]
enable_git = true
[security.write_file]
enabled = true
[web_search]
enabled = true
provider = "duckduckgo"
[channels.telegram]
bot_token = "YOUR_TELEGRAM_BOT_TOKEN"
[gateway]
port = 42617

Replace YOUR_TELEGRAM_BOT_TOKEN with the token from step 2.

Terminal window
agentzero daemon start

Check it’s running:

Terminal window
agentzero daemon status

Open Telegram, find your bot, send a message. The agent will respond with full tool access — it can read files, run commands, search the web, and write files in your working directory.


Replace the [channels.telegram] block with one of these:

[channels.discord]
bot_token = "YOUR_DISCORD_BOT_TOKEN"

Create a bot at the Discord Developer Portal, enable the Message Content intent, and invite it to your server.

[channels.slack]
bot_token = "xoxb-YOUR-SLACK-BOT-TOKEN"
app_token = "xapp-YOUR-SLACK-APP-TOKEN"

Create a Slack app at api.slack.com/apps with Socket Mode enabled.


Swap the provider section and drop the API key:

[provider]
kind = "ollama"
model = "llama3.1:8b"

Make sure Ollama is running locally first (ollama serve).


Add any of these to your agentzero.toml:

# Browser automation
[browser]
enabled = true
# MCP servers (define servers in ~/.agentzero/mcp.json)
[security.mcp]
enabled = true
# HTTP requests
[http_request]
enabled = true