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 🙏

© 2025 – Pkg Stats / Ryan Hefner

flow-agent-kit

v1.0.0

Published

Kit de desenvolvimento para criar agentes de IA que interagem com a blockchain Flow

Downloads

65

Readme

Flow Agent Kit

Flow Agent Kit is a development tool that enables the creation of AI agents that interact with the Flow blockchain.

What is it for?

AI + Blockchain Integration

  • Allows AI agents (using LangChain) to directly interact with the Flow blockchain
  • Can perform operations such as transfers, balance queries, and smart contract deployment

NPM Package Benefits

Using Flow Agent Kit as an NPM package offers several advantages:

  1. Easy Installation

    • Install with a single command: pnpm add flow-agent-kit
    • Automatic dependency management
    • No manual repository cloning needed

Main Features

export class FlowAgentKit {
  public address: string;
  private genAI: GoogleGenerativeAI;
  private model: any;

  /**
   * Creates an instance of FlowAgentKit
   * @param private_key - Flow account private key
   * @param network - Flow network to connect to
   * @param gemini_api_key - Gemini API key for AI features
   */
  constructor(private_key: string, network: FlowNetwork = 'mainnet', gemini_api_key: string) {
    // Configure FCL
    const accessNode =
      process.env.FLOW_ACCESS_NODE ||
      (network === 'testnet'
        ? 'https://rest-testnet.onflow.org'
        : network === 'mainnet'
          ? 'https://rest-mainnet.onflow.org'
          : 'http://localhost:8888');

    const walletDiscovery =
      network === 'mainnet'
        ? 'https://fcl-discovery.onflow.org/authn'
        : network === 'testnet'
          ? 'https://fcl-discovery.onflow.org/testnet/authn'
          : 'http://localhost:8701/fcl/authn';

    fcl.config({
      'flow.network': network,
      'app.detail.title': 'Flow Agent Kit',
      'accessNode.api': accessNode,
      'discovery.wallet': walletDiscovery,
    } as any);
  }
}

How to Use?

After installation, you can use the kit in two ways:

Chat Mode

  • Interactive command-line interface
  • You can chat with the agent and request blockchain operations
  • Example: "What's my balance?" or "Transfer 10 FLOW to 0x1234..."

Autonomous Mode

  • The agent operates independently, executing programmed actions
  • Useful for automation and monitoring

Basic Usage Example:

import { FlowAgentKit } from 'flow-agent-kit';

// Initialize the agent
const agent = new FlowAgentKit('your_private_key', 'mainnet', 'your_gemini_api_key');

// Check balance
const balance = await agent.getBalance();
console.log('Balance:', balance);

// Generate content with AI
const response = await agent.generateContent('What is Flow blockchain?');
console.log('Response:', response);

Installation

  1. Clone the repository:
git clone https://github.com/Flow-Brasil/flow-agent-kit.git
  1. Enter the folder:
cd flow-agent-kit
  1. Install dependencies:
pnpm install
  1. Configure environment variables:
cp .env.example .env
  1. Configure your .env file:
# Flow wallet private key
FLOW_PRIVATE_KEY=xxx

# Google AI (Gemini) API key
GEMINI_API_KEY=xxx

# Flow network (mainnet, testnet, or emulator)
FLOW_NETWORK=testnet

Development

To test:

# Start the project in development mode
pnpm dev

# OR run tests
pnpm test

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Create a Pull Request

Requirements

  • Node.js ≥ 18.18.0
  • pnpm ≥ 8.0.0

License

MIT