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
- Distinctive: line 36
Rule: Do not mix Task API key authentication with MCP session authentication.
- Very specific: line 53
Rule: Use POST /flow_runs/ only for a published flow_id, and use POST /tasks/schedule only for an on-demand path plus method.
≈ “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.
Files
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
| Need | Route or requirement |
| Production base URL | https://data.engine9.ai |
| Authentication | Authorization: Bearer e9key_… plus X-ENGINE9-ACCOUNT-ID |
| Discover flows | GET /flows with tasks:read |
| One flow definition | GET /flows/:id (local file). ?remote=true for a Frakture dataflow. MCP task action: "getFlow" |
| Enable or disable a remote dataflow | PUT /flows/:id?remote=true with { "labels": { "disabled": true } } (tasks:schedule). MCP task action: "setDisabled" |
| Set a remote dataflow cron | PUT /flows/:id?remote=true with { "schedule": { "cron": "0 6 * * *" } }. Empty cron clears it. MCP task action: "setSchedule" |
| Put a flow file on the cron scheduler | MCP task action: "publishFlow" (admin; no engine9 REST route). The file location is the lookup (labels.source). deploy-flow.md |
| Schedule a predefined flow | POST /flow_runs/ with flow_id (built-in slug), flow_path, or definition |
| Run an existing Frakture dataflow | POST /flow_runs/ with flow_id = dataflow Mongo id (remote default); or Frakture POST /tasks/schedule with dataflow_id |
| Schedule an on-demand task | POST /tasks/schedule with path + method |
| Poll task runs | POST /task_runs/filter |
| Count matching flow runs | POST /flow_runs/count |
| Status-pill totals | POST /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.
| Endpoint | Schedules | Required | See also |
POST /flow_runs/ | A predefined flow from GET /flows | flow_id (the flow slug) | For one plugin method: POST /tasks/schedule |
POST /tasks/schedule | An on-demand task | Plugin path + method | For 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
- Discover flows —
GET /flows(orPOST /flows/filter) lists published slugs;GET /flows/:idshows each step'stask_keyand defaultoptions POST /flow_runs/filterwith{"limit":20}— list recent remote runs for the account (defaultremote: true; noflow_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/countandPOST /flow_runs/metricswith the same filters (omitstatuson metrics so pills ignore the current state filter).- Schedule — pick the matching endpoint:
- On-demand task:
POST /tasks/schedulewith{ "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-runtags(Prefect name for Frakturetracking_code, one string). See alsoPOST /flow_runs/. - Predefined flow:
GET /flowsthenPOST /flow_runs/with{ "flow_id": "<slug>", "options"? }— optional top-leveloptions(e.g.start/end) merges into every step; optionaltasks: [{ task_key, options }]for per-step overrides.flow_idis required. Optionaltagssame as on-demand (not flow-definition tags). See alsoPOST /tasks/schedule. → saveflow_run_id/task_run_ids
- On-demand task:
POST /task_runs/filter—{ "flow_run_id": "…" }until complete (eachtask_runincludeslog_link; nocheckpoints)- Remote output:
GET /task_runs/:id(output,resolved_options,checkpoints) orGET /task_runs/:id/output. Logs:GET /task_runs/:id/log(log,truncated, optionallog_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 onPOST /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;Nkeeps the first N). You cannot yank a checkpoint out of the middle.
Full curl: echo-walkthrough.md.
Endpoints
| Method | Path | Scope |
| GET | /flows, /flows/:id | tasks:read |
| PUT | /flows/:id?remote=true | tasks:schedule (partial flow write; labels.disabled enables or disables; schedule.cron sets or clears the cron) |
| POST | /flows/filter | tasks:read |
| POST | /tasks/schedule | tasks:schedule |
| POST | /tasks/describe | tasks:read |
| POST | /flow_runs/ | tasks:schedule |
| GET | /flow_runs/:id | tasks:read |
| POST | /flow_runs/filter | tasks:read |
| POST | /flow_runs/count, /flow_runs/metrics | tasks:read |
| POST | /flow_runs/archive, /flow_runs/retry | tasks:schedule (bulk flow_run_ids; add parent_account_id to span children — archive) |
| POST | /flow_runs/:id/set_state | tasks:schedule |
| GET | /task_runs/:id, /task_runs/:id/log, /task_runs/:id/output | tasks:read |
| POST | /task_runs/filter | tasks:read |
| POST | /task_runs/:id/retry, /pause, /resume, /stop, /set_state, /reset_checkpoints | tasks:schedule |
| PATCH | /task_runs/:id | tasks:schedule |
Details: endpoints.md.
Troubleshooting
| Status | Fix |
| 401 | Missing/invalid e9key_ key or account header — authentication.md |
| 403 | Wrong account or missing scope |
| 404 | Wrong flow slug or run id |
| 409 | PATCH /task_runs/:id on a RUNNING or terminal run; action not in allowed_actions |
| 410 | Removed listing path — use POST /task_runs/filter |
| 422 | Missing flow_id (predefined flow) or path+method (on-demand task); retry of a RUNNING task without force; legacy Mongo status token in a filter |
| 503 | API or api_key table not configured — administrator: MCP apiKey create, or e9 sqlworker createApiKey |
Full list: errors.md.
Related documentation
| Documentation | Use when |
| concepts.md | Terminology: flows, runs, IDs, async execution, completed_since, checkpoints |
| authentication.md | API keys, task scopes, and account headers |
| getting-started.md | First requests in five minutes |
| deploy-flow.md | Check and schedule a built-in or account flow with MCP or CLI, or publish a flow file to the cron scheduler |
| echo-walkthrough.md | Run the end-to-end Echo schedule, poll, and completion demo |
| endpoints.md | Review every HTTP route and curl examples |
| errors.md | Interpret HTTP status codes |
| e9-mcp | Schedule and inspect work through an MCP session |
| e9-api-key | Create and manage Task API credentials |
| e9-dev-tasks | Design and build flow JSON5 files |
In this repository24 other files it gives its agents.
- .cursor/rules/no-client-names.mdcCursor rule
- .cursor/rules/skill-writing-standard.mdcCursor rule
- create-engine9-pluginSkill
- e9-api-keySkill
- e9-cliSkill
- e9-custom-fieldsSkill
- e9-delegate-domainSkill
- e9-dev-tasksSkill
- e9-eqlSkill
- e9-exportSkill
- e9-funnelSkill
- e9-global-messageSkill
- e9-inputSkill
- e9-inventorySkill
- e9-mcpSkill
- e9-modelSkill
- e9-person-idSkill
- e9-person-remoteSkill
- e9-pii-freeSkill
- e9-pluginSkill
- e9-reportsSkill
- e9-source-codeSkill
- e9-timelineSkill
- e9-upgradeSkill
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
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.

