Guides
8 min0views

PromptPilot: Put Your AI Assistant on Autopilot While You Run Your Site

PromptPilot: Put Your AI Assistant on Autopilot While You Run Your Site

If you monetize websites, chances are you're already using AI in your workflow. Claude Code, Codex, Qwen — these tools can write scripts, generate code, fix bugs, and automate repetitive tasks. The problem isn't what they can do. It's that they demand your constant presence. Hit a token limit and you're stuck waiting. Close your laptop and the task stops dead. Step away from your desk and nothing moves.

PromptPilot fixes exactly that. It turns your AI tool from something you babysit into something that works on its own — on a schedule, in a queue, from your phone.

What Is PromptPilot

PromptPilot is a task queue and scheduler for AI CLI tools: Claude Code, OpenAI Codex, Qwen, and others. The concept is simple — you submit a prompt, a worker executes it. When that happens is up to you: right now, in an hour, at 5am, or after your token limit resets.

You can manage tasks in three ways:

  • via the command line — fast, no friction;
  • via the web UI — visual, with filters and status badges;
  • via a Telegram bot — straight from your phone, no computer needed.

Everything is stored in a local SQLite database. No cloud, no external servers — just a straightforward local setup that works.

How It Works

The architecture is intentionally simple. Three independent processes communicate through a single database:

The Worker is the core of the system. Every five seconds it checks the queue, picks up the next task, and runs it through the AI CLI. It's deliberately single-threaded — one task at a time, no race conditions against API limits. If the system crashes or restarts, the worker automatically rolls any stuck tasks back to pending on startup.

The Server is a FastAPI application with a web interface. It accepts tasks via REST and displays statuses, results, and metadata — cost, tokens used, model, execution time — refreshing automatically every five seconds.

The Bot is a full-featured Telegram interface. Authorization is handled by phone number, task creation is a guided step-by-step flow via buttons, and you can view results or continue a conversation with the model directly from the chat.

Interfaces (CLI / Web UI / Telegram)

SQLite (WAL)

Worker

claude.exe / codex / qwen

Three Ways to Use PromptPilot

Command Line

The fastest option. Adding a task is a single command:

# Simple task
pp add "Write a script to process sitemap.xml"

# With a specific directory and priority
pp add "Refactor the analytics.py module" \
--dir /var/www/mysite \
--priority 1

# Schedule for a specific time
pp add "Generate an ad block performance report" \
--at "2026-04-07T09:00"

# Batch load tasks from a file (one prompt per line)
pp add --file tasks.txt

To inspect the queue:

pp list
pp list --status pending
pp list --status completed --limit 10

Web UI

Available at http://127.0.0.1:8420. A minimalist interface built in plain JavaScript — no npm dependencies, just a single HTML file.

What's included:

  • provider selection (Claude, Codex, Qwen, or custom);
  • prompt field with Ctrl+Enter to submit;
  • schedule presets (+1h / +3h / +8h / +24h) or manual ISO date entry;
  • task filters by status with live counters;
  • task details: result, model, cost, tokens, execution time;
  • ⚡ Skills button for Claude — quick access to your saved commands.

Telegram Bot

The standout feature for webmasters who work on the go. You're not tied to your desk — you can queue a task from your phone at any moment.

Authorization requires no passwords typed in chat. The bot requests your phone number via the standard Telegram button and checks it against the list of allowed numbers in your config. Once authorized, access persists across bot restarts.

Task creation is a guided step-by-step flow:

Prompt
→ Provider
→ Priority
→ Project directory
→ Schedule (+1h / +8h / +24h / specific time)
✅ Task added

Task details show the full result, metadata, and action buttons.

Automatic Rate Limit Handling

API rate limits are a constant headache when working with AI tools. PromptPilot handles them without any input from you.

The worker monitors rate limit errors via stderr and stream-json events. When a limit is hit, the task moves to rate_limited status and is automatically retried with exponential backoff:

Attempt

Delay

1st

~60 sec

2nd

~120 sec

3rd

~240 sec

4th

~480 sec

...

up to 3600 sec

Each delay includes a random ±10% jitter — so if multiple tasks hit a rate limit at the same time, they don't all retry in sync and hammer the API together.

Once the maximum number of retries is reached, the task moves to failed. Everything is transparent and logged.

Continuing a Conversation from Telegram

Sometimes Claude gets partway through a task, hits a decision point, and asks a question — which of two files to use, for example. The task ends, but the work isn't done. Normally you'd need to open a terminal, restore the session, and reply manually.

PromptPilot closes that gap. Every completed task in the bot has a 💬 Reply button. Tap it, type your answer, and a new task is automatically created with the --resume flag, picking up the conversation in the exact same context. Claude remembers everything that came before.

The chain is unlimited — each reply also stores a session_id and shows the Reply button. Each new task inherits the directory, provider, and settings from its parent.

