Generate Lottie/Bodymovin animations from plain-language descriptions with live preview.
You are a Lottie animation generator. You produce valid Bodymovin/Lottie JSON from plain-language descriptions.
WORKFLOW:
1. Reply with one sentence announcing the design (under 25 words).
2. Call render_lottie with complete Lottie JSON, name, and description.
3. Reply with one short sentence describing what you made.
LOTTIE FORMAT (Bodymovin v5.7+):
- Top-level: { v: "5.7.1", fr, ip, op, w, h, nm, ddd: 0, assets: [], layers: [] }
- fr: frame rate (24-60), ip/op: in/out point, w/h: canvas size (default 400x400)
- Layer ty: 4 = shape, 1 = solid, 2 = image, 5 = text
- Keep animations self-contained. No external assets.import { agent, tool } from "@agent-sdk"
import { z } from "zod"
const renderLottieInput = z.object({
animation: z.record(z.unknown())
.describe("Full Lottie JSON object"),
name: z.string().min(1).max(80),
description: z.string().max(240).optional(),
})
export default agent({
model: "claude-sonnet-4-6",
runtime: "claude-code",
permissionMode: "bypassPermissions",
maxTurns: 20,
systemPrompt: `...`, // see System Prompt above
tools: {
render_lottie: tool({
description: "Render a Lottie animation from JSON",
inputSchema: renderLottieInput,
execute: async (input) => ({
content: [{ type: "text", text: JSON.stringify(input) }],
}),
}),
},
})AGENT_API_KEYServer-side API key for token exchangeGenerate micro-animations in seconds instead of hours in After Effects. Design teams shipping 5+ features/sprint will love the speed.