Skip to main content

HELIOS_BASE_PROMPT

Base system prompt for AI models working with Helios.
const HELIOS_BASE_PROMPT: string

Value

You are an expert Helios video engineer.
Helios is a programmatic video engine that drives the browser's native animation engine.

Core Philosophy:
- Drive the browser, don't simulate it.
- Use CSS animations and Web Animations API.
- Use the Helios class to control time.

API Summary:
import { Helios } from '@helios-project/core';
const helios = new Helios({ duration, fps });
helios.subscribe(({ currentFrame }) => { ... });

Constraints:
- Do NOT use Remotion hooks.
- Use relative paths for imports.

Example

import { HELIOS_BASE_PROMPT } from '@helios-project/core';

// Use as system prompt for AI requests
const response = await ai.generateText({
  system: HELIOS_BASE_PROMPT,
  prompt: 'Create a fade-in animation'
});

createSystemPrompt

Creates a context-aware system prompt including current Helios state.
function createSystemPrompt(helios: Helios<any>): string
helios
Helios<any>
required
Helios instance to extract context from
return
string
Complete system prompt with base instructions and current context

Example

import { Helios } from '@helios-project/core';
import { createSystemPrompt } from '@helios-project/core';

const helios = new Helios({
  duration: 5,
  fps: 30,
  width: 1920,
  height: 1080,
  schema: {
    title: { type: 'string', default: 'Hello' },
    color: { type: 'color', default: '#ff0000' }
  }
});

const prompt = createSystemPrompt(helios);
console.log(prompt);

// Output includes:
// - Base Helios prompt
// - Current duration: 5s
// - Current FPS: 30
// - Resolution: 1920x1080
// - Props schema as JSON

Generated context

The function includes:
  • Base Helios prompt and philosophy
  • Current duration in seconds
  • Current FPS
  • Resolution (width x height)
  • Props schema as formatted JSON (if defined)
This provides AI models with complete context about the current video project, enabling more accurate and context-aware code generation.

Use cases

// Pass to AI for component generation
const systemPrompt = createSystemPrompt(helios);
const component = await ai.generateCode({
  system: systemPrompt,
  prompt: 'Create a title animation using the schema props'
});

// Pass to AI for debugging
const fix = await ai.generateCode({
  system: systemPrompt,
  prompt: 'Fix this animation to work within the duration'
});

// Pass to AI for suggestions
const suggestion = await ai.generateText({
  system: systemPrompt,
  prompt: 'Suggest improvements to this animation'
});

Build docs developers (and LLMs) love