Cloud Development in Codespace
Last updated
Last updated
Github Codespace is a cloud-based development environment that allows you to develop your code directly in the cloud. It's a great way to develop your agent without having to set up a local development environment. You don't need to have a great network or powerful machine. This guide will show you how to set up a development environment for TEN Agent using Github CodeSpace.
Navigate to TEN-Agent github repository, and click on the Code
button. Then, select Open with Codespaces
. Github will then create a Codespace for you in a new browser tab. The first time you create a Codespace, it may take a few minutes to set up.
Once the Codespace is ready, you will see the VSCode editor in the browser. You can start working with the TEN-Agent repository in the Codespace. You can open the terminal, create new files, and run commands just like you would in a local development environment.
The steps are similar to the process outlined in the Quick Start guide. However, there's no need to run docker compose up
command with Codespace. You can directly start building agent using,
And once successfully built, you can run following command to start server,
As we are not using docker compose with Codespace, you will need to start the front-end UI separately. You can do this by running the following command in the terminal,
This will start the front-end UI at localhost:3000
.
This is a very special step which applies to Codespace only. Codespace will automatically generate a URL for every port you exposed in your Codespace. You can find the URL by clicking on the Ports
tab in the bottom left corner of the Codespace window.
All ports visibility are by default set to private
, you can change it to public
by right click and choose port visibility
. Once you make it public, you can access the URL in your browser to see the front-end UI. Here we will right click on the visibility column of 3000 port, and change its visibility to public
.
Now you can access the front-end UI at the URL generated by Codespace. Find the Forwarded Address
column for port 3000, click on that and browser should start a new tab for you with your front-end UI.
And that's it! You have successfully set up a development environment for TEN Agent using Github Codespace. You can now start developing your agent directly in the cloud. For debugging and development experience it's basically the same as your local VSCode experience.