Skip to content
/

CueAPI

cueapi · cueapi/cueapi-core · ★ 8 · last commit 2026-05-26

Replaces cron for AI agent tasks with outcome-aware scheduling: success/failure tracking, automatic retries, and execution history.

Best whenCron is the wrong primitive for AI agent scheduling because it has no concept of success — agents need outcome-aware scheduling with retry and alerting.
Skip ifUsing cron for agent tasks without outcome tracking, Direct pushes to main without PRs
vs seeds
CueAPI is the only framework in the corpus focused on reliable scheduled execution for AI agents. No seed addresses the problem of…
Primitive shape 2 total
Subagents 2
00

Summary

CueAPI — Summary

CueAPI is an open-source scheduled job server for AI agents that replaces dumb cron with outcome-aware scheduling: when an agent's scheduled task runs, it reports success or failure back to CueAPI, which then retries on failure (exponential backoff at 1, 5, 15 minutes), maintains a complete execution history, and sends email + webhook alerts when retries are exhausted. The server ships as a Python/FastAPI application with a Docker Compose install, runs at localhost:8000, and exposes a REST API for schedule management and execution monitoring. Its README is written specifically for AI agents — the very first line is a structured prompt to any AI agent reading the page: "For AI agents: This is the CueAPI server. Run it with git clone ... && docker compose up. Base URL: http://localhost:8000." The CLAUDE.md defines a strict automated pipeline where Claude Code opens PRs, merges on CI pass, and deploys; a separate "Argus" agent tests staging and promotes to production.

Among the seeds, CueAPI resembles the "Markdown scaffold, zero primitives" archetype (claude-conductor), but applied to infrastructure rather than coding methodology: instead of templates that guide agent behavior, CueAPI provides the scheduling infrastructure that makes agent behavior schedulable and observable. No seed addresses the problem of reliably scheduling and monitoring AI agent tasks.

01

Overview

CueAPI — Overview

Origin

Published by the cueapi organization (GitHub: cueapi/cueapi-core). Version 0.1.0. 8 stars. Python/FastAPI. Active (last push 2026-05-26). Apache 2.0 license. Open core model: cueapi-core is the full OSS engine; cueapi.ai adds dashboard, managed email alerts, billing.

Philosophy

"Cron fires jobs. That is all it does. It has no concept of whether your job succeeded. CueAPI does."

"Your agents are failing silently. CueAPI tells you when and why."

The README opens with the problem framing:

# This is what your agent sees with cron:
0 3 * * * python run_agent.py

# Did it run? Who knows.
# Did it succeed? No idea.
# Did it retry on failure? No.
# Are you alerted? Never.

Agent-Targeted Design

The README is unusual in starting with a structured instruction block explicitly for AI agents:

