apx-routine

Create, schedule, and debug recurring APX automation routines with shell hooks and LLM agents.

6|1|Updated May 8, 2026
One-click install
npx skills add https://github.com/agentprojectcontext/apx --skill apx-routine-agentprojectcontext
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: apx-routine
Source: https://github.com/agentprojectcontext/apx/tree/main/src/core/runtime-skills/apx-routine
Command: npx skills add https://github.com/agentprojectcontext/apx --skill apx-routine-agentprojectcontext

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up recurring automated tasks in APX requires choosing the right routine kind, writing correct schedule expressions, wiring pre/post shell hooks, and avoiding pitfalls like double Telegram replies — mistakes that silently produce no output or duplicate messages. ## Core Features & Use Cases - Kind selection guidance: Choose between heartbeat, shell, exec_agent, watch, super_agent, and telegram kinds based on whether the task needs tools, an LLM, or pure shell execution. - Schedule grammar: Use every:<N><unit>, once:<iso-8601>, or standard 5-field cron expressions to control when routines fire. - Pre/post command pipelines: Chain shell commands whose stdout feeds {{pre_output}} into prompts and whose LLM result flows to $APX_LLM_OUTPUT for delivery. - Use Case: Create a daily weather routine that fetches wttr.in data via a pre_command, has an agent write one friendly sentence with tools disabled, and delivers it through a Telegram post_command. ## Quick Start Ask the agent to create an APX routine named weather-bariloche in project acme that runs every 24 hours, fetches the weather with curl, and sends a one-sentence summary via Telegram.

Frequently Asked Questions about apx-routine

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a scheduled APX routine that sends Telegram messages?▼

Use apx routine add with --kind exec_agent, a schedule like every:24h, a spec containing the agent and prompt, and a post_command running apx telegram send "$APX_LLM_OUTPUT". Always pass --project so the routine lands in the right project.

Which APX routine kind should I use for my task?▼

Use exec_agent when a project agent must do work with tools, super_agent for orchestration with the full tool registry, shell for pure shell tasks, telegram for fixed text messages, and heartbeat for liveness markers. For text-only LLM output delivered by shell, use exec_agent with spec.no_tools set to true.

Why does my APX routine send two Telegram messages?▼

Double replies happen when a super_agent prompt calls send_telegram while post_commands also run apx telegram send. Fix it by using exec_agent with spec.no_tools: true so only the post_command delivers the message.

What schedule formats does APX routine support?▼

APX routines accept every:<N><unit> such as every:30s or every:24h, once:<iso-8601> for a single firing, and standard 5-field cron expressions like 0 8 * * *. The scheduler ticks every 5 seconds.

Why is my APX routine not sending anything?▼

Common causes are enabled set to false, next_run_at still in the future, or empty LLM output text. Debug with apx routine history, apx log -f, and apx messages tail --channel routine to inspect recent runs.