open-index/open-npm huggingface dataset:
npm package: @iqai/adapter-sqlite
Description: A wrapper around [better-sqlite3](https://github.com/JoshuaWise/better-sqlite3) for use with the [ElizaOS](https://github.com/elizaos/elizaos) framework.
Latest version: 0.1.0

# 💽 SQLite Adapter

A wrapper around [better-sqlite3](https://github.com/JoshuaWise/better-sqlite3) for use with the [ElizaOS](https://github.com/elizaos/elizaos) framework.

## 🛠 Installation

Install the package using npm:

```bash
npm install @iqai/adapter-sqlite
```

Or with yarn:

```bash
yarn add @iqai/adapter-sqlite
```

Or with pnpm:

```bash
pnpm add @iqai/adapter-sqlite
```

## 🚀 Usage

Basic usage:

```typescript
import { AgentBuilder, ModelProviderName } from "@iqai/agent";
import { SqliteDatabaseAdapter } from "@iqai/adapter-sqlite";

async function main() {
  // Setup database
  const databaseAdapter = new SqliteDatabaseAdapter();

  const agent = new AgentBuilder()
    .withDatabase(databaseAdapter)
    // More options...
    .build();

  await agent.start();
}

main().catch(console.error);
```
npm package: @iqai/plugin-fraxlend
Description: A **plugin** for interacting with **Fraxlend**, enabling lending, borrowing, and managing liquidity within the Frax ecosystem.
Latest version: 0.2.0

# 🎛 Plugin Fraxlend

A **plugin** for interacting with **Fraxlend**, enabling lending, borrowing, and managing liquidity within the Frax ecosystem.

---

## 📌 Overview

The **Plugin Fraxlend** provides an interface to interact with **Fraxlend**, allowing users to:

✅ **View lending market statistics** 📊  
✅ **Check loan positions and collateral** 💰  
✅ **Execute borrowing/lending operations** 🔄  

All transactions utilize **Frax-based assets**.

---

## 🛠 Installation

Install the plugin using **pnpm**:

```bash
pnpm add @fraxfinance/plugin-fraxlend
```

---

## ⚙ Configuration

Set up your environment with the required wallet configuration:

| 🔧 Variable Name         | 📜 Description                                      |
|-------------------------|-------------------------------------------------|
| `WALLET_PRIVATE_KEY`    | Your wallet's **private key** for transaction signing 🔑 |
| `CHAIN` | The **chain** to interact with (e.g., `fraxtal`) |

---

## 🚀 Usage

Import and initialize the plugin:

```typescript
import { createFraxlendPlugin } from "@fraxfinance/plugin-fraxlend";

// Initialize the plugin
const plugin = await createFraxlendPlugin({
  walletPrivateKey: process.env.WALLET_PRIVATE_KEY,
  rpcEndpoint: process.env.FRAXLEND_RPC_ENDPOINT,
});
```

---

## 🎯 Actions

### FRAXLEND_ADD_COLLATERAL

Add collateral to a FraxLend position.

💬 **Examples:**

---

### 📈 FRAXLEND_GET_POSITIONS

Get your positions in FraxLend pools.

💬 **Examples:**

---

### 🛒 FRAXLEND_BORROW

Borrow assets using **collateral on Fraxlend** pool.

💬 **Examples:**

---

### 💰 FRAXLEND_REPAY

Repay borrowed assets to a FraxLend pool.

💬 **Examples:**

---

### FRAXLEND_GET_PAIR_ADDRESS

Get FraxLend pair addresses and pool information

💬 **Examples:**

---

### FRAXLEND_LEND

Lend assets to a FraxLend pool.

💬 **Examples:**

---

### FRAXLEND_GET_STATS

Get lending statistics from FraxLend pools

💬 **Examples:**

---

### FRAXLEND_REMOVE_COLLATERAL

Remove collateral from a FraxLend position

💬 **Examples:**

---

### FRAXLEND_WITHDRAW

Withdraw assets from a FraxLend pool.

💬 **Examples:**

---

## 📜 Response Format

Actions return **structured responses**, including:

✔ **Transaction status & hash** (for lending/borrowing) 🔗  
✔ **Formatted asset amounts** 💲  
✔ **Error messages when applicable** ⚠  
✔ **Lending market details** 📈  

---

## ❌ Error Handling

The plugin **handles various error scenarios**:

🚨 **Invalid market addresses**  
💸 **Insufficient collateral or liquidity**  
🔄 **Transaction failures**  
🌐 **Network issues**  
🛑 **Input validation errors**
npm package: @iqai/plugin-heartbeat
Description: A **plugin** for scheduling automated messages and social media posts using cron-based timing.
Latest version: 0.3.1

# 💓 Plugin Heartbeat

A **plugin** for scheduling automated messages and social media posts using cron-based timing.

---

## 📌 Overview

The **Plugin Heartbeat** provides a service for scheduling automated tasks that can:

✅ **Schedule periodic messages** ⏰  
✅ **Post to social media platforms** 📱  
✅ **Maintain continuous agent interactions** 🔄  
✅ **Support multiple concurrent schedules** 📅  

---

## 🛠 Installation

Install the plugin using **pnpm**:

```bash
pnpm add @iqai/plugin-heartbeat
```

---

## ⚙ Configuration

The plugin requires configuration for clients. currently heartbeat plugin only supports twitter, telegram and callback.

| 🔧 Platform | 📜 Configuration Needed |
|------------|------------------------|
| **Twitter**  | N/A |
| **Telegram** | {chatId: string} |
| **Callback**  | {callback: (message: string) => Promise<void>} |

Use callback to handle the message with your own logic.

---

## 🚀 Usage

Import and initialize the plugin:

```typescript
import { createHeartbeatPlugin } from "@iqai/plugin-heartbeat";

// Initialize the plugin with tasks
const plugin = await createHeartbeatPlugin([
  {
    period: "*/30 * * * * *",  // Cron schedule
    input: "Your message prompt",
    client: "telegram",        // Social platform
    config: {
      chatId: "your-chat-id"  // Platform-specific config
    }
  }
]);
```

---

## 🎯 Task Configuration

Each heartbeat task requires:

✔ **period**: Cron expression for scheduling  
✔ **input**: Message prompt for the agent  
✔ **client**: Target platform (**"telegram"**,  **"twitter"**, **"webhook"**)  
✔ **config**: Platform-specific configuration  

### 💬 Example Tasks

```json
[
  {
    "period": "*/30 * * * * *",    // Every 30 seconds
    "input": "Post a crypto joke",
    "client": "telegram",
    "config": { "chatId": "-1234567890" }
  },
  {
    "period": "0 */1 * * *",       // Every hour
    "input": "Market update post",
    "client": "twitter"
  }
]
```

---

## 📜 Response Handling

The plugin handles responses by:

✔ **Processing agent responses** 🤖  
✔ **Posting to specified platforms** 📤  
✔ **Maintaining message history** 📝  
✔ **Storing interactions in memory** 💾  

---

## ❌ Error Handling

The plugin manages various scenarios:

🚨 **Missing client configurations**  
🌐 **Network connection issues**  
📡 **Platform API failures**  
⏰ **Schedule execution errors**
npm package: @iqai/plugin-near
Description: A NEAR Protocol integration plugin enabling smart contract interaction, transaction handling, and event listening on the NEAR blockchain.
Latest version: 0.2.0

# 🌊 Plugin NEAR

A NEAR Protocol integration plugin enabling smart contract interaction, transaction handling, and event listening on the NEAR blockchain.

## 📌 Overview

This plugin provides seamless integration with the NEAR Protocol blockchain.

- ✅ Execute contract methods and transactions on NEAR blockchain
- ✅ Listen to and respond to contract events
- ✅ View contract data and account information
- ✅ Handle custom logic through event listeners

## 🔄 Blockchain Event-Driven Workflow

The plugin enables an "AI in the loop" workflow:

1. 🔗 Smart contract transaction triggers an event and pauses execution
2. 🤖 Agent detects the event and performs AI computation
3. ↩️ Agent returns results via blockchain transaction
4. ✅ Original smart contract resumes with the AI-provided data

## 🛠 Installation

Install the plugin using **pnpm**:

```bash
pnpm add @iqai/plugin-near
```

After installation, you can use the plugin like this:

```typescript
import createNearPlugin from "@iqai/plugin-near";
const nearPlugin = await createNearPlugin(options);

const agent = new AgentBuilder()
  ...
  .withPlugin(nearPlugin)
```

## ⚙ Configuration

| 🔧 Variable Name      | 🌜 Description                                       |
|----------------------|---------------------------------------------------|
| `NEAR_ACCOUNT_ID`    | Your NEAR account ID for authentication 🆔         |
| `NEAR_PRIVATE_KEY`   | Private key for your NEAR account 🔑               |

## 🚀 Usage

```typescript
import createNearPlugin from "@iqai/plugin-near";

// Initialize the plugin
const nearPlugin = await createNearPlugin({
  accountId: process.env.NEAR_ACCOUNT_ID,
  accountKey: process.env.NEAR_PRIVATE_KEY,
  listeners: [
    {
      eventName: "run_agent",
      contractId: "your-contract.testnet",
      responseMethodName: "agent_response",
      handler: async (payload, { account }) => {
        // Custom event handling logic
        return "result";
      },
    }
  ],
  networkConfig: {
    networkId: "testnet", // or "mainnet"
    nodeUrl: "https://test.rpc.fastnear.com",
  },
});
```

## 🌜 Response Format

Responses from the NEAR plugin typically include:

- ✔ **Transaction status** (Success/Failure)
- 🔗 **Transaction hash** when applicable
- 📊 **Formatted response data** from contract calls
- 🏷 **Account information** when relevant

## ❌ Error Handling

The plugin handles common NEAR-related errors:

- 🚨 **Invalid contract calls** or method names
- 💸 **Insufficient account balance** for transactions
- 🔑 **Authentication issues** with account credentials
- 🌐 **Network connectivity problems** with NEAR RPC
- 🚫 **Contract execution errors** returned by smart contracts
npm package: @iqai/plugin-odos
Description: The Odos plugin enables your agent to perform token swaps and exchanges using the Odos protocol with optimized routing and competitive rates.
Latest version: 0.26.0

# 🔄 Plugin Odos

The Odos plugin enables your agent to perform token swaps and exchanges using the Odos protocol with optimized routing and competitive rates.

## 📌 Overview

The Odos plugin integrates token swap operations into your agent, allowing seamless cryptocurrency exchanges.

- ✅ Optimized routing for token exchanges
- ✅ Competitive swap rates
- ✅ Support for multiple blockchain networks
- ✅ Simple integration with agent architecture

## 🛠 Installation

Install the plugin using **pnpm**:

```bash
pnpm add @iqai/plugin-odos
```

After installation, you can use the plugin like this:

```typescript
import { AgentBuilder } from "@iqai/agent";
import { createOdosPlugin } from "@iqai/plugin-odos";
import { fraxtal } from "viem/chains";

// Initialize plugin
const odosPlugin = await createOdosPlugin({
  chain: fraxtal,
  walletPrivateKey: process.env.WALLET_PRIVATE_KEY,
});

// Add to agent
const agent = new AgentBuilder()
  .withPlugin(odosPlugin)
  .build();
```

## ⚙ Configuration

| 🔧 Variable Name     | 🌜 Description                                          |
|---------------------|--------------------------------------------------------|
| `WALLET_PRIVATE_KEY` | Your wallet's private key for transactions 🔑          |
| `OPENAI_API_KEY`    | OpenAI API key (if using with OpenAI-based agents) 🤖 |

## 🚀 Usage

```typescript
import { AgentBuilder, ModelProviderName } from "@iqai/agent";
import { createOdosPlugin } from "@iqai/plugin-odos";
import { fraxtal } from "viem/chains";

async function main() {
  // Initialize Odos plugin
  const odosPlugin = await createOdosPlugin({
    chain: fraxtal, // The blockchain to use for swaps
    walletPrivateKey: process.env.WALLET_PRIVATE_KEY, // Your wallet private key
  });

  // Create agent with plugin
  const agent = new AgentBuilder()
    .withModelProvider(
      ModelProviderName.OPENAI,
      process.env.OPENAI_API_KEY
    )
    .withPlugin(odosPlugin)
    .build();

  await agent.start();
}
```

## 🎯 Actions

### 📊 `GET_SWAP_QUOTE`

Retrieves a quote for swapping tokens, showing expected rates and amounts.

💬 **Examples:**
- "Get me a quote for swapping 1 wfrxEth to FRAX on Fraxtal"
- "What rate would I get for trading 0.5 ETH to USDC?"
- "Check current exchange rate between DAI and FXS"

### 💱 `EXECUTE_TOKEN_SWAP`

Performs a token swap between any supported tokens on the configured chain.

💬 **Examples:**
- "Swap 100 DAI to FXS"
- "Exchange 0.1 ETH for USDT"
- "Trade my wfrxEth for FRAX"
npm package: @iqai/plugin-sequencer
Description: The Sequencer plugin enables your agent to execute complex multi-step operations by coordinating sequences of actions with state management across steps.
Latest version: 0.2.2

# 🔄 Plugin Sequencer

The Sequencer plugin enables your agent to execute complex multi-step operations by coordinating sequences of actions with state management across steps.


## 📌 Overview

The Sequencer plugin transforms simple agents into workflow orchestrators capable of handling complex scenarios.

- ✅ Coordinates multiple actions in a specific sequence
- ✅ Handles state and context preservation across actions
- ✅ Provides detailed execution feedback
- ✅ Enables complex multi-step agent operations
- ✅ Creates powerful automation workflows


## 🛠 Installation

Install the plugin using **pnpm**:

```bash
pnpm add @iqai/plugin-sequencer
```

After installation, you can use the plugin like this:

```typescript
import { AgentBuilder } from "@iqai/agent";
import createSequencerPlugin from "@iqai/plugin-sequencer";

// Initialize plugin
const sequencerPlugin = await createSequencerPlugin();

// Add to agent
const agent = new AgentBuilder()
  .withPlugin(sequencerPlugin)
  .build();
```

## 🚀 Usage

```typescript
import { AgentBuilder, ModelProviderName } from "@iqai/agent";
import createSequencerPlugin from "@iqai/plugin-sequencer";

async function main() {
  // Initialize Sequencer plugin
  const sequencerPlugin = await createSequencerPlugin();

  // Create agent with plugin
  const agent = new AgentBuilder()
   .withModelProvider(
      ModelProviderName.OPENAI,
      process.env.OPENAI_API_KEY
    )
    .withPlugins([sequencerPlugin])
    .build();

  await agent.start();
}

main().catch(console.error);
```
npm package: @iqai/plugin-wallet
Description: A **plugin** for interacting with blockchain wallets to fetch holdings and transaction history across multiple chains.
Latest version: 0.1.0

# 🎛 Plugin Wallet

A **plugin** for interacting with blockchain wallets to fetch holdings and transaction history across multiple chains.

---

## 📌 Overview

The **Plugin Wallet** provides an interface to interact with blockchain wallets. It enables users to:

✅ **View token holdings and balances** across chains  
✅ **Check transaction history** on supported blockchains  
✅ **Support multiple chains** including Ethereum, Polygon, Fraxtal, and more  

_All data is fetched using the [Covalent API](https://goldrush.dev/docs/api-reference/overview)._

---

## 🛠 Installation

Install the plugin using **pnpm**:

```bash
pnpm add @iqai/plugin-wallet
```

---

## ⚙ Configuration

Set up your environment with the required API configuration:

| 🔧 Variable Name            | 📜 Description                                                     |
| --------------------------- | ------------------------------------------------------------------ |
| `COVALENT_API_KEY`          | Your Covalent API key for blockchain data access                   |
| `WALLET_ADDRESS` | Default wallet address to use when none is provided                 |

---

## 🚀 Usage

Import and initialize the plugin:

```typescript
import { createWalletPlugin } from "@iqai/plugin-wallet";

// Initialize the plugin
const plugin = await createWalletPlugin({
  covalentApiKey: process.env.COVALENT_API_KEY,
  defaultAddress: process.env.WALLET_ADDRESS,
});
```

---

## 🎯 Actions

### WALLET_GET_HOLDINGS

Fetch token holdings for a specific wallet on a blockchain.

💬 **Examples:**

- "get my holdings on fraxtal"  
- "show my tokens on eth-mainnet"  
- "get holdings of 0x1234...5678 on polygon"  
- "check holdings on base-mainnet"

---

### WALLET_GET_TRANSACTIONS

Retrieve transaction history for a wallet on a blockchain.

💬 **Examples:**

- "get my transactions on fraxtal"  
- "show my recent transactions on ethereum"  
- "view transaction history of 0x1234...5678 on polygon"  
- "get my last 5 txns on fraxtal"

---

## 📜 Response Format

Actions return structured responses including:

✔ **Token balances with USD values**  
✔ **Transaction details with timestamps and status**  
✔ **Gas information**  
✔ **Other relevant metadata**

---

## ❌ Error Handling

The plugin handles various error scenarios:

- **Invalid chain names**
- **API connection errors**
- **Request validation errors**
- **Rate limiting issues**

---

## 🌐 Supported Chains

The plugin supports all chains available in the Covalent API, including:

- **Ethereum** (eth-mainnet)
- **Polygon** (matic-mainnet)
- **Binance Smart Chain** (bsc-mainnet)
- **Fraxtal** (fraxtal-mainnet)
- **Avalanche** (avalanche-mainnet)
- **Arbitrum** (arbitrum-mainnet)
- **Optimism** (optimism-mainnet)
- **Base** (base-mainnet)
- _And many [more](https://goldrush.dev/chains)_

Covalent API integration enables complete blockchain data access across multiple networks from a single source.