<!-- Pipeline validation: 2026-04-04 -->
> **For AI agents:** This is the CueAPI server. Run it with `git clone https://github.com/cueapi/cueapi-core && cd cueapi-core && docker compose up`. Base URL: `http://localhost:8000`. Register: `POST /v1/auth/register` with `{"email": "you@example.com"}`. API key is returned directly in the response. No email required. All requests need `Authorization: Bearer YOUR_API_KEY`. Create a cue: `POST /v1/cues` with {"name": "task-name", "schedule": {"type": "recurring", "cron": "0 9 * * *"}, "callback": {"url": "https://your-handler.com"}}`.

This is a machine-readable README — designed so that an AI agent reading the docs can immediately start using the API without further instructions.

Two-Agent Pipeline (from CLAUDE.md)

Role Agent Responsibility
Developer Claude Code Code changes → PR → merge when CI passes
Tester Argus Tests staging → promotes to production → PyPI releases → doc validation
02

Architecture

CueAPI — Architecture

Distribution

  • Docker Compose (primary self-hosted method)
  • Direct Python/pip install
  • Hosted at cueapi.ai (cloud)

Required Runtime

  • Docker + Docker Compose
  • Python 3.9-3.12

Tech Stack

Layer Technology
API FastAPI
Background jobs Worker service
Database PostgreSQL (Alembic migrations)
Queue Redis (implied by worker pattern)
Testing pytest (367 tests)

Repository Structure

cueapi-core/
├── app/
│   ├── auth.py          # Authentication
│   ├── config.py        # Configuration
│   ├── database.py      # DB connection
│   ├── main.py          # FastAPI app
│   ├── middleware/      # Middleware
│   ├── models/          # Database models
│   ├── routers/         # API route handlers
│   ├── schemas/         # Pydantic schemas
│   ├── services/        # Business logic
│   └── utils/           # Utilities
├── worker/              # Background job worker
├── alembic/             # Database migrations
├── tests/               # 367 tests
├── examples/            # Usage examples
├── docs/                # Documentation
├── CLAUDE.md            # Agent pipeline definition
├── docker-compose.yml   # Self-hosted deployment
└── Makefile             # Common operations

API Surface

REST API at localhost:8000:

  • POST /v1/auth/register — register, get API key immediately (no email verification)
  • POST /v1/cues — create a scheduled cue
  • GET /v1/cues — list cues
  • GET /v1/executions — view execution history
  • POST /api/hooks (or configured callback URL) — receive execution outcomes

CLAUDE.md Pipeline

The CLAUDE.md defines a multi-repo automated pipeline involving Claude Code + Argus:

  • cueapi-core (OSS)
  • cueapi (hosted, private)
  • cueapi-python (SDK)
  • cueapi-cli
  • Marketing site, docs, blog
03

Components

CueAPI — Components

REST API Endpoints

Endpoint Method Purpose
/v1/auth/register POST Register and receive API key instantly
/v1/cues POST Create a new scheduled cue
/v1/cues GET List all cues
/v1/cues/{id} GET/PATCH/DELETE Manage individual cue
/v1/executions GET View execution history
/v1/executions/{id} GET Get individual execution details

Core Concepts

Concept Description
Cue A scheduled job: name + schedule (cron or one-time) + callback URL
Schedule {"type": "recurring", "cron": "0 9 * * *"} or one-time
Execution One firing of a Cue — tracks attempts, status, delivered_at, outcome
Callback HTTP endpoint that receives the cue trigger and reports success/failure
Outcome reporting Handler responds with {"success": true} or {"success": false, "error": "reason"}

Retry Logic

Automatic retries on failure at 1, 5, and 15 minutes (exponential backoff). Exhausted retries trigger email + webhook alerts.

Two-Agent Pipeline Components (CLAUDE.md)

Agent Role
Claude Code Developer: writes code, opens PRs, merges when CI passes
Argus Tester: runs staging tests, promotes to production, cuts PyPI releases, validates docs/blog

Tests

367 pytest tests covering the full API surface.

05

Prompts

CueAPI — Prompts

Excerpt 1 — Machine-Readable README (Agent-Targeted Documentation)

<!-- Pipeline validation: 2026-04-04 -->
> **For AI agents:** This is the CueAPI server. Run it with `git clone 
https://github.com/cueapi/cueapi-core && cd cueapi-core && docker compose up`. 
Base URL: `http://localhost:8000`. Register: `POST /v1/auth/register` with 
`{"email": "you@example.com"}`. API key is returned directly in the response. 
No email required. All requests need `Authorization: Bearer YOUR_API_KEY`. 
Create a cue: `POST /v1/cues` with `{"name": "task-name", "schedule": 
{"type": "recurring", "cron": "0 9 * * *"}, "callback": 
{"url": "https://your-handler.com"}}`. Check executions: `GET /v1/executions`. 
Report outcome from your handler by responding with `{"success": true}` or 
`{"success": false, "error": "reason"}`. Retries happen automatically at 1, 5, 
and 15 minutes on failure.

Prompting technique: Machine-readable documentation as zero-shot agent instruction. This README header is written as a complete instruction set for an AI agent — it contains everything needed to set up and use CueAPI in a single paragraph, with exact request bodies and response format. The <!-- Pipeline validation: 2026-04-04 --> HTML comment is a freshness signal for agents that might parse the page.

Excerpt 2 — CLAUDE.md Agent Pipeline Rules

# Claude Code Rules

## Who Does What

**Claude Code** - writes code, opens PRs, merges when CI passes, deploys to staging and frontend sites
**Argus** - tests staging, promotes to production, cuts PyPI release tags, tests docs and blog accuracy

## PR Process - Non-Negotiable

Every change must go through a PR. No direct pushes to main under any circumstances.
PRs are the permanent audit trail of every change made to this codebase.
Claude Code opens PRs and merges them once CI passes. No human reviewer required.
CI must pass before merging - no exceptions.
Never bypass branch protection or force merge.
Never merge a failing CI check - fix the root cause first.

