bandicot
Bandicot Docs
Chapter IIIWork · Available now

The program tool

How the agent writes a short sandboxed script that calls Bandicot's tools many times and returns only the result, what it may do, and its limits.

Available now. A current user-facing path exists within the stated scope.

What the program tool does

program lets the agent write a short script that calls Bandicot's own tools many times in one go and returns only the final answer.

You do not write the script; the agent does. It suits reading many files and keeping only the matches, looping over a list, or filtering a large result. The raw data stays out of the conversation, which keeps the context small.

When the agent uses it

The agent uses it for several related calls planned in advance, for loops over a list, and for filtering large results, but not when it needs judgment between steps.

One or two small calls are cheaper made directly, so the agent makes those directly.

Why it is safe

The script runs in a sealed JavaScript sandbox with no file, network, process or timer access of its own, and every tool it calls passes the same permissions as a direct call.

Permission cards appear just as they would for a direct call. Reads may run together; writes run one at a time, in order. A script that calls no tool is refused before it runs.

Limits

A script runs for about two minutes at most, returns a small result and makes a bounded number of tool calls.

A script may set tighter limits for itself, never looser ones.

Limits for one script
LimitValue
Run timeAbout 120 seconds
Result size64 KB
Memory256 MiB
Tool calls256 per script
Calls at once8
Script size256 KB

What a run reports

Each run ends with one result kind, from ok to the reason it stopped, plus how long it took and how much data it read.

Comparing how much the script read with what it returned shows how much was kept out of the chat.

Result kinds
ResultMeaning
okThe script finished and returned its answer.
syntax_errorThe script could not be read.
runtime_errorThe script failed while running.
permission_deniedA call it made was denied.
memory_exhaustedIt ran out of memory.
limit_exceededIt hit a time, size or call limit.
interruptedThe run was stopped.

If it goes wrong

A row says program refused: the script calls no tool.
Nothing to fix. The agent answers in text instead.

Where you see it

In the Terminal pane, the agent's program runs are grouped under the Program tab.

Settings › Capabilities lists it as Program (JS). Turning it off removes the tool from the agent's list. See Settings and Terminal and browser.

Questions

Do I need to know JavaScript?

No. The agent writes and runs the script. You see its calls and its result.

Can a script reach the internet?

Only through Bandicot tools you allow, such as web, and those ask as usual.