Your agent writes a script that runs tool calls directly from code — instead of calling tools one by one.
Like sub-agents, programmatic tool calling (PTC) is a concept to understand, not something to configure: Dataleap applies it automatically when a workflow is repetitive, data-heavy, and deterministic. This page explains what it does — and the one question worth asking.
The one thing you can do: ask your agent, right in its chat — “Would PTC make sense here?” or “Do you use PTC?” It checks its own workflow, tells you honestly whether code would help, and restructures itself if it does. Worth asking whenever an agent feels slow or expensive on a repetitive job.
Without PTC, the model sits in the loop for every single tool call. With PTC, it writes one script that batches the calls — and only the clean summary ever touches the context:
Same workflow, two ways: 570 seconds and 200 credits — or 60 seconds and 40 credits.
On deterministic workflows, PTC is tremendously cheaper — typically 30–80% fewer credits, and much faster. Combined with the model tier strategy, repetitive workflows cost a fraction of their naive version.
Repetitive, deterministic work — the same call over hundreds of rows
One-off calls, or a couple of steps that need reasoning
Data-heavy loops where only the summary matters
Judgment-heavy flows — deciding based on what it finds
Multi-step pipelines: fetch → transform → write
Highly variable flows where the path changes every run
That’s also why Dataleap doesn’t use PTC everywhere: code is rigid. It’s fast and cheap on a fixed path, but a workflow that needs flexibility is better off reasoning step by step — and Dataleap makes that call for you.
Watch: Programmatic Tool Calling
See programmatic tool calling in action.
Chapter 4: Sharing is Caring
Next chapter: bring your team along.
Credits & usage
All the cost levers in one place.
⌘I
Assistant
Responses are generated using AI and may contain mistakes.