2.6k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
3 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill agent-batch-guard- _meta.json290 B
- SKILL.md12.5 KB
Overview
This skill documents a practical, layered guide to prevent AI agents from freezing during large batch tasks due to session transcript bloat. It prescribes agent behavior rules, script-based batch patterns, platform tuning for OpenClaw, and production-ready code patterns like circuit breakers and checkpointing. The goal is reliable, resumable large-scale automation without silent agent failures.
How this skill works
It inspects common failure modes when agent session transcripts grow large and provides mitigations across four layers: agent behavior, execution patterns, platform configuration, and batch-processing code. The skill delivers concrete templates, configuration suggestions for OpenClaw, and code patterns for batching, retries, circuit breaking, and checkpointed progress. Together these prevent compaction timeouts and make long-running jobs observable and resumable.
When to use it
- When an agent must process repeated interactions or paginate over many pages (≥ 5 pages).
- When a task can generate megabytes of transcript or run hundreds of tool calls.
- When jobs need interruption safety and resume capability (断点续传).
- When you run agents on OpenClaw and experience compaction or timeout warnings.
- When you need production-grade error handling, throttling, and adaptive concurrency.
Best practices
- Never loop large repetitive operations inside the conversational transcript; write scripts to handle loops.
- Persist intermediate results to files per batch and keep a progress manifest for resume support.
- Use a circuit breaker: pause after configurable consecutive failures instead of blind retrying.
- Tune OpenClaw contextPruning TTL (e.g., 30m) and set thinkingDefault compatible with your model.
- Chunk large jobs into small batches (by month/platform/category) and have each batch write its own file.
Example use cases
- Export one year of app orders: script per month, progress.json for resume, final summary aggregation.
- Large web or app scraping: agent generates and runs a scrape script, reads output, and reports results in a few conversation turns.
- Bulk API data migration: adaptive concurrency scheduler with per-item checkpointing and retry/backoff.
- Long-running child agents: spawn a child agent for heavy tasks so the parent stays responsive and can read final outputs.
- ADB-based pagination capture: script performs uiautomator dumps, saves batches, and updates progress file.
FAQ
Transcript growth from many tool calls increases compaction work; compaction can timeout and the agent becomes unresponsive without explicit error signals.
How small should batches be?
There is no single rule; pragmatic defaults: write scripts for ≥5 pages, batch every 10 pages or by month, and persist a progress file after each batch to enable safe resume.