agentleFS
lyticslytics/agent-skills/job-manager/SKILL.md

job-manager

Skill4 starsChanged 7 months agoMITView on GitHub

Job/work CRUD and lifecycle management -- create, pause, resume, bounce, kill. Use when the user wants to list, view, create, pause, resume, restart, or manage data jobs and workflows.

  • Sends data out

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Look at level: "error" entries first for failures

    line 169
  2. Very specific:

    Check added/omitted/removed counts to verify exports are happening

    line 170
  3. Distinctive:

    Use the confirmation-gate pattern.

    line 202
  4. Distinctive:

    Job not found (404): Check job ID, list available jobs

    line 210

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Job Manager

Purpose

Full job/work lifecycle management -- list, create, update, and control job state (pause, resume, bounce, kill). Jobs represent data integration tasks like imports, exports, and syncs.

Environment

Requires authenticated API access. See ../references/auth.md for credential resolution.

API Endpoints

List Jobs

curl -s "${LYTICS_API_URL:-https://api.lytics.io}/v2/job" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

By default only shows non-terminal jobs (runnable, sleeping, paused, fault).

Query ParameterDefaultDescription
workflow-Filter by workflow slug
auth_ids-Filter by auth IDs
show_completedfalseInclude completed jobs
show_deletedfalseInclude deleted jobs
show_hiddenfalseInclude hidden jobs
show_allfalseShow everything (sets completed, deleted, hidden to true)
show_statefalseInclude WorkState details in response

Get Job

curl -s "${LYTICS_API_URL:-https://api.lytics.io}/v2/job/${JOB_ID}" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

Get Job by Workflow

curl -s "${LYTICS_API_URL:-https://api.lytics.io}/v2/job/${WORKFLOW}/${JOB_ID}" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

Create Job

curl -s -X POST "${LYTICS_API_URL:-https://api.lytics.io}/v2/job" \
  -H "Authorization: ${LYTICS_API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Job Name",
    "description": "What this job does",
    "workflow": "workflow_name",
    "config": { ... workflow-specific config ... },
    "auth_ids": ["auth_id"],
    "tag": "optional-tag"
  }'

Create Job with Workflow

curl -s -X POST "${LYTICS_API_URL:-https://api.lytics.io}/v2/job/${WORKFLOW}" \
  -H "Authorization: ${LYTICS_API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{ ... job config ... }'

Update Job

curl -s -X PUT "${LYTICS_API_URL:-https://api.lytics.io}/v2/job/${WORKFLOW}/${JOB_ID}" \
  -H "Authorization: ${LYTICS_API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{ ... updated fields ... }'

Job Lifecycle Commands

# Pause
curl -s -X POST "${LYTICS_API_URL:-https://api.lytics.io}/v2/job/${JOB_ID}/pause" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

# Resume
curl -s -X POST "${LYTICS_API_URL:-https://api.lytics.io}/v2/job/${JOB_ID}/resume" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

# Bounce (restart)
curl -s -X POST "${LYTICS_API_URL:-https://api.lytics.io}/v2/job/${JOB_ID}/bounce" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

# Kill (stop permanently)
curl -s -X POST "${LYTICS_API_URL:-https://api.lytics.io}/v2/job/${JOB_ID}/kill" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

# Release
curl -s -X POST "${LYTICS_API_URL:-https://api.lytics.io}/v2/job/${JOB_ID}/release" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

Job Logs

Two endpoints: all-account logs (last 24h, excludes killed jobs) or logs for a specific job (since job creation).

# All account job logs (last 24 hours, non-killed jobs)
curl -s "${LYTICS_API_URL:-https://api.lytics.io}/v2/job/logs" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

# Logs for a specific job (by ID)
curl -s "${LYTICS_API_URL:-https://api.lytics.io}/v2/job/${JOB_ID}/logs" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

# Logs for a specific job (by workflow + ID)
curl -s "${LYTICS_API_URL:-https://api.lytics.io}/v2/job/${WORKFLOW}/${JOB_ID}/logs" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

# Include additional error details
curl -s "${LYTICS_API_URL:-https://api.lytics.io}/v2/job/${JOB_ID}/logs?include_errors=true" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

Query parameter: include_errors=true returns additional error details beyond the default log entries. Always use this when debugging job failures.

Response: array of JobLog entries, sorted by timestamp.

Each log entry contains:

{
  "job_id": "abc123",
  "context": {
    "added": 145,
    "omitted": 3,
    "removed": 12,
    "user_email": "admin@acme.com"
  },
  "code": "JOB-FAULT-022",
  "message": "Human-readable description of what happened",
  "level": "info",
  "timestamp": "2026-03-19T14:30:00Z"
}

Log entry fields:

FieldDescription
job_idWhich job this log belongs to
messageHuman-readable description (e.g., "Started by user admin@acme.com", "Rate limit exceeded")
levelLog level -- info for events, error/warn for problems
timestampWhen the event occurred
codeError code for error-level entries (e.g., JOB-FAULT-022, UNAUTHORIZED-017)
contextAdditional metadata map, varies by event type

Common context fields for export jobs:

Context KeyDescription
addedNumber of users added/exported in this run
omittedNumber of users skipped (e.g., already exported, filtered out)
removedNumber of users removed from the destination
user_emailWho triggered the action (for manual start/pause/kill)

Log sources:

  • API errors from the job's WorkState (execution errors, auth failures, rate limits)
  • System events (job created, started, paused, killed, updated -- info level)

Interpreting logs for debugging:

  • Look at level: "error" entries first for failures
  • Check added/omitted/removed counts to verify exports are happening
  • Compare timestamp of latest log to current time to detect stale jobs
  • code field helps categorize the error type (auth, rate limit, bad request, etc.)

Job Payload

{
  "name": "My Export Job",
  "description": "Export high-value users to Facebook",
  "workflow": "facebook_custom_audiences",
  "config": {
    "segment_id": "segment_id_here",
    "...": "workflow-specific configuration"
  },
  "auth_ids": ["auth_provider_id"],
  "tag": "optional-client-tag",
  "hidden": false,
  "verbose_logging": false,
  "quiet_time_of_day": "02:00",
  "quiet_timezone": "America/Los_Angeles",
  "quiet_period": 4
}

Behavior

For Read Operations (list, get, logs)

Execute immediately and display results in a table format showing:

  • Job ID, name, workflow, status, last updated

For Write Operations (create, update)

Use the confirmation-gate pattern.

For Lifecycle Commands (pause, resume, bounce, kill)

  • pause/resume: Execute with brief confirmation
  • bounce: Explain this restarts the job, confirm
  • kill: Warn this permanently stops the job, require explicit confirmation

Error Handling

  • Job not found (404): Check job ID, list available jobs
  • Invalid workflow: List available workflows
  • Auth missing: Suggest creating auth provider first via connection-manager

Dependencies

  • Uses: ../references/auth.md, ../references/api-client.md, ../references/confirmation-gate.md

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.