open-index/open-npm huggingface dataset:
npm package: @mah-sdk/orchestrator
Description: Multi-Agent Hierarchy Orchestrator - pluggable multi-agent AI task execution engine
Latest version: 0.1.1

# @mah-sdk/orchestrator

Multi-Agent Hierarchy Orchestrator — a pluggable, provider-agnostic multi-agent AI task execution engine.

## Features

- **Provider-agnostic**: Built-in Anthropic + OpenAI adapters, or bring your own via `IAIProvider`
- **Consumer-defined hierarchy**: Define 2–50 agents in any structure. Engine validates and operates.
- **File processing**: PDF, Word, Excel, CSV, text, and OCR (6 built-in processors)
- **Auto-migration**: 10-table PostgreSQL schema, created automatically on `init()`
- **Validation cascade**: Tier 1 mechanical checks + Tier 2 cross-model semantic validation (premium)
- **Audit everything**: Every operation logged with timestamp, agent, task, and detail

## Quick Start

```bash
npm install @mah-sdk/orchestrator
```

```typescript
import { init, AnthropicAdapter } from '@mah-sdk/orchestrator';

const orchestrator = await init({
  db: {
    host: 'localhost',
    port: 5432,
    database: 'mah',
    user: 'postgres',
    password: 'secret',
    ssl: false,
  },
  ai: {
    primary: {
      adapter: new AnthropicAdapter({
        apiKey: process.env.ANTHROPIC_API_KEY!,
        model: 'claude-sonnet-4-5-20250929',
      }),
    },
  },
});

const result = await orchestrator.processInstruction('Generate a privacy policy');
console.log(result.status, result.output);
```

## Custom Hierarchy

```typescript
const orchestrator = await init({
  db: { /* ... */ },
  ai: { /* ... */ },
  hierarchy: [
    { id: 'classifier', displayName: 'Classifier', level: 'L1', reportsTo: null, agentConfig: { role_definition: 'Classify tasks', /* ... */ } },
    { id: 'executor', displayName: 'Executor', level: 'L2', reportsTo: 'classifier', agentConfig: { role_definition: 'Execute tasks', /* ... */ } },
    { id: 'validator', displayName: 'Validator', level: 'L2', reportsTo: 'classifier', agentConfig: { role_definition: 'Validate output', /* ... */ } },
  ],
});
```

## File Processing

```typescript
const result = await orchestrator.processInstruction('Review this contract', {
  files: [{ path: '/uploads/contract.pdf', name: 'contract.pdf', mimeType: 'application/pdf' }],
});
```

Optional peer dependencies for file processing:

- `pdf-parse` — PDF extraction
- `mammoth` — Word document extraction
- `xlsx` — Excel spreadsheet extraction
- `tesseract.js` — OCR for images

Install only what you need: `npm install pdf-parse mammoth`

## CLI

```bash
npx @mah-sdk/orchestrator health
npx @mah-sdk/orchestrator migrate:status
npx @mah-sdk/orchestrator version
```

## License

MIT — see [LICENSE](./LICENSE)

Premium features available under commercial license. See [LICENSE-COMMERCIAL](../../LICENSE-COMMERCIAL).
npm package: @mahadao/arth-base
Description: ARTH Valuecoin SDK shared interfaces
Author: Steven Enamakel
Latest version: 1.0.0

# @mahadao/arth-base

Shared interfaces and classes of the Liquity SDK.

Needs to be installed in order to use other Liquity SDK packages, for example [@mahadao/arth-ethers](https://www.npmjs.com/package/@mahadao/arth-ethers).

## API Reference

For now, it can be found in the public Liquity [repo](https://github.com/liquity/liquity/blob/master/docs/sdk/lib-base.md).
npm package: @mahadao/arth-ethers
Description: ARTH SDK Ethers-based implementation
Author: Steven Enamakel
Latest version: 2.0.1

# @mahadao/arth-ethers

[Ethers](https://www.npmjs.com/package/ethers)-based library for reading ARTH protocol state and sending transactions.

## Quickstart

Install in your project:

```
npm install --save @mahadao/arth-base @mahadao/arth-ethers ethers@^5.0.0
```

Connecting to an Ethereum node and sending a transaction:

```javascript
const { Wallet, providers } = require("ethers");
const { EthersARTH } = require("@mahadao/arth-ethers");

async function example() {
  const provider = new providers.JsonRpcProvider("http://localhost:8545");
  const wallet = new Wallet(process.env.PRIVATE_KEY).connect(provider);
  const arth = await EthersARTH.connect(wallet);

  const { newTrove } = await arth.openTrove({
    depositCollateral: 5, // ETH
    borrowARTH: 2000
  });

  console.log(`Successfully opened a ARTH Loan (${newTrove})!`);
}
```

## More examples

See [packages/examples](https://github.com/mahadao/arth-core/tree/master/packages/examples) in the repo.

ARTH's [Dev UI](https://github.com/liquity/liquity/tree/master/packages/dev-frontend) itself contains many examples of `@mahadao/arth-ethers` use.

## API Reference

For now, it can be found in the public ARTH [repo](https://github.com/liquity/liquity/blob/master/docs/sdk/lib-ethers.md).