Skip to content

livekit-examples/index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LiveKit logo

LiveKit Templates Index

Deploy a sandbox appLiveKit DocsLiveKit CloudBlog

This repository contains a collection of templates for the LiveKit platform. Each template is designed to be used as a starting point for building an application on LiveKit, as well as to work with the LiveKit Sandbox feature to rapidly develop and share app prototypes.

Using a template

All templates in this index can be bootstrapped using the LiveKit CLI. Running the following command will allow you to choose and initialize a template:

lk app create

After choosing a template and name for your project, the CLI will execute the following steps:

  1. Clone the git repository associated with the template to your /tmp directory or equivalent
  2. De-git the repository so you don't include the template's history in your project
  3. Copy the .env.example file to .env.local. This step includes the following:
    • Automatically updating any LIVEKIT_* environment variables that are recognized.
    • Prompting you for any additional variables that are not recognized, such as required API keys.
  4. Move the directory from /tmp to the location you specified
  5. Run the post_create task from the taskfile.yaml and print any user setup instructions

At this point, you're ready to start developing your application. Some templates work best with others – for example, an AI agent template may pair well with a voice assistant frontend template. It all depends on what you want to build. The beauty of LiveKit is that the primitives are interchangeable!

If you need a refresher on the basics, be sure to head to our documentation and read the Intro to LiveKit.

Creating your own template

Repository structure

Your template may be any kind of component, from a front-end for a livestreaming app to a helpful AI assistant built with the Agents framework. In order to be accepted as a community template, your repository must adhere to certain contraints:

  • The template must be a public git repository, though it does not have to be hosted on GitHub.
  • The repository must include a .env.example file at the root, containing stubs for the environment variables that the template requires. The following varaibles are standard, and can be inferred during bootstrap with the LiveKit CLI:
    • LIVEKIT_URL
    • LIVEKIT_API_KEY
    • LIVEKIT_API_SECRET
  • The repository must include a taskfile.yaml file in the root that follows the Taskfile format and defines at least the following tasks:
    • post_create: This task is run after the repository is bootstrapped using lk app create, and usually prints setup instructions for the user.
    • install: This task can be run to install dependencies or perform other steup for the template.

Publishing your template

When you're ready to share your template with the world, you can submit a pull request to this repository. The pull request should add a new entry to the templates.yaml file with the following schema:

Field Type Required Description
name string true The kebab-case identifier of the template.
display_name string true The human-readable name of the template.
desc string true A brief description of the template.
url string true The URL of the git repository containing the template.
image string false The URL of an image to display for the template.
docs string false The URL of the documentation for the template.
requires Seq<string> false A list of other templates that this template may require to function properly. For example, AI agents are somewhat useless without a front-end to connect to.
attrs Map<string, string> false A map of additional attributes that may be useful for describing the template. Common keys are Type, Tools, License, etc.
created_at string false The date the template was added to the index, in ISO 8601 datetime format.
updated_at string false The date the template was last updated, in ISO 8601 datetime format.
is_enabled boolean true Whether the template is enabled for use with the LiveKit CLI. When submitting a template, this should be false until reviewed by a LiveKit representative.
is_sandbox boolean false Whether the template is a sandbox template. Sandbox templates are designed to be hosted by us directly, and have special considerations. When submitting a template, this should be false. If you're interested in submitting a sandbox template, get in contact with us via Slack, or via GitHub issues here.

About

An index of LiveKit application templates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •