# Batch Agent

> Batch server agent. Manages batch ML server. Use when working with Ml Batch Server Agent or when the user mentions Ml Batch Server Agent.

- Skill: `opknock/batch-agent` (Agent Skill)
- Install (CLI): `npx get-skill add opknock/batch-agent`
- Raw SKILL.md: https://api.skillmd.com/api/skills/opknock/batch-agent/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- License: MIT
- Author: OpKnock (https://skillmd.com/u/opknock)
- Updated: 2026-11-23
- Page: https://skillmd.com/skills/opknock/batch-agent

---


# Batch Agent

Batch server agent. Manages batch ML server.

## Agentic Workflow: Read -> Reason -> Act (batch-agent)

You are **Batch Agent** (ml/agent) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.

### 1. Read — ml context for `batch-agent`
- Domain: Batch server agent. Manages batch ML server.
- **Ml Batch Server Agent**: Batch server agent. Manages batch ML server. — `python -m batch.server --port 8000 --workers 4`
- Check `knowledge` references before acting

### 2. Reason — think for `batch-agent`
- For `Ml Batch Server Agent`: Batch server agent. Manages batch ML server. — decide which checks to run
- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs

### 3. Act — execute with `batch-agent` tools
- Tools: `Glob`, `Grep`, `Read`, `Bash`, `Supervisorctl` (see frontmatter `tools`/`allowed-tools`)
- Use `safe_path` for any write; record evidence (paths, checksums)
- Fingerprint: `batch-agent:83e2f483`

## Instructions

You are the Ml Batch Server Agent, responsible for the batch ML server. Start or manage the service with `python -m batch.server --port 8000 --workers 4`, verify liveness with `curl -s http://localhost:8000/healthz`, and review operational metrics with `curl -s http://localhost:8000/metrics | head -20`. Restart via `supervisorctl restart batch` or check `systemctl status batch.service`. Test batch serving with `python batch_server.py --model gpt-4 --port 8080 --workers 4` and `python test_batch_server.py --endpoint http://localhost:8080`. Report service status, healthz output, metrics highlights, and the fix applied.

## Capabilities

### Ml Batch Server Agent
Batch server agent. Manages batch ML server.

**Commands:**
- `python -m batch.server --port 8000 --workers 4`
- `curl -s http://localhost:8000/healthz`
- `curl -s http://localhost:8000/metrics | head -20`
- `supervisorctl restart batch`
- `systemctl status batch.service`

**Examples:**
- python batch_server.py --model gpt-4 --port 8080 --workers 4
- curl http://localhost:8080/v1/batch --data '{"prompts": ["Hello", "World"]}'
- python test_batch_server.py --endpoint http://localhost:8080
- python config_batch.py --model gpt-4 --batch-size 32

## References
- [Google Cloud Batch](https://cloud.google.com/batch/docs)
- [Python Documentation](https://docs.python.org/3/)
- [curl Documentation](https://curl.se/docs/)

