open-index/open-npm huggingface dataset:
npm package: @ira-ai/core
Description: This package contains utility functions and modules that that can be used across different services.
Author: Deep
Latest version: 0.0.23

# Core

`core` is a Node.js package that contains a collection of utility functions and tools that can be used across different services and projects. The goal of this package is to reduce code duplication by providing a common set of tools and utilities that can be easily shared between different services.

## Installation

To use `core` package in your project, run:

```sh
npm i --save @ira-ai/core
```

## Usage

To use `core` in your project, simply require it in your code:

```typescript
import { capitalize } from 'core'

const myString = 'hello, world'
const capitalizedString = capitalize(myString)

console.log(capitalizedString) // Output: "Hello, world"

```
## Publishing package

1. First, make sure you're logged in to npm by running the following command in your terminal and entering your npm credentials when prompted:

```sh
  npm login
```

2. Update the version number in your package.json file

```sh
  npm version <new-version>
```

Replace <new-version> with the new version number (e.g. 1.0.1).

3. Once you're logged in, you can build your package by running the following command in your package directory:
 
```sh
  npm run build
```

This will create a `lib` folder containing the compiled and bundled code for your package.
Make sure to run ```npm run format``` and ```npm run lint``` before building the package to check for any eslint error. 

4. Now you're ready to publish your package to the npm registry. You can do this by running the following command:

```sh
  npm publish --access public
```

That's it! Your package is now published and ready for others to use. 
## Documenting Utility Functions and classes with TypeDoc

TypeDoc provides a set of tags for documenting TypeScript code. Here's an example of how to use TypeDoc syntax to document a utility function:

```typescript
/**
 * Capitalizes the first letter of a string.
 *
 * @param str - The input string to capitalize.
 * @returns The capitalized string.
 */
export function capitalize(str: string): string {
  return str.charAt(0).toUpperCase() + str.slice(1);
}
```

classes can be documented using the below syntax

```typescript
export class Statistics {
  /**
   * Returns the average of two numbers.
   *
   * @remarks
   * This method is part of the {@link core-library#Statistics | Statistics subsystem}.
   *
   * @param x - The first input number
   * @param y - The second input number
   * @returns The arithmetic mean of `x` and `y`
   */
  public static getAverage(x: number, y: number): number {
    return (x + y) / 2.0;
  }
}

```

You can use the following command to generate documentation for the package

```sh
npm run doc:generate
```

This command generates documentation for the package and outputs it to the docs directory.
npm package: @iraaai/mcp-server
Description: MCP server for DemoAgent — expose AI-powered product demos as tools for Claude and other MCP-compatible agents
Latest version: 0.1.0

# @iraaai/mcp-server

MCP (Model Context Protocol) server for [DemoAgent by iraa.ai](https://iraa.ai). Exposes AI-powered product demos as tools that Claude Desktop, Cursor, Windsurf, and any MCP-compatible agent can discover and invoke.

## Quick Start

```bash
npx @iraaai/mcp-server
```

Requires `IRAAAI_API_KEY` environment variable (get one at [iraa.ai/dashboard/keys](https://iraa.ai/dashboard/keys)).

## Claude Desktop Setup

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "demoagent": {
      "command": "npx",
      "args": ["@iraaai/mcp-server"],
      "env": {
        "IRAAAI_API_KEY": "sk_live_YOUR_KEY",
        "IRAAAI_API_URL": "https://api.iraa.ai"
      }
    }
  }
}
```

Then ask Claude: *"Start a demo of [product name]"*

## Available Tools

| Tool | Description |
|------|-------------|
| `list_available_demos` | List all products with active demo configs |
| `start_demo_session` | Start an AI-guided demo session |
| `send_demo_message` | Send a message to an active demo |
| `capture_lead` | Capture lead info (email, name, company) |
| `create_demo_link` | Generate a pre-seeded demo URL for a prospect |
| `run_headless_demo` | Run a full demo conversation programmatically |

## Environment Variables

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `IRAAAI_API_KEY` | Yes | - | Secret API key (`sk_live_*`) |
| `IRAAAI_API_URL` | No | `https://api.iraa.ai` | API base URL |

## What is DemoAgent?

DemoAgent is an AI-powered live demo platform for SaaS companies. It deploys conversational AI agents on websites that guide visitors through interactive product demos, answer questions, and capture leads.

Learn more at [iraa.ai](https://iraa.ai).
npm package: @iraaai/sdk
Description: Headless SDK for programmatic DemoAgent sessions
Latest version: 0.1.0

# @iraaai/sdk

Headless TypeScript/JavaScript SDK for [DemoAgent by iraa.ai](https://iraa.ai). Run AI-powered product demos programmatically -- from any agent, bot, or automation.

## Install

```bash
npm install @iraaai/sdk
```

## Quick Start

```typescript
import { DemoAgent } from '@iraaai/sdk';

const agent = new DemoAgent({
  apiKey: 'sk_live_YOUR_KEY',
  baseUrl: 'https://api.iraa.ai', // optional, this is the default
});

// Start an interactive session
const session = await agent.createSession({
  productId: 'your-product-id',
  visitorMeta: { name: 'Jane', company: 'Acme' },
});

console.log(session.greeting?.text);

// Chat with the demo agent
const reply = await session.chat('Show me the reporting dashboard');
console.log(reply.text);
console.log(reply.suggestions);

// Capture a lead
await session.captureLead({ email: 'jane@acme.com', company: 'Acme' });

// End the session
await session.end();
```

## Headless Mode

Run a full demo conversation with no UI -- perfect for other AI agents:

```typescript
const result = await agent.headless({
  productId: 'your-product-id',
  messages: [
    'Show me the reporting features',
    'How does billing work?',
    'Can I export to CSV?',
  ],
  visitorContext: {
    name: 'Jane',
    company: 'Acme',
    needs: ['reporting', 'billing'],
  },
});

console.log(result.transcript);
console.log(result.summary.featuresShown);
console.log(result.summary.discoveredNeeds);
```

## Generate Demo Links

Create pre-seeded demo URLs for prospects:

```typescript
const link = await agent.createDemoLink({
  productId: 'your-product-id',
  visitorContext: {
    name: 'Jane',
    email: 'jane@acme.com',
    needs: ['enterprise reporting'],
  },
  options: {
    flow: 'enterprise-demo',
    expiresIn: 86400, // 24 hours
  },
});

console.log(link.demoUrl); // Send this to the prospect
```

## API Reference

### `DemoAgent`

| Method | Description |
|--------|-------------|
| `createSession(opts)` | Start a new interactive demo session |
| `createDemoLink(opts)` | Generate a pre-seeded demo URL |
| `headless(opts)` | Run a complete demo programmatically |
| `listProducts()` | List all available products |

### `DemoSession`

| Method | Description |
|--------|-------------|
| `chat(message)` | Send a message, get agent response |
| `captureLead(data)` | Capture lead information |
| `end()` | End the session |

## What is DemoAgent?

DemoAgent is an AI-powered live demo platform for SaaS companies. It deploys conversational AI agents on websites that guide visitors through interactive product demos.

Learn more at [iraa.ai](https://iraa.ai).