# @ariaflowagents/starters

Production-ready AriaFlow starter packs for common use cases.

## Install

```bash
npm install @ariaflowagents/starters @ariaflowagents/config @ai-sdk/openai
```

## Available Starters

| Starter | Description | Tags |
|---------|-------------|------|
| [basic](./starters/basic/) | Simple LLM agent with echo tool and skill loader | starter, beginner, template |
| [sales](./starters/sales/) | Multi-agent sales system with product catalog | sales, ecommerce, lead-qualification |
| [support](./starters/support/) | Customer support with ticket creation | support, ticketing, helpdesk |
| [bank-hybrid](./starters/bank-hybrid/) | Banking triage with balance/dispute flows | banking, finance, hybrid-flow |

## Usage

Install the starter package and extend it:

```bash
npm install @ariaflowagents/starters
```

Create your `ariaflow.jsonc`:

```jsonc
{
  "$schema": "https://mithushancj.com/config.json",
  "extends": "./node_modules/@ariaflowagents/starters/sales/ariaflow.jsonc"
}
```

Run it:

```typescript
import dotenv from 'dotenv';
import { openai } from '@ai-sdk/openai';
import { loadAriaflowConfig, createRuntimeFromConfig } from '@ariaflowagents/config';

dotenv.config();

const loaded = await loadAriaflowConfig({
  configPath: './ariaflow.jsonc',
  modelRegistry: {
    default: openai('gpt-4o-mini') as any,
  },
});

const runtime = createRuntimeFromConfig(loaded);

for await (const part of runtime.stream({ input: 'Hello!' })) {
  if (part.type === 'text-delta') {
    process.stdout.write(part.text);
  }
}
```

## Extend a Starter

Create your own config that extends the starter:

```jsonc
{
  "$schema": "https://mithushancj.com/config.json",
  "extends": "./node_modules/@ariaflowagents/starters/sales/ariaflow.jsonc",
  "runtime": {
    "defaultAgent": "sales-triage"
  },
  "agents": {
    "sales-triage": {
      "prompt": "You are an ENTERPRISE sales agent for Fortune 500 companies. Ask about team size and budget immediately."
    }
  }
}
```

## Add Custom Tools

```jsonc
{
  "extends": "./node_modules/@ariaflowagents/starters/sales/ariaflow.jsonc",
  "tools": {
    "my_custom_tool": {
      "type": "module",
      "entry": "./tools/my-custom-tool/index.ts"
    }
  },
  "agents": {
    "sales-agent": {
      "tools": ["product_catalog", "my_custom_tool"]
    }
  }
}
```

## Publish Your Own Starter

Create a starter package:

```
my-starter/
├── package.json
├── ariaflow.jsonc
├── .ariaflow/
│   ├── prompts/
│   ├── tools/
│   └── flows/
└── README.md
```

```json
{
  "name": "@myorg/ariaflow-my-starter",
  "version": "1.0.0",
  "main": "ariaflow.jsonc"
}
```

```bash
npm publish
 Structure

Each starter contains```

## Directory:

```
starter-name/
├── ariaflow.jsonc       # Main config file
├── .ariaflow/
│   ├── prompts/         # System prompts (.md)
│   ├── tools/           # Tool implementations
│   │   └── tool-name/
│   │       ├── index.ts
│   │       └── tool.json
│   └── flows/           # Flow definitions (.json)
└── README.md
```

## CLI Testing

Use the config package to test starters:

```bash
cd packages/ariaflow-config
npx tsx examples/run-pack.ts sales
npx tsx examples/run-pack.ts support
npx tsx examples/run-pack.ts bank-hybrid
```

## License

MIT