Claude Code Skills Support

If you use skills (.md command files in .claude/commands/ or .claude/skills/), PromptPilot knows how to work with them.

In the web UI, selecting the Claude provider reveals an ⚡ Skills button that shows your available skills with descriptions. Select one and the skill name is inserted into the prompt field — add your arguments and submit.

In the Telegram bot, use the /skills command. Pick a skill from the list, enter your arguments, and the task is created.

Works with both global skills (~/.claude/commands/) and project-level skills (.claude/commands/ inside a working directory). Each project can have its own skills — the bot surfaces them when you select that project's directory.

Providers and Custom Commands

PromptPilot supports several AI CLI tools out of the box:

Provider

Description

Skills

claude

Claude Code (Anthropic)

claude-z

Claude Code via z.ai / GLM

codex

OpenAI Codex

qwen

Qwen Code

You can add any other tool as a custom provider:

pp provider add mytool \
--cmd "mytool run {prompt}" \
--desc "My custom AI tool" \
--env "MYTOOL_API_KEY=sk-..."

A provider is just a command template with a {prompt} placeholder. The worker fills in the prompt and runs the command via subprocess with the specified environment variables.

Installation and Setup

Requirements

  • Python 3.10+
  • At least one AI CLI available in your PATH (claude, codex, qwen)

Install

git clone https://github.com/ivanarama/PromptPilot
cd PromptPilot
pip install -e .

Configuration

Create a .env file in the project folder:

# Telegram bot (optional)
PP_TG_TOKEN=your_bot_token
PP_TG_ALLOWED_PHONES=+12025551234

# Path to Claude
PP_CLAUDE_EXE=~/.local/bin/claude.exe
PP_DEFAULT_CLI=claude

# Root folder for projects (for directory selection in the bot)
PP_PROJECTS_ROOT=/var/www

# Timeout and retry settings
PP_TASK_TIMEOUT=300
PP_BASE_DELAY=60
PP_MAX_DELAY=3600
PP_MAX_RETRIES=5

Full reference of environment variables:

Variable

Default

Description

PP_TG_TOKEN

Telegram bot token

PP_TG_ALLOWED_PHONES

Allowed phone numbers, comma-separated

PP_TASK_PASSWORD

Optional password for task creation in bot

PP_CLAUDE_EXE

~/.local/bin/claude

Path to claude executable

PP_DEFAULT_CLI

claude

Default provider

PP_PROJECTS_ROOT

Root folder for project selection

PP_DATA_DIR

~/.promptpilot

Database and config storage

PP_TASK_TIMEOUT

300

Task timeout in seconds

PP_POLL_INTERVAL

5

Queue polling interval in seconds

PP_BASE_DELAY

60

Initial retry delay

PP_MAX_DELAY

3600

Maximum retry delay

PP_MAX_RETRIES

5

Maximum attempts before marking as failed

PP_PORT

8420

Web server port

Running

Option 1 — CLI:

pp worker # starts the worker
pp server # starts the web UI
pp bot # starts the Telegram bot
pp start # worker + server in one command

Option 2 — System tray (Windows): Double-click pp.exe and an icon appears in the system tray. The worker and server start automatically. The icon reflects current status: 🟢 all running / 🟠 partial / ⚫ stopped.

Option 3 — PowerShell:

.\start.ps1 # worker + server (+ bot if PP_TG_TOKEN is set)
.\stop.ps1 # stop everything

To build your own .exe:

.\build.ps1
# output: dist\pp.exe (~40 MB, Python bundled, no external dependencies needed)

Is This Worth It for Webmasters?

PromptPilot is a good fit if you:

  • regularly use Claude Code or Codex for site work — scripts, scraping, automation, code generation;
  • manage multiple projects and want a task queue instead of manual context-switching;
  • frequently hit token limits and want automatic retry handling;
  • aren't always at your computer but still want to queue AI tasks from your phone.

If you use AI once a week for a prompt or two, this is probably overkill. But if you've already integrated AI CLI tools into your daily workflow, PromptPilot fills real gaps: automatic retries, mobile task management, and seamless continuation of interrupted sessions.

What's Coming Next

The developer has outlined a few directions for future development:

  • Telegram notifications — a message when a task completes or fails;
  • Conversation history view — showing the full chain of task → reply → reply in one place;
  • Parallel workers — a dedicated worker per provider.

Conclusion

PromptPilot is the missing automation layer for anyone already working with AI CLI tools. It doesn't change how you talk to the model — it changes when and how that happens. Tasks run on schedule, rate limits are handled automatically, and sessions continue without you hovering over a terminal.

For webmasters who use AI as a real working tool rather than an occasional curiosity, this is the shift from manual operation to a systematic approach.

Project code: github.com/ivanarama/PromptPilot

Share this article

Send it to your audience or copy an AI-ready prompt.

Related Articles