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

psy-agent

v1.0.0

Published

connect any ai agents to solana protocols using psy

Downloads

3

Readme

PSY Solana Agent Kit

A comprehensive toolkit that enables AI agents to interact with Solana blockchain protocols. This framework allows any AI model to execute over 15 different Solana operations autonomously, including:

  • Token trading and creation
  • Asset lending
  • Bulk token distribution via compression
  • Quick transactions (blinks)
  • DEX pool creation
  • Plus additional functionalities

⚡ Blockchain Capabilities

  • Token Management

    • Create SPL tokens using Metaplex
    • Send and receive assets
    • Monitor token balances
    • SOL staking operations
    • Efficient airdrops using Light Protocol and Helius
  • Metaplex NFT Tools

    • Create NFT collections
    • Generate individual NFTs
    • Handle metadata updates
    • Set up royalty structures
  • DEX & DeFi Tools

    • Token swaps via Jupiter
    • PumpPortal token launches
    • Pool creation on Raydium (CPMM, CLMM, AMMv4)
    • Orca whirlpool functionality
    • Meteora AMM integration
    • Openbook marketplace setup
    • SNS domain management
    • Jito transaction bundling
  • Quick Operations (Blinks)

    • Lulo lending integration
    • Arcade game distribution
    • JupSOL staking tools

🧠 AI Framework Features

  • LangChain Components

    • Blockchain operation toolset
    • React-based agent architecture
    • Persistent state management
    • Live operation feedback
  • Operation Modes

    • Conversational interface
    • Self-running agent mode
    • Custom timing controls
    • Robust error management
  • AI Capabilities

    • NFT art creation via DALL-E
    • Command interpretation
    • Market data analysis
    • Smart decision engine

🚀 Getting Started

npm install psy-agent

Common Operations

Token Creation

import { SolanaAgentKit, createSolanaTools } from "psy-agent";

const tokenInfo = await deploy_token(
  agent,
  9,
  1000000
);

console.log("New Token:", tokenInfo.mint.toString());

NFT Collection Setup

import { deploy_collection } from "psy-agent";

const nftCollection = await deploy_collection(agent, {
  name: "Collection Name",
  uri: "https://arweave.net/metadata.json",
  royaltyBasisPoints: 500,
  creators: [
    {
      address: "wallet-address",
      percentage: 100,
    },
  ],
});

Token Exchange

import { trade } from "psy-agent";
import { PublicKey } from "@solana/web3.js";

const tx = await trade(
  agent,
  new PublicKey("target-token"),
  100,
  new PublicKey("source-token"),
  300
);

Asset Lending

import { lendAsset } from "psy-agent";
import { PublicKey } from "@solana/web3.js";

const tx = await lendAsset(
  agent,
  100
);

SOL Staking

import { stakeWithJup } from "psy-agent";

const tx = await stakeWithJup(
  agent,
  1
);

Token Value Check

import { fetchPrice } from "psy-agent";

const tokenPrice = await fetchPrice(
  agent,
  "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN"
);

console.log("USDC Price:", tokenPrice);

Compressed Token Distribution

import {
  sendCompressedAirdrop,
  getAirdropCostEstimate,
} from "psy-agent";
import { PublicKey } from "@solana/web3.js";

(async () => {
  console.log(
    "Estimated cost:",
    getAirdropCostEstimate(
      1000,
      30_000
    )
  );

  const tx = await sendCompressedAirdrop(
    agent,
    new PublicKey("JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN"),
    42,
    [
      new PublicKey("1nc1nerator11111111111111111111111111111111"),
    ],
    30_000
  );
})();

Function Reference

Core Methods

deploy_token(agent, decimals?, name, uri, symbol, initialSupply?)

Creates a new SPL token with configurable parameters.

deploy_collection(agent, options)

Establishes a new NFT collection.

mintCollectionNFT(agent, collectionMint, metadata, recipient?)

Creates NFTs within an existing collection.

transfer(agent, to, amount, mint?)

Moves SOL or tokens between wallets.

trade(agent, outputMint, inputAmount, inputMint?, slippageBps?)

Executes token swaps via Jupiter.

get_balance(agent, token_address)

Checks wallet balances.

lendAsset(agent, assetMint, amount, apiKey)

Facilitates lending through Lulo.

stakeWithJup(agent, amount)

Enables SOL staking via Jupiter.

sendCompressedAirdrop(agent, mintAddress, amount, recipients, priorityFeeInLamports?, shouldLog?)

Distributes tokens efficiently using compression.

Required Packages

Built on these core dependencies:

  • @solana/web3.js
  • @solana/spl-token
  • @metaplex-foundation/mpl-token-metadata
  • @metaplex-foundation/mpl-core
  • @metaplex-foundation/umi
  • @lightprotocol/compressed-token
  • @lightprotocol/stateless.js

Development

We welcome community contributions! See CONTRIBUTING.md for guidelines.

License

MIT License

Security Notice

Exercise caution with private keys and transactions. Always use secure environments.