npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

agent-lily

v0.1.7

Published

<p align="center"> <img src="https://jjlqjzsxzjmkdyofaprn.supabase.co/storage/v1/object/public/image/lily.png" alt="Agent Lily" width="220" /> </p>

Readme

Agent Lily

Overview

Agent Lily monitors lending yield opportunities across chains, compares routes, explains decisions, and helps users rebalance USDC into stronger yield positions.

The app combines:

  • A public landing page
  • A wallet-gated dashboard
  • Chat-driven yield analysis and route execution
  • Policy controls for automation behavior
  • Telegram delivery for run notifications
  • Wallet-scoped persistence for config, runs, reports, and chats

What Lily Does

  1. Fetches live USDC yield data from supported markets
  2. Compares current position yield against better destinations
  3. Prices a bridge route through LI.FI
  4. Estimates route cost, projected net gain, and payback window
  5. Stores results per connected wallet
  6. Surfaces dry-runs, reports, chat history, and optional Telegram alerts

Core Features

Dashboard

  • Wallet-gated user workspace
  • Overview, approvals, reports, chat, policies, and Telegram setup
  • User-scoped data tied to the connected wallet address

Chat Workspace

  • Commands for yields, chains, routes, and rebalance analysis
  • Wallet-aware route previews
  • Bridge and rebalance execution flows from the connected wallet

Automation

  • Dry-run recommendations
  • Optional autonomous execution
  • Cooldown, route-cost, net-gain, and chain policy controls

Persistence

  • Supabase-backed config storage
  • Run history and reporting
  • Wallet-scoped chat history
  • Encrypted Telegram credentials at rest

Telegram

  • Outbound Lily notifications for dry_run, executed, and error events
  • Manual and cron-triggered automation updates

Tech Stack

  • Next.js 16
  • React 19
  • LI.FI SDK
  • Aave V3
  • Kamino
  • Dynamic
  • Viem
  • Supabase
  • Gemini

CLI

Agent Lily also ships as an npm CLI package:

  • npm package: https://www.npmjs.com/package/agent-lily
  • CLI README: https://www.npmjs.com/package/agent-lily?activeTab=readme

Install globally:

npm install -g agent-lily

Quick Start

bun install
cp .env.example .env.local
bun run dev

Open http://localhost:3000.

Environment

Use .env.local for local development.

Public browser-safe values:

  • NEXT_PUBLIC_DYNAMIC_ENV_ID
  • NEXT_PUBLIC_LIFI_API_KEY
  • NEXT_PUBLIC_SUPABASE_URL

Server-only values:

  • AGENT_API_SECRET
  • CRON_SECRET
  • AGENT_CONFIG_CIPHER_KEY
  • SUPABASE_URL
  • SUPABASE_SERVICE_ROLE_KEY
  • AGENT_PRIVATE_KEY
  • GEMINI_API_KEY

An example template is included in .env.example.

Demo Commands

In chat:

check yields
rebalance 100
bridge 10 usdc from arbitrum to polygon
check balance on base

API examples:

curl -X GET http://localhost:3000/api/agent/yields

curl -X POST http://localhost:3000/api/agent/rebalance \
  -H "x-wallet-address: 0xYourWalletAddress"

Supported Chains

EVM

| Chain | Chain ID | USDC Address | |-------|----------|--------------| | Ethereum | 1 | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | | Arbitrum | 42161 | 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8 | | Optimism | 10 | 0x7F5c764cBc14f9669B88837ca1490cCa17c31607 | | Polygon | 137 | 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 | | Base | 8453 | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 | | Avalanche | 43114 | 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E |

Solana

| Chain | Chain ID | Token | |-------|----------|-------| | Solana | 1151111081099710 | USDC |

Project Structure

src/
├── app/
│   ├── dashboard/
│   ├── api/
│   └── page.tsx
├── components/
├── env/
├── lib/
└── constants/

Key files:

  • src/lib/agent.ts - decision engine
  • src/lib/automation.ts - autonomous rebalance flow
  • src/lib/lifi.ts - LI.FI route and chain helpers
  • src/lib/yields.ts - yield aggregation
  • src/lib/persistence.ts - wallet-scoped storage
  • src/lib/telegram.ts - Telegram notifications

LI.FI Integration

Production integration uses the LI.FI SDK directly.

import { getQuote, createConfig, executeRoute } from "@lifi/sdk";

The repo also includes LI.FI MCP configuration in mcp.json.

License

MIT