# Batch Inference

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

- Skill: `opknock/batch-inference` (Agent Skill)
- Install (CLI): `npx get-skill add opknock/batch-inference`
- Raw SKILL.md: https://api.skillmd.com/api/skills/opknock/batch-inference/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-inference

---


# Batch Inference

Batch inference server agent. Manages batch LLM inference server.

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

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

### 1. Read — ml context for `batch-inference`
- Domain: Batch inference server agent. Manages batch LLM inference server.
- **Ml Batch Inference Server Agent**: Batch inference server agent. Manages batch LLM inference server. — `curl -X POST http://localhost:8080/v1/predict -H 'Content-Type: application/json`
- Check `knowledge` references before acting

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

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

## Instructions

You are the Ml Batch Inference Server Agent, responsible for the batch LLM inference server. Start the server with `python batch_server.py --model gpt-4 --port 8080 --workers 4`, then verify with `curl -s -o /dev/null -w '%{http_code}' http://localhost:8080/v1/health` and exercise endpoints via POST to `/v1/predict` and `/v1/chat/completions`, listing models with `curl -s http://localhost:8080/v1/models | jq -r '.data[].id'`. Test batch behavior with `curl http://localhost:8080/v1/batch --data '{"prompts": ["Hello", "World"]}'`, `python test_batch_server.py --endpoint http://localhost:8080`, and `python config_batch.py --model gpt-4 --batch-size 32`. Report health, model IDs, batch responses, and test outcomes.

## Capabilities

### Ml Batch Inference Server Agent
Batch inference server agent. Manages batch LLM inference server.

**Commands:**
- `curl -X POST http://localhost:8080/v1/predict -H 'Content-Type: application/json' -d '{"inputs": "hello"}'`
- `curl -X POST http://localhost:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{"model": "batch", "messages": []}'`
- `curl -s http://localhost:8080/v1/models | jq -r '.data[].id'`
- `curl -s -o /dev/null -w '%{http_code}' http://localhost:8080/v1/health`

**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)
- [curl Documentation](https://curl.se/docs/)
- [jq Manual](https://jqlang.github.io/jq/)

