> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inworld.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Node.js Agent Runtime Quickstart

This quickstart guide will walk through how to use the [Inworld Runtime CLI](/node/cli/overview) to set up a simple LLM to TTS conversational pipeline (powered by Agent Runtime) in just a few minutes.

## Prerequisites

Before you get started, please make sure you have the following installed:

<Tabs>
  <Tab title="MacOS (arm64)">
    * macOS 14 and later
    * [Node.js v20 or higher](https://nodejs.org/en/download)
    * [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
    * [graphviz](https://graphviz.org/download/) - Optional. Install this if you want to visualize your graph.
  </Tab>

  <Tab title="Linux x64">
    * [Node.js v20 or higher](https://nodejs.org/en/download)
    * [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
    * `build-essential` package
    * `glibc 2.35+` (Ubuntu 22, RHEL 10). Contact [support@inworld.ai](mailto:support@inworld.ai) if you need to extend that support.
    * [graphviz](https://graphviz.org/download/) - Optional. Install this if you want to visualize your graph.
  </Tab>

  <Tab title="Windows x64">
    * [Node.js v20 or higher](https://nodejs.org/en/download)
    * [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
    * [graphviz](https://graphviz.org/download/) - Optional. Install this if you want to visualize your graph.
  </Tab>
</Tabs>

## Get Started

<Steps titleSize="h3">
  <Step title="Install Inworld Runtime CLI">
    Install the Inworld Runtime CLI globally.

    ```bash theme={"system"}
    npm install -g @inworld/runtime
    ```
  </Step>

  <Step title="Log in to your acount">
    Log in to your Inworld account to use Inworld Agent Runtime. If you don't have an account, you can create one when prompted to login.

    ```bash theme={"system"}
    inworld-runtime login
    # You'll be prompted to login via your browser
    ```

    Once logged in, your credentials are stored and you won’t need to log in again.
  </Step>

  <Step title="Create your first project">
    The `inworld-runtime init` command downloads the `llm-to-tts-node` template—a production-ready LLM to TTS pipeline.

    <Note>Currently, only the `llm-to-tts-node` template is available via CLI. To view all available templates, visit the [templates repository](https://github.com/inworld-ai/inworld-runtime-templates-node).</Note>

    ```bash theme={"system"}
    inworld-runtime init --template llm-to-tts-node --name my-project
    # Enter 'y' when prompted to install dependencies
    ```

    After the command completes, you'll have a project directory with all dependencies installed.
  </Step>

  <Step title="Run your graph">
    Navigate to your project directory and run your pipeline with the appropriate inputs.

    ```bash theme={"system"}
    cd my-project
    inworld-runtime run ./graph.ts '{"input": {"user_input":"Hello!"}}'
    ```
  </Step>
</Steps>

## Run a local server

Now that you've successfully run your first graph, you can run a local server to test it in your application.

<Steps titleSize="h3">
  <Step title="Start the local server">
    Start your local server.

    ```bash theme={"system"}
    inworld-runtime serve ./graph.ts
    ```

    You can see additional server configuration in the [CLI overview — Local Server](/node/cli/overview#local-server) section (including support for gRPC and Swagger UI).
  </Step>

  <Step title="Test the API">
    Test the API with a simple curl command. Note that for the LLM to TTS pipeline, the API will return raw audio data that needs to be parsed in order to be played.

    <CodeGroup>
      ```bash cURL theme={"system"}
      curl -X POST http://localhost:3000/v1/graph:start \
          -H "Content-Type: application/json" \
          -d '{"input": {"user_input":"Hello!"}}'
      ```
    </CodeGroup>

    Here is an example of the output

    ```ansi theme={"system"}
    {"executionStarted":{"executionId":"01999de9-8a75-75f8-a17b-7ec4c1b4490e","timestamp":"2025-10-01T03:55:52.309Z","variantName":"__default__"}}
    {"ttsOutputChunk":{"text":"Hello!","audio":{"data":[0,0,0,0,0,0,0,0,0...],"sampleRate":48000}},"responseNumber":1}
    {"ttsOutputChunk":{"text":" How can I assist you today?","audio":{"data":[0,0,0,0,0,0,0,0,0...],"sampleRate":48000}},"responseNumber":1}
    {"executionCompleted":true}
    ```
  </Step>
</Steps>

## Make your first change

Now let's make our first modification to the LLM to TTS pipeline. Let's change the model and prompt.

<Steps titleSize="h3">
  <Step title="Modify graph.ts">
    Open up the graph.ts file in your project directory, which contains the graph configuration. Modify the `provider` and `modelName` under `RemoteLLMChatNode` to any [supported LLM](/models#llm).

    ```js graph.ts theme={"system"}
    import {
      GraphTypes,
      RemoteLLMChatNode,
      RemoteTTSNode,
      SequentialGraphBuilder,
      TextChunkingNode,
    } from '@inworld/runtime/graph';

    const graphBuilder = new SequentialGraphBuilder({
      id: 'custom-text-node-llm',
      nodes: [
        new RemoteLLMChatNode({
          provider: 'openai', // [!code --:2]
          modelName: 'gpt-4o-mini',
          provider: 'google', // [!code ++:2]
          modelName: 'gemini-2.5-flash',
          stream: true,
        }),
        new TextChunkingNode(),
        new RemoteTTSNode(),
      ],
    });

    export const graph = graphBuilder.build();

    // The graph input should be an LLMChatRequest with messages
    // Example input: { messages: [{ role: 'system', content: 'You are an extremely sarcastic assistant. Always respond with sarcasm.' }, { role: 'user', content: 'Hello!' }] }

    ```
  </Step>

  <Step title="Test the API">
    Test your updated graph.

    ```bash theme={"system"}
    inworld-runtime run ./graph.ts '{"input": {"user_input":"Hello!"}}'
    ```
  </Step>
</Steps>

## Next Steps

Now that you've learned the basics, explore more advanced features:

<CardGroup cols={2}>
  <Card title="Deploy to Cloud" icon="cloud-arrow-up" href="/node/cli/deploy">
    Deploy your graphs to a hosted endpoint
  </Card>

  <Card title="Explore templates" icon="books" href="/node/templates/overview">
    Explore other templates to jumpstart your development
  </Card>
</CardGroup>

## Need Help?

* **General CLI help:** Run `inworld-runtime help` or `inworld-runtime [command] --help`
* **Setup & development issues?** See [CLI Troubleshooting Guide](/node/cli/troubleshooting)