Prompting technique: Role-separation + absolute constraints. The CLAUDE.md divides responsibilities between Claude Code and Argus with clear ownership, then states absolute rules ("Never bypass branch protection") that function as Iron Laws. The "No human reviewer required" statement is notable — it explicitly authorizes fully autonomous PR merge, unlike most frameworks that require human sign-off.

Excerpt 3 — Pipeline Definition Pattern

### cueapi-core (open source)
Claude Code: code change -> open PR -> sdk-integration CI must pass -> merge
Argus: runs full pytest suite -> confirms green

Prompting technique: Pipeline-as-state-machine. The notation defines a strict sequential pipeline where each step gates the next. Both Claude Code and Argus have defined entry points and exit conditions. This is operational documentation that doubles as an agent behavioral contract.

09

Uniqueness

CueAPI — Uniqueness

Differs from Seeds

CueAPI addresses a problem no seed framework tackles: scheduled execution with outcome awareness for AI agents. All 11 seeds assume an interactive or on-demand execution model (human types a command, agent runs). CueAPI enables agents to operate on schedules, with automatic retry on failure and alerts when retries are exhausted. This is the infrastructure that makes "run this agent at 3am every day" a reliable operation rather than a fire-and-forget cron job. The closest seed is ccmemory (persistent infrastructure for agent operation), but ccmemory provides knowledge storage while CueAPI provides reliable scheduled execution. The machine-readable README header — a paragraph explicitly written for AI agents, with exact API calls and response formats — is unique in the corpus: it is documentation designed to be consumed by agents, not humans, with <!-- Pipeline validation: 2026-04-04 --> as a freshness timestamp for agent parsers. The CLAUDE.md's explicit statement "No human reviewer required" for PR merges is the most autonomy-granting agent pipeline definition found in this batch.

Positioning

CueAPI is scheduled-job infrastructure for the agentic era. It is complementary to all other frameworks: any framework can schedule its workflow on CueAPI. The open-core model (OSS server + hosted SaaS with dashboard) is a standard infrastructure product pattern applied to the agent-scheduling space.

Observable Failure Modes

  1. Callback URL dependency: The agent must expose an HTTP endpoint. Local development agents cannot easily receive CueAPI callbacks without a tunnel (ngrok, etc.).
  2. No agent identity: Cues are tied to API keys, not to specific agent identities. Multiple agents using the same key have no execution isolation.
  3. Outcome reporting is optional: Agents can receive cue callbacks without reporting outcomes. Silent failures are possible if the agent doesn't implement the outcome reporting pattern.
  4. Open-core tension: Dashboard and managed alerts are hosted-only. Self-hosted users have no UI visibility into their execution history.
04

Workflow

CueAPI — Workflow

Agent Task Scheduling Workflow

Phase Agent Action CueAPI Action
1. Schedule Create cue via POST /v1/cues with cron + callback URL Store cue
2. Fire (cron fires) CueAPI POSTs to callback URL
3. Execute Agent handler runs task, reports outcome Track delivery
4. Report Handler responds {"success": true/false} Record outcome
5. Retry (on failure) (none required) Auto-retry at 1, 5, 15 min
6. Alert (if exhausted) Agent receives alert Send email + webhook
7. Monitor Agent queries GET /v1/executions Return history

Multi-Repo Development Pipeline (from CLAUDE.md)

For the cueapi-core repo itself:

Claude Code:
  code change → open PR → sdk-integration CI must pass → merge
                              ↓
Argus:
  runs full pytest suite → confirms green

For cueapi (hosted API):

Claude Code:
  code change → PR → sdk-integration + deploy-staging CI → merge → Railway staging deploy
                                                                      ↓
Argus:
  runs 246 staging tests → all pass → promotes to production

PR Process (from CLAUDE.md)

Non-negotiable rules:

  • Every change goes through a PR — no direct pushes to main
  • PRs are the permanent audit trail
  • Claude Code opens PRs and merges when CI passes — no human reviewer required
  • CI must pass before merging — no exceptions
  • Never bypass branch protection or force merge

Artifact Tracking

  • Every Cue: stored in Postgres with full execution history
  • Every PR: permanent audit trail in GitHub
  • Every staging test run: Argus tracks and blocks promotion on failure
06

Memory Context

CueAPI — Memory & Context

State Storage

State Type Storage Persistence
Cue definitions Postgres Global
Execution history Postgres Global
Agent pipeline state GitHub PRs + CI status Global
Test results Argus internal Session

Execution History as Agent Memory

The GET /v1/executions endpoint gives agents access to their complete execution history — which scheduled tasks ran, when, whether they succeeded, how many retries were needed. This serves as structured "agent task memory": an agent can query what it did yesterday and whether it worked.

