agentleFS
engine9-aiengine9-ai/skills/e9-tasks-api/SKILL.md

e9-tasks-api

Skill1 starsChanged 48 days agoApache-2.0View on GitHub

Use the engine9 Task API (flows, schedule, task_runs/filter, flow runs) over HTTP with e9k API keys and task scopes. POST /flow_runs/ schedules a predefined flow (flow_id required); POST /tasks/schedule schedules an on-demand task (plugin path + method). Built-in workers use `@engine9/plugins/e9workers:<Worker>` (e.g. EchoWorker + echo). Scheduling uses the same scheduleTasks path as MCP task. MCP itself stays on Firebase OAuth — do not mix credentials. For deploying a built-in flow to an account (e.g. identity-rebuild), or publishing a flow file as a cron-scheduled dataflow (publishFlow), see deploy-flow.md.

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Rule: Do not mix Task API key authentication with MCP session authentication.

    line 36
  2. Very specific:

    Rule: Use POST /flow_runs/ only for a published flow_id, and use POST /tasks/schedule only for an on-demand path plus method.

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

engine9 Task API

The engine9 Task API schedules predefined flows and on-demand worker methods over HTTP, then exposes asynchronous flow and task run state. Use this skill for scripts, curl, and integrations, or when troubleshooting direct-HTTP authentication, account scoping, scheduling, and run state.

Quick reference

NeedRoute or requirement
Production base URLhttps://data.engine9.ai
AuthenticationAuthorization: Bearer e9key_… plus X-ENGINE9-ACCOUNT-ID
Discover flowsGET /flows with tasks:read
One flow definitionGET /flows/:id (local file). ?remote=true for a Frakture dataflow. MCP task action: "getFlow"
Enable or disable a remote dataflowPUT /flows/:id?remote=true with { "labels": { "disabled": true } } (tasks:schedule). MCP task action: "setDisabled"
Set a remote dataflow cronPUT /flows/:id?remote=true with { "schedule": { "cron": "0 6 * * *" } }. Empty cron clears it. MCP task action: "setSchedule"
Put a flow file on the cron schedulerMCP task action: "publishFlow" (admin; no engine9 REST route). The file location is the lookup (labels.source). deploy-flow.md
Schedule a predefined flowPOST /flow_runs/ with flow_id (built-in slug), flow_path, or definition
Run an existing Frakture dataflowPOST /flow_runs/ with flow_id = dataflow Mongo id (remote default); or Frakture POST /tasks/schedule with dataflow_id
Schedule an on-demand taskPOST /tasks/schedule with path + method
Poll task runsPOST /task_runs/filter
Count matching flow runsPOST /flow_runs/count
Status-pill totalsPOST /flow_runs/metrics

Rule: Do not mix Task API key authentication with MCP session authentication.

Concepts

Pick the endpoint that matches the work. They both call scheduleTasks and return flow_run_id / task_run_ids.

EndpointSchedulesRequiredSee also
POST /flow_runs/A predefined flow from GET /flowsflow_id (the flow slug)For one plugin method: POST /tasks/schedule
POST /tasks/scheduleAn on-demand taskPlugin path + methodFor a published flow: POST /flow_runs/

An on-demand task does not need a flow_id. A predefined flow does not need path or method — those come from the flow definition. Do not send flow_id to /tasks/schedule.

On-demand names (REST and MCP): built-in engine9 Workers use @engine9/plugins/e9workers:<Worker> — no plugin-id lookup. Echo smoke test: path: "@engine9/plugins/e9workers:EchoWorker", method: "echo". See echo-walkthrough.md.

Routes live at the API origin root (/flows, /tasks/schedule, /task_runs/filter, /flow_runs/, …), not under /api/task. Read operations require tasks:read; scheduling and control operations require tasks:schedule. Requests do not block until execution finishes, so poll POST /task_runs/filter until terminal. completed_since on flow runs is computed from timestamps (last_completed ≤ dataflow_last_completed; equal is true) as described in concepts.md.

Rule: Use POST /flow_runs/ only for a published flow_id, and use POST /tasks/schedule only for an on-demand path plus method.

Examples

