> For the complete documentation index, see [llms.txt](https://nasdaiq.gitbook.io/nasdaiq-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nasdaiq.gitbook.io/nasdaiq-docs/developers/capps-quickstart.md).

# cApps Quickstart

### Prerequisites

* [Python 2.7+](https://www.python.org/downloads/)
* [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
* [pnpm](https://pnpm.io/installation)
* [docker](https://www.docker.com/)

> **Note for Windows Users:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) is required.

### Using the Quickstart Repository

1. Clone the github repository

```bash
git clone [coming soon]
cd nasdaiq
```

2. Install requirements and build the required packages

```bash
pnpm i && pnpm build
```

3. Copy the sample .env file and add your API keys:

```bash
cp .env.example .env
```

```
~/.env

# API Keys
GEMINI_API_KEY=your_key_here
OPENAI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_here
BROWSER_AGENT_KEY=your_key_here
```

### Configuring your cApp

You can pre-define the actions and goals for the cApp which provides a configuration for the framework to scaffold for you.&#x20;

1. Add configuration file in the project root with the name `capp.config.json`

```
{
    "capp_id": {
        "name": "Expedai",
        "logo_path": "https://url_to_logo/image.jpg",
        "primary_color": "#hex_color",
        "secondary_color": "#hex_color",
        "initial_prompts": {
            "goals": ["book_user_flights", "get_flight_info"],
            "actions": ["book_flight", ""],
            "analysis": "Analysis style guidelines...",
            "narrative": "Communication style guidelines..."
        }
    }
}
```

2. Run the script to scaffold the project with your configuration:

```
pnpm run scaffold --config="capp.config.json"
```

### Running the Application <a href="#running-the-application" id="running-the-application"></a>

1. Start the application:

```
# Start Terminal Interface
pnpm start
```

2. The agent will be live in your terminal and you can begin interacting with it.

### Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

Common issues and solutions:

1. Missing `.env` file:

   * Make sure all required API keys are included in your `.env` file and verify that they are valid and not expired.

2. Incorrect NodeJS Version:

   * Verify your NodeJS version: `node -v`
   * Must be 23.3.0 or higher
   * Consider using [nvm](https://github.com/nvm-sh/nvm) to manage Node versions

3. "Module not found" Error

* Ensure the module is listed in your `dependencies` or `devDependencies` in `package.json`.
* Run `npm install` or `yarn install` to install missing modules.
* If the issue persists, delete the `node_modules` folder and reinstall:

  ```bash
  rm -rf node_modules
  pnpm install
  ```

4. **"npm WARN" Messages During Installation**

* Review the warnings and update any outdated packages:

  ```bash
  npm install <package>@latest
  ```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://nasdaiq.gitbook.io/nasdaiq-docs/developers/capps-quickstart.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
