Skip to content

brx-node-logo

Getting Started with BRX-Node

This guide provides a simplified initiation to the BRX-node package.

Installation Instructions:

bash
git clone git@github.com:Brx-ai/get-started.git
git clone git@github.com:Brx-ai/get-started.git

The BRX-Node package contains several examples demonstrating its functionalities:

  1. Single BRK Run
  2. BRK User Inputs (CLI-only)
  3. Dependant Brk Run
  4. BRK Pipeline Embedding
  5. BRK Pipeline Image Generation
  6. Discrete Json Return

For more detailed information, please visit our official documentation.

Global Set-Up

Global Install Instructions

To install the required runtime dependencies, use the following commands:

bash
npm install
npm install
bash
pnpm install
pnpm install

API Key Generation

Please visit BRX API key generation page to generate your API key. Once the key is generated, remember to update your BRX API Key in the .env file:

javascript
BRXAI_API_KEY=YOUR_API_KEY_HERE
BRXAI_API_KEY=YOUR_API_KEY_HERE

Running Node Examples

Use npm to run the examples.

Run Default Example

bash
npm run brx
npm run brx
bash
pnpm run brx
pnpm run brx

Run Examples 1-5

bash
pnpm run example-1
pnpm run example-1
bash
pnpm run example-{x}
pnpm run example-{x}

BRX Schema Generation

BRX Schemas are static schemas for the runtime of the Top Level BRK. These allow you to gather input variables either before or during runtime to complete the entire event process for a BRK. In case of stops, we recommend using a Promise Await strategy to break a BRX pipeline, followed by a gather of more user input.

For BRX schema, navigate brx.ai/brk/). You may copy the schema from this page and paste it to /schemas/example_schemas.ts file.

A complete list of examples with expected output can be found in the Examples Markdown.

Happy Coding!