Follow echo-walkthrough.md end to end: ask the user for an account id and e9key_ API key (offer the default base URL https://data.engine9.ai), then schedule the Echo task, poll until it completes, and report the output — explaining each call and each response as you go. Never print the full API key.

Workflow

  1. Discover flows — GET /flows (or POST /flows/filter) lists published slugs; GET /flows/:id shows each step's task_key and default options
  2. POST /flow_runs/filter with {"limit":20} — list recent remote runs for the account (default remote: true; no flow_run_id). Add "flow_id": "<dataflow_id>" for runs of one remote dataflow (endpoints.md). For totals and FAILED / RUNNING / COMPLETED pills, POST /flow_runs/count and POST /flow_runs/metrics with the same filters (omit status on metrics so pills ignore the current state filter).
  3. Schedule — pick the matching endpoint:
    • On-demand task: POST /tasks/schedule with { "path": "@engine9/plugins/e9workers:EchoWorker", "method": "echo", "options"? }. Built-in workers: @engine9/plugins/e9workers:<Worker> (no plugin lookup). Account plugins: path from discovery, then this endpoint. Optional flow-run tags (Prefect name for Frakture tracking_code, one string). See also POST /flow_runs/.
    • Predefined flow: GET /flows then POST /flow_runs/ with { "flow_id": "<slug>", "options"? } — optional top-level options (e.g. start / end) merges into every step; optional tasks: [{ task_key, options }] for per-step overrides. flow_id is required. Optional tags same as on-demand (not flow-definition tags). See also POST /tasks/schedule. → save flow_run_id / task_run_ids
  4. POST /task_runs/filter — { "flow_run_id": "…" } until complete (each task_run includes log_link; no checkpoints)
  5. Remote output: GET /task_runs/:id (output, resolved_options, checkpoints) or GET /task_runs/:id/output. Logs: GET /task_runs/:id/log (log, truncated, optional log_url). Per-task Run now: POST /task_runs/:id/retry. Checkpoints are worker-written option snapshots (a task can have multiple, oldest first) and appear only on this single-task read — not on POST /task_runs/filter. Retry does not clear them. To RESET ALL or walk back the most recent checkpoint(s), POST /task_runs/:id/reset_checkpoints { start_index? } (0 / omitted clears all; N keeps the first N). You cannot yank a checkpoint out of the middle.

Full curl: echo-walkthrough.md.

Endpoints

MethodPathScope
GET/flows, /flows/:idtasks:read
PUT/flows/:id?remote=truetasks:schedule (partial flow write; labels.disabled enables or disables; schedule.cron sets or clears the cron)
POST/flows/filtertasks:read
POST/tasks/scheduletasks:schedule
POST/tasks/describetasks:read
POST/flow_runs/tasks:schedule
GET/flow_runs/:idtasks:read
POST/flow_runs/filtertasks:read
POST/flow_runs/count, /flow_runs/metricstasks:read
POST/flow_runs/archive, /flow_runs/retrytasks:schedule (bulk flow_run_ids; add parent_account_id to span children — archive)
POST/flow_runs/:id/set_statetasks:schedule
GET/task_runs/:id, /task_runs/:id/log, /task_runs/:id/outputtasks:read
POST/task_runs/filtertasks:read
POST/task_runs/:id/retry, /pause, /resume, /stop, /set_state, /reset_checkpointstasks:schedule
PATCH/task_runs/:idtasks:schedule

Details: endpoints.md.

Troubleshooting

StatusFix
401Missing/invalid e9key_ key or account header — authentication.md
403Wrong account or missing scope
404Wrong flow slug or run id
409PATCH /task_runs/:id on a RUNNING or terminal run; action not in allowed_actions
410Removed listing path — use POST /task_runs/filter
422Missing flow_id (predefined flow) or path+method (on-demand task); retry of a RUNNING task without force; legacy Mongo status token in a filter
503API or api_key table not configured — administrator: MCP apiKey create, or e9 sqlworker createApiKey

Full list: errors.md.

Related documentation

DocumentationUse when
concepts.mdTerminology: flows, runs, IDs, async execution, completed_since, checkpoints
authentication.mdAPI keys, task scopes, and account headers
getting-started.mdFirst requests in five minutes
deploy-flow.mdCheck and schedule a built-in or account flow with MCP or CLI, or publish a flow file to the cron scheduler
echo-walkthrough.mdRun the end-to-end Echo schedule, poll, and completion demo
endpoints.mdReview every HTTP route and curl examples
errors.mdInterpret HTTP status codes
e9-mcpSchedule and inspect work through an MCP session
e9-api-keyCreate and manage Task API credentials
e9-dev-tasksDesign and build flow JSON5 files

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.