Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

fix(#6349): mount the MuAPI skill only when the person names MuAPI

milind-soni36d06d01b522
diff --git a/server/skill-library.test.ts b/server/skill-library.test.ts
index 73f2268cc3..16150c7d33 100644
--- a/server/skill-library.test.ts
+++ b/server/skill-library.test.ts
@@ -182,11 +182,11 @@ describe("bundled muapi-media skill", () => {
const skills = loadBundledSkills(join(process.cwd(), "skills"));
const ids = (text: string) => selectBundledSkills(text, [], skills).map((skill) => skill.manifest.id);
- it("mounts for MuAPI and image or video generation requests, and stays out of other turns", () => {
- for (const text of ["use muapi to render this", "generate a video of a wave", "Make an image of a cat", "text to video please"]) {
+ it("mounts only when the person names MuAPI, and stays out of other image and video requests", () => {
+ for (const text of ["use muapi to render this", "Make a video with MuAPI", "connect muapi"]) {
expect(ids(text), text).toContain("muapi-media");
}
- for (const text of ["summarise this thread", "fix the failing test", "chart revenue by month"]) {
+ for (const text of ["summarise this thread", "fix the failing test", "chart revenue by month", "generate a video of a wave", "Make an image of a cat", "text to video please"]) {
expect(ids(text), text).not.toContain("muapi-media");
}
});
diff --git a/skills/muapi-media/SKILL.md b/skills/muapi-media/SKILL.md
index 41099e5963..f90b94f487 100644
--- a/skills/muapi-media/SKILL.md
+++ b/skills/muapi-media/SKILL.md
@@ -1,23 +1,24 @@
---
name: muapi-media
-description: "Generate or edit images and short videos with the MuAPI MCP server (tools named muapi_*). Use when the person asks to make an image or video and a MuAPI MCP server is connected, or asks how to connect MuAPI."
+description: "Generate or edit images and short videos with the MuAPI MCP server (tools named muapi_*). Use when the person names MuAPI: to make an image or video with it, or to connect it."
---
# MuAPI media generation
MuAPI runs image and video models behind one MCP server. If its tools (`muapi_image_generate`, `muapi_video_generate`
-and the rest) are not available, tell the person how to connect it instead of trying another route: add an MCP
+and the rest) are not available and the person wants MuAPI, tell them how to connect it: add an MCP
server at `https://api.muapi.ai/mcp` with the header `Authorization: Bearer <key>`, where the key comes from
https://muapi.ai/access-keys. Never ask for the key in the chat and never write it into a file or message.
## Process
-1. Confirm the subject, style, aspect ratio, how many outputs and, for video, the length and any input image.
+1. Take the subject, style, aspect ratio, how many outputs and, for video, the length and any input image from the
+ request, with sensible defaults for anything left out.
2. Call `search_models` to shortlist models for the job and check the parameters a model lists before relying on a feature.
3. Image: `muapi_image_generate`; to edit a supplied image, `muapi_upload_image` then `muapi_image_edit`.
Video: `muapi_video_generate`; to animate a still, `muapi_upload_image` then `muapi_video_from_image`.
-4. Before the first paid call, state the model, the exact prompt, the count or length and the expected cost, and wait
- for the person to approve.
+4. Keep to what the person asked for, and say in your reply which model, prompt, count or length and expected cost
+ you used.
5. Poll `muapi_predict_result` until the job finishes, check the output against the brief, and return the files with
the prompt, model and request id. Offer one refinement at a time.
diff --git a/skills/muapi-media/manifest.json b/skills/muapi-media/manifest.json
index 36d6300537..6ff2fe5648 100644
--- a/skills/muapi-media/manifest.json
+++ b/skills/muapi-media/manifest.json
@@ -2,16 +2,10 @@
"id": "muapi-media",
"name": "MuAPI Media",
"version": "0.1.0",
- "description": "Generate and edit images and short videos with the MuAPI MCP server, with the plan and cost approved first.",
+ "description": "Generate and edit images and short videos with the MuAPI MCP server.",
"defaultEnabled": true,
"triggerTerms": [
- "muapi",
- "generate an image",
- "generate a video",
- "make an image",
- "make a video",
- "text to video",
- "image to video"
+ "muapi"
],
"requiredCapabilities": []
}