I am trying to set up my first react starter agent...
# ask-ai
m
I am trying to set up my first react starter agent and i am being prompted for
NEXT_PUBLIC_APP_CONFIG_ENDPOINT
after i enter
lk app create --template agent-starter-react
. Where do i get this ?
t
Thanks for reaching out, Milind. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! The
NEXT_PUBLIC_APP_CONFIG_ENDPOINT
is a handy environment variable used in the agent-starter-react template. It tells your app where to fetch dynamic configuration from when it’s running. Here’s how you can set it up: 1. First, define
NEXT_PUBLIC_APP_CONFIG_ENDPOINT
in your
.env.local
file (you can copy it from
.env.example
) and set it to the URL of your configuration server. 2. Make sure your configuration server sends back JSON data that matches the
SandboxConfig
structure. Each entry should be a key-value pair with
type
and
value
fields. For example:
Copy code
{
  "pageTitle": {
    "type": "string",
    "value": "My Custom Page"
  },
  "supportsChatInput": {
    "type": "boolean",
    "value": true
  }
}
Just a heads up: only keys that match the default configuration in the app and have compatible types will be applied. This helps keep everything safe and prevents any invalid settings from causing issues. If you’d like, I’m here to help you set up your configuration server or walk you through the structure. Just let me know! Sources: README.md
m
how do i define it? what should be the value ?
t
To set up
NEXT_PUBLIC_APP_CONFIG_ENDPOINT
, here’s a simple way to do it: 1. First, open or create a file called
.env.local
right in the root of your project folder. 2. Then, add this line inside the file:
Copy code
NEXT_PUBLIC_APP_CONFIG_ENDPOINT=<YOUR_CONFIG_SERVER_URL>
Just swap out
<YOUR_CONFIG_SERVER_URL>
with the real URL of your configuration server. This URL should lead to a server or endpoint that provides JSON data formatted as
SandboxConfig
. If you don’t have a configuration server set up yet, no worries! You can create a simple one that sends back a JSON object with the config values you need. Feel free to ask me if you’d like some help getting that started—I’m here for you!
m
how to get a configuration server
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!