nimble-tasks-reference
Reference for nimble tasks and batches commands. Load when polling async task status, tracking batch progress, or fetching results. Works for ALL async types: agent run-async, agent run-batch, extract-async, extract-batch, crawl (per-page tasks), search async, map async. CRITICAL: agent tasks use "success"/"error" states; crawl page tasks use "completed"/"failed".
What this skill does
# nimble tasks & batches — reference
Unified task and batch layer for ALL async Nimble operations. Every async job produces a
`task_id`, and batch jobs produce a `batch_id` containing multiple tasks. Use these
commands to check status and retrieve results.
## Table of Contents
- [Tasks](#tasks)
- [1. Get task status](#1-get-task-status)
- [2. Get task results](#2-get-task-results)
- [3. List tasks](#3-list-tasks)
- [Batches](#batches)
- [4. Get batch progress](#4-get-batch-progress)
- [5. Get batch details](#5-get-batch-details)
- [6. List batches](#6-list-batches)
- [Common patterns](#common-patterns)
- [Data retention](#data-retention)
---
## Tasks
### 1. Get task status
**Parameters:**
| Parameter | CLI flag | Type | Description |
|-----------|----------|------|-------------|
| `task_id` | `--task-id` | string | Task ID (required) |
**CLI:**
```bash
nimble tasks get --task-id "8e8cfde8-345b-42b8-b3e2-0c61eb11e00f"
```
**Python SDK:**
```python
from nimble_python import Nimble
nimble = Nimble(api_key=os.environ["NIMBLE_API_KEY"])
task = nimble.tasks.get(task_id)
state = task.task.state
```
**Task state values by source:**
| Source | Terminal states | Intermediate |
|--------|----------------|--------------|
| `agent run-async` | `success` / `error` | `pending` |
| `agent run-batch` (per task) | `success` / `error` | `pending` / `in_progress` |
| `extract-async` | `success` / `error` | `pending` |
| `extract-batch` (per task) | `success` / `error` | `pending` / `in_progress` |
| Crawl page task | `completed` / `failed` | `pending` / `processing` |
---
### 2. Get task results
**Parameters:**
| Parameter | CLI flag | Type | Description |
|-----------|----------|------|-------------|
| `task_id` | `--task-id` | string | Task ID (required) |
**CLI:**
```bash
nimble tasks results --task-id "8e8cfde8-345b-42b8-b3e2-0c61eb11e00f"
```
**Python SDK:**
```python
results = await nimble.tasks.results(task_id) # returns plain dict
```
**Response shape by source:**
| Source | Shape |
|--------|-------|
| `agent run-async` / batch | `{"data": {"parsing": ...}, "status": "success", ...}` |
| Crawl page | `{"url": "...", "data": {"html": "...", "markdown": "..."}, "status_code": 200, ...}` |
| Extract async / batch | `{"data": {"html": "...", "markdown": "...", "parsing": {}}, "status": "success", ...}` |
> `tasks.results()` returns **plain dicts** — no `.model_dump()` needed.
---
### 3. List tasks
**Parameters:**
| Parameter | CLI flag | Type | Description |
|-----------|----------|------|-------------|
| `limit` | `--limit` | int | Results per page |
| `cursor` | `--cursor` | string | Pagination cursor |
**CLI:**
```bash
nimble tasks list --limit 20
```
**Python SDK:**
```python
result = nimble.tasks.list()
```
---
## Batches
Batch operations (`agent run-batch`, `extract-batch`) return a `batch_id` containing
multiple tasks. Use these commands to track overall progress and retrieve individual
task results.
### 4. Get batch progress
Lightweight progress check — returns completion percentage without fetching all task details.
**Parameters:**
| Parameter | CLI flag | Type | Description |
|-----------|----------|------|-------------|
| `batch_id` | `--batch-id` | string | Batch ID (required) |
**CLI:**
```bash
nimble batches progress --batch-id "b7e1a2f3-..."
```
**Response:**
```json
{
"completed": false,
"completed_count": 47,
"progress": 0.47
}
```
| Field | Type | Description |
|-------|------|-------------|
| `completed` | bool | `true` when all tasks are done (success or error) |
| `completed_count` | int | Number of finished tasks |
| `progress` | float | 0.0 to 1.0 completion ratio |
---
### 5. Get batch details
Returns all task IDs, states, and download URLs for a batch.
**Parameters:**
| Parameter | CLI flag | Type | Description |
|-----------|----------|------|-------------|
| `batch_id` | `--batch-id` | string | Batch ID (required) |
**CLI:**
```bash
nimble batches get --batch-id "b7e1a2f3-..."
```
**Response:** Contains the full list of tasks with their IDs and states. Use
`nimble tasks results --task-id <id>` to fetch results for each successful task.
---
### 6. List batches
**Parameters:**
| Parameter | CLI flag | Type | Description |
|-----------|----------|------|-------------|
| `limit` | `--limit` | int | Results per page |
| `cursor` | `--cursor` | string | Pagination cursor |
**CLI:**
```bash
nimble batches list --limit 20
```
---
## Common patterns
### Single async task — full poll loop
```bash
# Submit
TASK_ID=$(nimble agent run-async --agent amazon_pdp --params '{"asin": "B0CHWRXH8B"}' \
| python3 -c "import json,sys; print(json.load(sys.stdin)['task']['id'])")
# Poll
while true; do
STATE=$(nimble tasks get --task-id "$TASK_ID" \
| python3 -c "import json,sys; print(json.load(sys.stdin)['task']['state'])")
[ "$STATE" = "success" ] || [ "$STATE" = "error" ] && break
sleep 3
done
nimble tasks results --task-id "$TASK_ID"
```
**Python SDK (async):**
```python
import asyncio, os
from nimble_python import AsyncNimble
async def run():
nimble = AsyncNimble(api_key=os.environ["NIMBLE_API_KEY"])
resp = await nimble.agent.run_async(agent="amazon_pdp", params={"asin": "B0CHWRXH8B"})
task_id = resp.task["id"]
while True:
task = await nimble.tasks.get(task_id)
if task.task.state in ("success", "error"):
break
await asyncio.sleep(2)
results = await nimble.tasks.results(task_id)
parsing = results["data"]["parsing"]
await nimble.close()
```
### Batch — full poll loop
```bash
# Submit batch
BATCH_ID=$(nimble agent run-batch \
--shared-inputs 'agent: amazon_serp' \
--input '{"params": {"keyword": "iphone 15"}}' \
--input '{"params": {"keyword": "iphone 16"}}' \
| python3 -c "import json,sys; print(json.load(sys.stdin)['batch_id'])")
# Poll progress
while true; do
DONE=$(nimble batches progress --batch-id "$BATCH_ID" \
| python3 -c "import json,sys; d=json.load(sys.stdin); print(d['completed'])")
[ "$DONE" = "True" ] && break
sleep 5
done
# Get all task IDs
nimble batches get --batch-id "$BATCH_ID" \
| python3 -c "
import json, sys
batch = json.load(sys.stdin)
for task in batch['tasks']:
if task['state'] == 'success':
print(task['id'])
" | while read TASK_ID; do
nimble tasks results --task-id "$TASK_ID"
done
```
**Python SDK:**
```python
import asyncio
from nimble_python import AsyncNimble
async def run_batch():
nimble = AsyncNimble(api_key=os.environ["NIMBLE_API_KEY"])
resp = nimble.agent.batch(
inputs=[
{"params": {"keyword": "iphone 15"}},
{"params": {"keyword": "iphone 16"}},
],
shared_inputs={"agent": "amazon_serp"},
)
batch_id = resp["batch_id"]
# Poll until complete
while True:
progress = nimble.batches.progress(batch_id)
if progress["completed"]:
break
await asyncio.sleep(5)
# Fetch results
batch = nimble.batches.get(batch_id)
for task in batch["tasks"]:
if task["state"] == "success":
result = await nimble.tasks.results(task["id"])
print(result["data"]["parsing"])
await nimble.close()
```
---
## Data retention
| State | Retention |
|-------|-----------|
| Pending tasks (not started) | 24 hours |
| Completed results | 24-48 hours (indefinite with cloud storage) |
| Failed tasks | 24 hours |
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.