codebrain_batch_generate
Run multiple generation prompts in sequence with a shared system prompt. Captures errors inline per item, returning all results with delimiters.
Instructions
Run several generation prompts in sequence and return all results.
One shared system prompt applies to every item. Prompts are processed
serially (Ollama serialises on a single GPU anyway). A failure on one
prompt is captured inline as [codebrain error] ... at that index, so
the whole batch never aborts.
Returns a single string with per-item delimiters:
--- [0] ---
<result for prompts[0]>
--- [1] ---
<result for prompts[1]>Args:
prompts: List of prompts to run with the same system message.
system: Optional shared system message.
use_brain: If true, prepend .brain/context.md from cwd to the system prompt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompts | Yes | ||
| system | No | ||
| use_brain | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |