batch_prompt
Execute multiple CLI agent prompts in parallel using server-side asyncio, enabling concurrent task processing with controlled concurrency limits.
Instructions
Send multiple prompts to CLI runners in parallel (primary tool).
Fans out tasks server-side with asyncio.gather and a semaphore, enabling true parallel runner execution within a single MCP call. Single-task usage is perfectly valid — use prompt for convenience when sending one task.
Args: tasks: List of AgentTask objects, each with cli, prompt, and optional fields. max_concurrency: Max parallel runner invocations (default: 3). ctx: MCP context (auto-injected by FastMCP). None when called directly in tests.
Returns: MultiPromptResponse with results for each task.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tasks | Yes | ||
| max_concurrency | No |