/** * Markdown documentation for the MiniMax adapter, shown in the * Paperclip UI when an operator is configuring an agent. */ export const agentConfigurationDoc = `# MiniMax Adapter Adapter: \`minimax\` Execution: Pure HTTP (TypeScript) — no CLI subprocess. The MiniMax adapter lets Paperclip agents call the [MiniMax](https://MiniMax.ai) model family (M2 / M2.5 / M2.7 / M3) through MiniMax's OpenAI-compatible chat-completions API. ## Required fields - **apiKey** (\`string\`, required): Your MiniMax API key. Store as a secret ref in production. Falls back to \`MINIMAX_API_KEY\` env var. ## Core fields - **baseUrl** (\`string\`, default \`https://api.minimax.chat/v1\`): MiniMax base URL. - **model** (\`string\`, default \`MiniMax-M3\`): The catalog ID. Common values: - \`MiniMax-M3\` — latest, default. - \`MiniMax-M3:free\` — free tier (rate-limited). - \`MiniMax-M2.7\`, \`MiniMax-M2.5\`, \`MiniMax-M2\` — older stable. - **workspacePath** (\`string\`): Agent's filesystem workspace. Skills are loaded from \`/skills\` and \`/.paperclip/skills\`. - **skillsDir** (\`string\`): Override the skills directory globally. ## Loop tuning - **maxTurns** (\`number\`, default 8): Cap on tool-loop iterations per heartbeat. - **maxToolCallsPerTurn** (\`number\`, default 8): Cap on parallel tool calls in one assistant turn. - **enableStreaming** (\`boolean\`, default true): Stream tokens to the live Working panel. ## Cost tracking - **priceInputPer1M** (\`number\`, default 1.0): USD per 1M input tokens. - **priceOutputPer1M** (\`number\`, default 3.0): USD per 1M output tokens. Override if MiniMax revises their rates. ## Approval flow - **approvalGated** (\`boolean\`, default true): When true, side-effect tools (\`hire_agent\`, \`request_approval\`) route through \`/api/companies/:id/approvals\`. Set false only for trusted local dev. ## Built-in Paperclip tools The adapter ships 8 function-calling tools that map 1:1 to Paperclip's REST API: | Tool | Description | | --- | --- | | \`get_issue\` | Fetch an issue by id or identifier. | | \`list_issues\` | List issues scoped to the company. | | \`update_issue_status\` | Move an issue to a new status. | | \`add_comment\` | Post a comment. | | \`list_comments\` | Read comments on an issue. | | \`create_sub_issue\` | Decompose into sub-issues. | | \`hire_agent\` | Propose hiring a new agent (approval-gated). | | \`request_approval\` | Open a board approval row (approval-gated). | ## Loop break If the same tool is called 3 times in a row with the same arguments, the adapter aborts the run with status \`failed\` and \`errorMessage: "repeat_call_loop_break: "\`. This prevents the model from ping-ponging forever on a task it can't make progress on. ## Environment overrides All fields can be overridden via env vars on the Paperclip host: \`MINIMAX_API_KEY\`, \`MINIMAX_BASE_URL\`, \`MINIMAX_MODEL\`, \`MINIMAX_PRICE_INPUT_PER_1M\`, \`MINIMAX_PRICE_OUTPUT_PER_1M\`, \`MINIMAX_MAX_TURNS\`, \`MINIMAX_MAX_TOOL_CALLS_PER_TURN\`, \`MINIMAX_SKILLS_DIR\`, \`MINIMAX_APPROVAL_GATED\`, \`MINIMAX_STREAM\`. ## Source `;