Answers from the documentation; checking which model is on duty
Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
motion-canvas-agent - Skill - OpenSmartRoute
Skillv1.0.0
motion-canvas-agent
Agent tooling for Motion Canvas — seek, screenshot, scene graph inspection, settings control, and rendering via HTTP API.
Imported from videozero/skills (motion-canvas-agent/SKILL.md). Install upstream with npx skills add videozero/skills --skill motion-canvas-agent. Copyright stays with the author.
Motion Canvas Agent Plugin
Full programmatic control of a running Motion Canvas editor via HTTP. Seek to any frame, capture screenshots, inspect the scene graph, change resolution/fps/background, and trigger rendering — all without browser automation.
Architecture
Agent (curl/script) ──HTTP──▶ Vite Server (agent-plugin.ts) ──HMR WS──▶ Browser (agent-client.ts)
│ │
▼ ▼
screenshots/ Player + Renderer
(PNG files) + ProjectMetadata
Setup
1. Copy plugin files into your project
assets/agent-plugin.ts → project root
assets/agent-client.ts → src/
2. vite.config.ts
import {defineConfig} from 'vite';import motionCanvas from '@motion-canvas/vite-plugin';import {agentPlugin} from './agent-plugin';export default defineConfig({ plugins: [ motionCanvas(), agentPlugin({screenshotDir: './screenshots'}), ],});
3. project.ts
import {makeProject} from '@motion-canvas/core';import {agentClient} from './agent-client';export default makeProject({ plugins: [agentClient()], scenes: [...],});
4. Start + open browser
npm start# Open http://localhost:9000 in a browser
Each node includes: type, key, position, size, opacity (if not 1), fill, text (if applicable), and children.
AI Agent Workflow
# 1. Check connectioncurl -s localhost:9000/__agent/status# 2. Set resolutioncurl -s -X POST localhost:9000/__agent/settings/size \ -H "Content-Type: application/json" -d '{"width": 1920, "height": 1080}'# 3. Seek to a framecurl -s -X POST localhost:9000/__agent/seek \ -H "Content-Type: application/json" -d '{"frame": 60}'# 4. Screenshotcurl -s -X POST localhost:9000/__agent/screenshot \ -H "Content-Type: application/json" -d '{"name": "check-1"}'# → Read ./screenshots/check-1.png# 5. Inspect scene graphcurl -s localhost:9000/__agent/scene-graph# 6. Check which scene we're incurl -s localhost:9000/__agent/scenes# 7. Check errorscurl -s localhost:9000/__agent/errors# 8. Change backgroundcurl -s -X POST localhost:9000/__agent/settings/background \ -H "Content-Type: application/json" -d '{"color": "#000000"}'# 9. Trigger rendercurl -s -X POST localhost:9000/__agent/render
Security
Localhost only: The agent API runs on the Vite dev server which binds to localhost by default. Do not expose it to the network (avoid --host 0.0.0.0 in production)
Screenshot paths: The screenshot name is sanitized — path separators and dots are stripped, and the resolved path is verified to stay inside the configured screenshotDir
Scene graph text: Text content extracted from the scene graph is sanitized (control characters stripped, truncated to 100 chars). Treat scene graph data as untrusted when processing it
How It Works
Runtime plugin (agentClient()) uses Plugin.player(), Plugin.renderer(), and Plugin.project() callbacks to capture the Player, Renderer, and Project instances
Player provides seek, frame stepping, playback control, current scene, duration
ProjectMetadata provides shared (background, range, size), preview (fps, scale), and rendering (fps, scale, exporter) settings via .get() / .set()
Renderer provides render(settings) and abort() for export
Scene graph is traversed via scene.getView().peekChildren() recursively, serializing type, position, size, fill, text, opacity
Communication uses Vite's HMR WebSocket
Files
File
Copy to
Purpose
assets/agent-plugin.ts
Project root
Vite plugin — HTTP endpoints + WS relay
assets/agent-client.ts
src/
Runtime plugin — Player/Renderer/Project control + canvas capture
Installed into a catalogue, chosen by a router
Install motion-canvas-agent and it becomes one more candidate the router can pick - when it fits.
A listing is a routing target with a manifest: what it does, which domains it covers, what it costs and who publishes it. Once installed it sits beside your own models and tools, is scored like any other candidate for each request, and shows up in the trace when it wins. Ratings come from workspaces that installed it, one per account.
When a provider is down or over quota the request moves on; the trace says it did.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
# after Install: the listing is in your workspace's routing pool - a plan picks it for its slotcurl-s-X POST https://api.opensmartroute.ai/api/v1/route -H 'Authorization: Bearer $OSR_API_KEY' -H 'Content-Type: application/json' -d '{"text": "...", "plan": true}'
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.
videozero-skills-motion-canvas-agent.ocm.jsonjson
{
"ocm": "1",
"id": "videozero-skills-motion-canvas-agent",
"kind": "skill",
"name": "motion-canvas-agent",
"description": "Agent tooling for Motion Canvas — seek, screenshot, scene graph inspection, settings control, and rendering via HTTP API. Use when an agent needs to visually verify, screenshot, inspect or render a running Motion Canvas editor. Requires a browser with the editor open.",
"publisher": "videozero",
"version": "1.0.0",
"capabilities": {
"domains": [
"coding",
"math"
],
"tags": [
"skill-md",
"skills-sh"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Agent tooling for Motion Canvas — seek, screenshot, scene graph inspection, settings control, and rendering via HTTP API. Use when an agent needs to visually verify, screenshot, inspect or render a running Motion Canvas editor. Requires a browser with the editor open."
],
"primary": false,
"metadata": {
"source": {
"provider": "skills.sh",
"repository": "https://github.com/videozero/skills",
"path": "motion-canvas-agent/SKILL.md",
"ref": "HEAD",
"url": "https://github.com/videozero/skills/blob/HEAD/motion-canvas-agent/SKILL.md",
"key": "videozero/skills/motion-canvas-agent/SKILL.md"
}
},
"instructions": "# Motion Canvas Agent Plugin\n\nFull programmatic control of a running Motion Canvas editor via HTTP. Seek to any frame, capture screenshots, inspect the scene graph, change resolution/fps/background, and trigger rendering — all without browser automation.\n\n## Architecture\n\n```\nAgent (curl/script) ──HTTP──▶ Vite Server (agent-plugin.ts) ──HMR WS──▶ Browser (agent-client.ts)\n │ │\n ▼ ▼\n screenshots/ Player + Renderer\n (PNG files) + ProjectMetadata\n```\n\n## Setup\n\n### 1. Copy plugin files into your project\n\n- `assets/agent-plugin.ts` → project root\n- `assets/agent-client.ts` → `src/`\n\n### 2. vite.config.ts\n\n```ts\nimport {defineConfig} from 'vite';\nimport motionCanvas from '@motion-canvas/vite-plugin';\nimport {agentPlugin} from './agent-plugin';\n\nexport default defineConfig({\n plugins: [\n motionCanvas(),\n agentPlugin({screenshotDir: './screenshots'}),\n ],\n});\n```\n\n### 3. project.ts\n\n```ts\nimport {makeProject} from '@motion-canvas/core';\nimport {agentClient} from './agent-client';\n\nexport default makeProject({\n plugins: [agentClient()],\n scenes: [...],\n});\n```\n\n### 4. Start + open browser\n\n```bash\nnpm start\n# Open http://localhost:9000 in a browser\n```\n\n## HTTP API Reference\n\nBase URL: `http://localhost:9000/__agent`\n\n### Playback Control\n\n| Method | Endpoint | Body | Response |\n|--------|----------|------|----------|\n| `GET` | `/status` | — | `{connected, frame, duration, fps, paused, sceneName, errors}` |\n| `POST` | `/seek` | `{frame: 120}` | `{ok, frame}` |\n| `POST` | `/next-frame` | — | `{ok, frame}` |\n| `POST` | `/prev-frame` | — | `{ok, frame}` |\n| `POST` | `/play` | — | `{ok}` |\n| `POST` | `/pause` | — | `{ok}` |\n\n### Screenshots\n\n| Method | Endpoint | Body | Response |\n|--------|----------|------|----------|\n| `POST` | `/screenshot` | `{name: \"my-shot\"}` | `{ok, path, frame}` |\n| `POST` | `/screenshot-base64` | — | `{ok, data, frame}` |\n\n### Settings\n\n| Method | Endpoint | Body | Response |\n|--------|----------|------|----------|\n| `GET` | `/settings` | — | `{background, range, size, previewFps, previewScale, renderingFps, renderingScale}` |\n| `POST` | `/settings/background` | `{color: \"#0F172A\"}` | `{ok}` |\n| `POST` | `/settings/range` | `{start: 0, end: 300}` | `{ok}` |\n| `POST` | `/settings/size` | `{width: 1920, height: 1080}` | `{ok}` |\n| `POST` | `/settings/preview-fps` | `{fps: 30}` | `{ok}` |\n| `POST` | `/settings/preview-scale` | `{scale: 0.5}` | `{ok}` |\n| `POST` | `/settings/rendering-fps` | `{fps: 60}` | `{ok}` |\n| `POST` | `/settings/rendering-scale` | `{scale: 2}` | `{ok}` |\n\n### Rendering\n\n| Method | Endpoint | Body | Response |\n|--------|----------|------|----------|\n| `POST` | `/render` | `{fps?, range?}` | `{ok, message}` |\n| `POST` | `/render/abort` | — | `{ok, message}` |\n\n### Scene Info\n\n| Method | Endpoint | Body | Response |\n|--------|----------|------|----------|\n| `GET` | `/scenes` | — | `{scenes: [{name}], currentScene}` |\n| `GET` | `/scene-graph` | — | `{scene, graph}` (recursive node tree) |\n| `GET` | `/threads` | — | `{scene, slides: [{name, id}]}` |\n\n### Errors\n\n| Method | Endpoint | Body | Response |\n|--------|----------|------|----------|\n| `GET` | `/errors` | — | `{errors: [{message, stack}]}` |\n| `POST` | `/clear-errors` | — | `{ok}` |\n\n## Scene Graph Format\n\n`GET /__agent/scene-graph` returns a recursive tree:\n\n```json\n{\n \"scene\": \"my-scene\",\n \"graph\": {\n \"type\": \"View2D\",\n \"key\": \"my-scene/View2D[1]\",\n \"position\": {\"x\": 960, \"y\": 540},\n \"size\": {\"width\": 1920, \"height\": 1080},\n \"children\": [\n {\n \"type\": \"Rect\",\n \"position\": {\"x\": 0, \"y\": 0},\n \"size\": {\"width\": 400, \"height\": 300},\n \"fill\": \"#1E293B\",\n \"children\": [\n {\n \"type\": \"Txt\",\n \"text\": \"Hello World\"\n }\n ]\n }\n ]\n }\n}\n```\n\nEach node includes: `type`, `key`, `position`, `size`, `opacity` (if not 1), `fill`, `text` (if applicable), and `children`.\n\n## AI Agent Workflow\n\n```bash\n# 1. Check connection\ncurl -s localhost:9000/__agent/status\n\n# 2. Set resolution\ncurl -s -X POST localhost:9000/__agent/settings/size \\\n -H \"Content-Type: application/json\" -d '{\"width\": 1920, \"height\": 1080}'\n\n# 3. Seek to a frame\ncurl -s -X POST localhost:9000/__agent/seek \\\n -H \"Content-Type: application/json\" -d '{\"frame\": 60}'\n\n# 4. Screenshot\ncurl -s -X POST localhost:9000/__agent/screenshot \\\n -H \"Content-Type: application/json\" -d '{\"name\": \"check-1\"}'\n# → Read ./screenshots/check-1.png\n\n# 5. Inspect scene graph\ncurl -s localhost:9000/__agent/scene-graph\n\n# 6. Check which scene we're in\ncurl -s localhost:9000/__agent/scenes\n\n# 7. Check errors\ncurl -s localhost:9000/__agent/errors\n\n# 8. Change background\ncurl -s -X POST localhost:9000/__agent/settings/background \\\n -H \"Content-Type: application/json\" -d '{\"color\": \"#000000\"}'\n\n# 9. Trigger render\ncurl -s -X POST localhost:9000/__agent/render\n```\n\n## Security\n\n- **Localhost only**: The agent API runs on the Vite dev server which binds to localhost by default. Do not expose it to the network (avoid `--host 0.0.0.0` in production)\n- **Screenshot paths**: The screenshot name is sanitized — path separators and dots are stripped, and the resolved path is verified to stay inside the configured `screenshotDir`\n- **Scene graph text**: Text content extracted from the scene graph is sanitized (control characters stripped, truncated to 100 chars). Treat scene graph data as untrusted when processing it\n\n## How It Works\n\n- **Runtime plugin** (`agentClient()`) uses `Plugin.player()`, `Plugin.renderer()`, and `Plugin.project()` callbacks to capture the Player, Renderer, and Project instances\n- **Player** provides seek, frame stepping, playback control, current scene, duration\n- **ProjectMetadata** provides `shared` (background, range, size), `preview` (fps, scale), and `rendering` (fps, scale, exporter) settings via `.get()` / `.set()`\n- **Renderer** provides `render(settings)` and `abort()` for export\n- **Scene graph** is traversed via `scene.getView().peekChildren()` recursively, serializing type, position, size, fill, text, opacity\n- **Communication** uses Vite's HMR WebSocket\n\n## Files\n\n| File | Copy to | Purpose |\n|------|---------|---------|\n| `assets/agent-plugin.ts` | Project root | Vite plugin — HTTP endpoints + WS relay |\n| `assets/agent-client.ts` | `src/` | Runtime plugin — Player/Renderer/Project control + canvas capture |",
"cost": {
"context_tokens": 1667
}
}
Fetch it by URL: GET /api/v1/registry/videozero-skills-motion-canvas-agent/manifest?version=1.0.0
Reviews
Star ratings from people who tried it. One review per account; edit yours any time.
No reviews yet. Install it, try it, and be the first to rate it.