- Home
- Skills
- Agents & Orchestration
- Telegram Orchestrator Pattern — Linux AI Agent Deployment
Works with the AI Agents you already use
Telegram Orchestrator Pattern — Linux AI Agent Deployment
Design and deploy secure, budget-bounded AI agent orchestrators via Telegram on Linux.
$38.99
Telegram Orchestrator Pattern — Linux AI Agent Deployment
Example session with this skill installed
Design a Telegram orchestrator for a Linux server to handle automated file backups and log analysis with a $5/day budget cap and mandatory approval for deletions.
- Read your context and instructions
- Compiled the telegram orchestrator pattern
I have designed the orchestration pattern for your backup and log analysis system. This configuration focuses on least-privilege tool access and strict cost monitoring.
Telegram Orchestrator Specification
| Component | Responsibility |
|---|---|
| Agent: Auditor | Analyzes logs, identifies trends, and suggests files for deletion. No write access. |
| Agent: Operator | Performs file backups and authorized deletions. Requires /approve. |
| Budget Gate | $5.00/day limit. Stops execution at 90% threshold for safety margin. |
| Storage | SQLite for task state; non-persistent buffers for log snippets. |
| Auth | ID-based allowlist for Telegram users and chat groups. |
Agent Registry & Permission Matrix
agents:
log_analyzer:
tools: [fs_read_only, grep, awk]
limits:
max_runtime: 300s
max_tool_calls: 20
approval_required: false
file_manager:
tools: [tar, cp, rm, mv]
limits:
max_runtime: 600s
max_tool_calls: 10
approval_required: true # Mandatory for 'rm' and 'mv'
Safety & Cost Configuration
# Safety Limit Definitions
DAILY_BUDGET_CAP = 5.00
CHECK_INTERVAL_SECONDS = 15
ALLOWED_TG_USERS = [12345678, 87654321]
CMD_ALLOWLIST = ["/task", "/status", "/approve", "/cost", "/cancel"]
# Persistence Schema (Tasks)
# ID | UserID | Status | Agent | BudgetUsed | ApprovalNonce
Linux Service Configuration
- Create unprivileged user:
sudo useradd -m -s /usr/sbin/nologin agent-svc - Set directory permissions:
chmod 700 /opt/agent-system - Load secrets via
.envfile (never hardcoded):TG_TOKEN,OPENAI_API_KEY - Deploy systemd unit with
Restart=on-failureandPrivateTmp=true.
Next steps
- Generate the Telegram bot token via @BotFather.
- Initialize the SQLite database with the provided schema.
- Run the "Unauthorized Access" and "Budget Exhaustion" test cases in a dry-run environment.
Connects securely to your tools. The creator never sees your data.
About this skill
Managing AI agents through chat interfaces often leads to runaway costs, security breaches, or unmonitored execution. This skill provides a blueprint for building a Telegram-driven orchestration system on Linux that prioritizes safety, budget enforcement, and persistent task management. It moves beyond simple prompting by embedding guardrails directly into the code.
What it does
- Safety enforcement creates hard-coded boundaries for tool usage and agent permissions.
- Budget gating monitors and halts execution when cost or token limits are reached.
- Task persistence manages state machines for queued, running, and completed tasks using persistent storage.
- Human-in-the-loop implements approval gates for destructive or high-consequence actions.
- Linux deployment provides unprivileged service configurations and secret management workflows.
How it works
- Define the Agent Registry to map roles, allowed tools, and execution limits.
- Configure Telegram Commands for task submission, status checks, and manual approvals.
- Establish Safety Gates including user allowlists, rate limits, and per-task timeouts.
- Generate Deployment Artifacts for Linux service accounts and environment-based secret storage.
Frameworks & tools
This skill is designed for Linux environments using agent frameworks and model providers. It leverages SQLite or managed databases for persistence and Telegram Bot API for the interface.
Why this beats prompting it yourself
Generic prompts cannot enforce hard resource limits or ensure user authorization at the infrastructure level. This skill delivers an architectural pattern where safety is a systemic requirement, not an optional instruction.
Use cases
- Deploying a multi-agent research assistant with a fixed daily spending cap.
- Building a code execution bot that requires manual approval for file deletions.
- Creating a long-running task manager that survives service restarts.
Known limitations
Implementation requires an existing Telegram Bot token and a Linux environment. Budget enforcement accuracy depends on the latency of provider cost reporting.
Requires manual Telegram Bot API setup. Cost tracking may be estimated if provider APIs have reporting delays. Not a standalone app; requires a Linux host and model provider keys.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 24 days ago