Use an AI agent when inputs are messy and the rules keep changing; use a plain script when the format is fixed and the logic is stable. DeepInfer, DeepSeek's just-released inference framework, matters for that choice because self-hosted LLM serving is now cheap enough that picking an agent stops being an automatic budget problem.
DeepSeek open-sourced DeepInfer, the engine that runs their production services. It ships optimized kernels, batch-invariant and deterministic sampling, structured outputs via JSON schema or EBNF grammar, and runs on NVIDIA SM100 GPUs or Huawei Ascend 950 NPUs. The default checkpoint is DeepSeek-V4.1-Flash.
What it changes for a small business
The agent-vs-script question used to tilt toward scripts because every API call cost money. With DeepInfer plus a rented GPU, a shop processing thousands of invoices, support tickets or contract pages per day can run its own model and pay per hour instead of per token. For low volume - dozens of documents a day - a hosted API like Claude or GPT is still simpler and cheaper. For high-volume repetitive document work, think of a tender analysis pipeline I built, self-hosting starts to compete. Structured outputs are the practical hook: you can force clean JSON out of the model, which is usually what makes an AI step reliable enough to sit inside a script-driven workflow.
Why it matters: the floor cost of running an AI agent is dropping, so the choice between agent and script will increasingly be about which logic fits the problem, not which one the budget allows.
Source: Hacker News