Cross-Agent Handoff via PRs

In the two-agent pipeline (Claude Code + Argus), PRs are the handoff mechanism:

  1. Claude Code opens a PR (leaves a "token" for Argus)
  2. CI runs and must pass
  3. Argus picks up on the staged deployment, runs its tests, and either promotes or blocks

Execution Outcome Reporting

When an agent's scheduled task runs:

  1. CueAPI fires the callback URL
  2. Agent handler runs the task
  3. Handler responds with {"success": true/false, "error": "optional"}
  4. CueAPI stores the outcome

This outcome becomes the agent's self-reported memory of task success/failure.

Memory Type

proprietary (Postgres via CueAPI's server) — not a file-based system. The Postgres database is the persistent store.

07

Orchestration

CueAPI — Orchestration

Multi-Agent

Yes (for cueapi-core's own development pipeline). Two agents: Claude Code (developer) and Argus (tester/promoter). These have defined, non-overlapping roles.

Orchestration Pattern

sequential — the pipeline is: Claude Code commits → PR → CI → merge → staging deploy → Argus tests → production. No step runs in parallel with another.

Execution Mode

scheduled — the core product is a scheduled job server. Agent tasks are triggered on cron schedules. This is the only framework in the corpus explicitly designed around execution_mode: scheduled.

Isolation Mechanism

none — the server runs in Docker, but there is no isolation between agent tasks at the code level.

Multi-Model

No — the CLAUDE.md defines Claude Code + Argus by role, but does not specify different LLM providers for different roles. Argus appears to be a separate agent product, not a different model class.

Consensus Mechanism

None. The pipeline is sequential with clear pass/fail gates (CI must pass, staging tests must pass).

Prompt Chaining

No in the traditional sense. The pipeline is event-driven (code change → PR → CI → staging → production) rather than prompt-chain-driven.

Cross-Tool Portability

Low — CueAPI is an infrastructure server, not a coding harness. Agents use it via HTTP API regardless of which agent type they are, making the API itself cross-tool portable. But the CLAUDE.md pipeline is specific to Claude Code + GitHub.

08

Ui Cli Surface

CueAPI — UI & CLI Surface

Dedicated CLI Binary

No (OSS core). The hosted cueapi.ai has a CLI (mentioned in the multi-repo pipeline), but it is not part of this OSS repository.

Local Web Dashboard

No in the OSS core. The hosted cueapi.ai includes a dashboard (mentioned as a hosted-only feature in HOSTED_ONLY.md). The OSS server exposes only the REST API.

REST API Interface

The primary interface for agents and humans is the REST API at localhost:8000:

# Register
curl -X POST http://localhost:8000/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com"}'

# Create a cue
curl -X POST http://localhost:8000/v1/cues \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "morning-agent-brief",
    "schedule": {"type": "recurring", "cron": "0 9 * * *"},
    "callback": {"url": "https://your-handler.com"}
  }'

# Check executions
curl -H "Authorization: Bearer YOUR_API_KEY" \
  http://localhost:8000/v1/executions

Installation

git clone https://github.com/cueapi/cueapi-core
cd cueapi-core
docker compose up

Hosted Dashboard

Available at cueapi.ai (not in this OSS repo). Features: execution feed (GIF screenshot in README), managed email alerts, billing.

Development Interface

make test    # Run pytest suite (367 tests)
make dev     # Start development server

Related frameworks

same archetype · same primary tool · same memory type

OpenHarness ★ 13k

Open-source Python agent runtime providing complete harness infrastructure: tools, memory, governance, swarm coordination, and…

Trae Agent ★ 12k

Research-friendly open-source CLI coding agent by ByteDance, designed for academic ablation studies and modular LLM provider…

Sweep AI ★ 7.7k

Autonomous GitHub bot that converts issues to pull requests using a sequential multi-agent pipeline.

Agent Governance Toolkit (microsoft) ★ 2.3k

Enterprise-grade AI agent governance: YAML policy enforcement, 12-vector prompt injection defense, zero-trust identity,…

TDD Guard ★ 2.1k

Mechanically enforces the Red-Green-Refactor TDD cycle by blocking file writes that violate TDD principles via a PreToolUse hook…

Agentic Coding Flywheel Setup (ACFS) ★ 1.5k

Take a complete beginner from laptop to three AI coding agents running on a VPS in 30 minutes via an idempotent manifest-driven…