Build a generative AI plugin from scratch using progressive plugin development
Create project
Create plugin inside project
Add plugin to character
my-eliza-project/src/character.ts
, add the local path to Eliza’s plugins array:Build plugin and test connection
dist/
folder that ElizaOS loads from:Successfully loaded plugin 'plugin-fal-ai'
http://localhost:3000
→ click your agent → Plugins tabbun add @fal-ai/client
import { fal } from "@fal-ai/client"
fal.subscribe("model-endpoint", { input: {...} })
{ data, requestId }
Add fal.ai dependency
Study the template structure
plugin-fal-ai/src/plugin.ts
to see the sample code patterns for plugins:quickAction
- example Action (what agent can DO)quickProvider
- example Provider (gives agent CONTEXT)StarterService
- example Service (manages state/connections)Create your text-to-video action using plugin patterns
Update index.ts to use your action
src/index.ts
to use our new plugin:plugin.ts
as well as other plugins from the Plugin Registry to see other plugin component examples (providers, services, etc.) as you expand your plugin.Get your fal.ai API key
Test the updated plugin
Test video generation
http://localhost:3000
):"Create video: dolphins jumping in ocean"
"Make video: cat playing piano"
"Generate video: sunset over mountains"
Add a component test
plugin-fal-ai/src/__tests__/plugin.test.ts
:Run component tests
Add an E2E test
src/__tests__/e2e/plugin-fal-ai.e2e.ts
:Run E2E tests