diff --git a/getting-started/create-a-hello-world-extension.md b/getting-started/create-a-hello-world-extension.md deleted file mode 100644 index 2e39ab1..0000000 --- a/getting-started/create-a-hello-world-extension.md +++ /dev/null @@ -1,190 +0,0 @@ ---- -layout: - title: - visible: true - description: - visible: false - tableOfContents: - visible: true - outline: - visible: true - pagination: - visible: true ---- - -# Create a hello world extension - -In this chapter, we are going to create a `Hello World` extension step by step, available in Python, Go, and C++. Feel free to choose whichever language you prefer. So buckle up. - -## Prerequisites - -Before diving into this chapter, you’ll need to be familiar with the [basics covered earlier](quickstart.md). Specifically, ensure you understand how to use `docker compose up` and are aware of the services running in the background. - -## 1. Compose up the servers - -First things first, let’s start by composing the servers. Run the following command: - -{% hint style="info" %} -If the caption says `Terminal`, it means you are running the command locally. If the caption says `Bash`, it means you are running the command in the Docker container. -{% endhint %} - -{% code title=">_ Terminal" %} -```bash -docker compose up -``` -{% endcode %} - -Once the command is entered, you should see output similar to this: - -
....
-Attaching to astra_agents_dev, astra_graph_designer, astra_playground
-astra_agents_dev | >> run graph designer server
-astra_agents_dev | cd agents && tman dev-server
-astra_agents_dev | :-) Starting server at http://0.0.0.0:49483
-astra_graph_designer | ▲ Next.js 14.2.4
-astra_graph_designer | - Local: http://localhost:3000
-astra_graph_designer | - Network: http://0.0.0.0:3000
-astra_graph_designer |
-astra_graph_designer | ✓ Starting...
-astra_playground | ▲ Next.js 14.2.4
-astra_playground | - Local: http://localhost:3000
-astra_playground | - Network: http://0.0.0.0:3000
-astra_playground |
-astra_playground | ✓ Starting...
-astra_graph_designer | ✓ Ready in 293ms
-astra_playground | ✓ Ready in 293ms
-...
-
-
-Now, we’ve got the following services running:
-
-• `astra_agents_dev` at `http://0.0.0.0:49483` (the backend server for the Graph Designer)
-
-• `astra_graph_designer` at `http://localhost:3000` (the UI of the Graph Designer)
-
-• `astra_playground` at `http://localhost:3001` (the UI of the Astra agent)
-
-## 2. Enter the docker container
-
-To work within the isolated environment, run the following command:
-
-{% code title=">_ Terminal" %}
-```bash
-docker exec -it astra_agents_dev bash
-```
-{% endcode %}
-
-## 3. Create the hello world extension
-
-By running the following commands, an extension called `hello_world` will be created in Python, Go, or C++.
-
-{% tabs %}
-{% tab title="Python" %}
-cd agents/ten_packages/extension
-
-tman install extension default_extension_python --template-mode --template-data package_name=hello_world --template-data class_name_prefix=HelloWorld
-
-cd /app
-
-{% endtab %}
-
-{% tab title="Go" %}
-cd agents/ten_packages/extension
-
-tman install extension default_extension_go --template-mode --template-data package_name=hello_world --template-data class_name_prefix=HelloWorld
-
-cd /app
-
-{% endtab %}
-
-{% tab title="C++" %}
-cd agents/ten_packages/extension
-
-tman install extension default_extension_cpp --template-mode --template-data package_name=hello_world --template-data class_name_prefix=HelloWorld
-
-cd /app
-
-{% endtab %}
-{% endtabs %}
-
-After running the command, the log will display something like this:
-
-...
-Resolving packages...
-:-) Install successfully in xxx seconds
-...
-
-
-## 4. Adding API to the extension
-
-Navigate into the `hello_world` directory and open manifest.json. Add the API objects with `data_in` and `cmd_out`, which we will use shortly within the Graph Designer:
-
-{
- "type": "extension",
- "name": "hello_world",
- "version": "0.4.1",
- "language": "python",
- "dependencies": [
- {
- "type": "system",
- "name": "rte_runtime_python",
- "version": "0.4.1"
- }
- ],
- "api": {
- "data_in": [
- {
- "name": "text_data",
- "property": {
- "text": {
- "type": "string"
- },
- "is_final": {
- "type": "bool"
- }
- }
- }
- ],
- "cmd_out": [
- {
- "name": "flush"
- }
- ]
- }
-}
-
-
-For detailed information on the API and schema, please refer to [ten-api-beta.md](../ten-service/ten-api-beta.md "mention") and [ten-schema-beta.md](../ten-service/ten-schema-beta.md "mention").
-
-## 5. Build the extension
-
-Let's use `cd /app` command to go back to the root of the project, and run `make build` to build the extension.
-
-{% code title=">_ Bash" %}
-```bash
-cd /app
-
-make build
-```
-{% endcode %}
-
-## 6. Restart the server
-
-You don’t need to restart the server when you first build the agent. However, after making minor updates, if refreshing the page doesn’t apply the changes, you’ll need to restart the server in Docker to ensure the updates take effect.
-
-Restart the server for astra_agents_dev
hello_world extension
// ...
-"nodes": [
- {
- "type": "extension",
- "extension_group": "default",
- "addon": "agora_rtc",
- "name": "agora_rtc",
- "property": {
- "app_id": "app-id",
- "token": "<agora_token>",
- "channel": "astra_agents_test",
- "stream_id": 1234,
- "remote_stream_id": 123,
- "subscribe_audio": true,
- "publish_audio": true,
- "publish_data": true,
- "enable_agora_asr": true,
- "agora_asr_vendor_name": "microsoft",
- "agora_asr_language": "en-US",
- "agora_asr_vendor_key": "stt-key",
- "agora_asr_vendor_region": "stt-region",
- "agora_asr_session_control_file_path": "session_control.conf"
- }
- },
-// ...
-
-
-
-{% endtab %}
-
-{% tab title="config.go" %}
-// ...
-// Default graph name
-graphNameDefault = "va.openai.azure"
-// ...
-
-{% endtab %}
-{% endtabs %}
-
-Save both files, then run `make build`. Your agent, complete with the intended extensions, should now be up and running.
diff --git a/getting-started/quickstart.md b/getting-started/quickstart.md
deleted file mode 100644
index c25e69d..0000000
--- a/getting-started/quickstart.md
+++ /dev/null
@@ -1,139 +0,0 @@
----
-layout:
- title:
- visible: true
- description:
- visible: false
- tableOfContents:
- visible: true
- outline:
- visible: true
- pagination:
- visible: true
----
-
-# Quickstart
-
-In this chapter, we’ll build the Astra agent together. For additional help, check out the YouTube video tutorial at the end.
-
-Make sure the box is unchecked
Graph Designer