APA / Guides
Architecture
Why Cron Jobs and Chat Logs Cannot Replace an Agent Workbench
The first way most people try to make an AI Agent proactive is to wire a cron job to a CLI prompt and rely on chat history or markdown notes for memory. It works for a week, then fails in predictable ways.
Four structural gaps
- 1. Stateless triggers have no item lifecycle. A cron job wakes an Agent on a timer, but it does not know whether a vendor already replied, whether you snoozed an item until Thursday, or whether a delegated fix is waiting for your review. Without states (
proposal,open,waiting,needs_input,done,dropped), every run starts from guesswork. - 2. Chat logs mix facts, noise, and superseded decisions. Searching a chat transcript cannot reliably distinguish a brainstorming sentence from an approved decision. APA keeps working context as inspectable records—projects, items, materials, decisions, and preference rules—searchable via BM25 (
apa search) and drilled down level by level without flooding the context window. - 3. Prompt instructions are not an authorization boundary. Feeding untrusted mail or GitHub comments into a cron-triggered Agent creates a direct prompt-injection surface. APA enforces a 10-group permission card in the kernel (exit code
23when closed,20for user-only actions), treats outside content as material rather than instructions, and starts acting rules in observe mode. - 4. No interruption budget. Polling scripts either stay silent until something breaks or spam your phone with every new email. APA separates proposals (which never notify) from decisions, applies quiet hours and a daily cap, and consolidates routine updates into scheduled briefs.
Side-by-side comparison
| Dimension | Cron + chat logs | APA workbench |
|---|---|---|
| State model | Files, chat history, or ad-hoc JSON | Single SQLite ledger with explicit item states, deadlines, and time slots |
| Permissions | Prompt rules + full shell/API tokens | Kernel-enforced 10-group permission cards; user-only hard lines |
| Human decisions | Free-form replies mixed into chat threads | Dedicated decision queue with explicit options, audit trail, and withdrawal for Agent answers |
| Cross-Agent portability | Tied to one Agent's memory format | Any Agent reads the same ledger via apa CLI; personal memory stays with the Agent |
Objective boundaries: when plain cron is still better
Do not put deterministic scripts behind a workbench.
If a job is purely mechanical—nightly database backups, certificate renewal, a deterministic CI check, or forwarding one webhook with zero human judgment—plain
cron or systemd timers are simpler and more reliable. Use APA when work involves uncertain external events, multi-day follow-ups, or human-in-the-loop decisions.