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

core-agentkit

v0.1.3

Published

Framework-agnostic toolkit for building AI agents that interact with Core blockchain.

Readme

Core AgentKit

A framework-agnostic toolkit for building AI agents that interact with Core blockchain. Core AgentKit provides a comprehensive set of tools and building blocks for developers to create agents that can perform blockchain operations on the Core network.

Installation

# Core AgentKit
npm install core-agentkit

# Framework Extensions (optional)
npm install core-agentkit-langchain      # LangChain integration
npm install core-agentkit-vercel-ai-sdk  # Vercel AI SDK integration

Quick Start

  • 🔗 Framework Agnostic: Works with any AI framework (LangChain, OpenAI, Vercel AI SDK, etc.)
  • Core Blockchain Native: Built specifically for Core's dual consensus mechanism
  • 🪙 Bitcoin Staking: Support for Bitcoin staking operations on Core
  • 💰 Token Operations: Transfer, swap, and manage CORE and ERC-20 tokens
  • 🔒 Secure: Built with TypeScript and comprehensive input validation
  • 📦 Modular: Use individual actions or the complete toolkit
  • �️ Extensible: Add custom action providers for any functionality

Architecture

Core AgentKit follows a modular architecture pattern:

  • Central AgentKit Class: Manages wallet providers and action providers
  • Wallet Providers: Handle blockchain connections and wallet management
  • Action Providers: Contain blockchain-specific actions and operations
  • Framework Extensions: Adapters for popular AI frameworks

🚀 Quick Start

Installation

npm install core-agentkit

Basic Usage

import {
  AgentKit,
  CoreWalletProvider,
  coreActionProvider,
} from "core-agentkit";

// Create wallet provider
const walletProvider = new CoreWalletProvider(
  process.env.PRIVATE_KEY!,
  "core-testnet"
);

// Create AgentKit instance
const agentKit = AgentKit.from(walletProvider, [coreActionProvider()]);

// Get available actions
const actions = agentKit.getActions();
console.log(
  "Available actions:",
  actions.map((a) => a.name)
);

// Use specific actions
const balanceAction = agentKit.getAction("get_balance");
const result = await balanceAction.invoke({});
console.log("Balance:", result);

Framework Integration

LangChain

import { getLangChainTools } from "core-agentkit-langchain";
import { ChatOpenAI } from "@langchain/openai";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const tools = await getLangChainTools(agentKit);
const model = new ChatOpenAI({ temperature: 0 });
const agent = createReactAgent({ llm: model, tools });

const result = await agent.invoke({
  messages: [{ role: "user", content: "Check my CORE balance" }],
});

Vercel AI SDK

import { getVercelAITools } from "core-agentkit-vercel-ai-sdk";
import { openai } from "@ai-sdk/openai";
import { generateText } from "ai";

const tools = getVercelAITools(agentKit);

const result = await generateText({
  model: openai("gpt-4"),
  prompt: "Transfer 1 CORE to 0x742d35Cc6634C0532925a3b8D9C0a0e7c5f2e2B3",
  tools,
});

🛠️ Features

  • 🔗 Framework Agnostic: Works with any AI framework (LangChain, OpenAI, Vercel AI SDK, etc.)
  • Core Blockchain Native: Built specifically for Core's dual consensus mechanism
  • 🪙 Bitcoin Staking: Support for Bitcoin staking operations on Core
  • 💰 Token Operations: Transfer, swap, and manage CORE and ERC-20 tokens
  • 🏗️ Extensible Architecture: Add custom action providers for any functionality
  • �️ Type Safe: Full TypeScript support with comprehensive type definitions

Core Blockchain Actions

| Action | Description | Example Usage | | ------------------- | ------------------------------- | -------------------------------- | | get_balance | Check CORE token balance | Get balance for an address | | transfer | Transfer CORE tokens | Send CORE to another address | | get_token_balance | Check ERC-20 token balance | Get token balance for an address | | transfer_token | Transfer ERC-20 tokens | Send tokens to another address | | stake | Stake CORE tokens to validators | Stake CORE with a validator | | unstake | Unstake CORE tokens | Unstake CORE from a validator |

Framework Integrations

  • LangChain Integration: Convert AgentKit actions to LangChain tools
  • Vercel AI SDK Integration: Use actions with Vercel AI SDK
  • Framework Agnostic: Use with any AI framework or library
  • Extensible Actions: Add custom action providers

Core Network Support

  • Mainnet: Chain ID 1116, RPC: https://rpc.coredao.org
  • Testnet: Chain ID 1114, RPC: https://rpc.test2.btcs.network
  • EVM Compatibility: Full Ethereum tooling support
  • Gas Optimization: Smart gas price estimation

📖 Core Blockchain Overview

Core blockchain is a Bitcoin-aligned EVM blockchain that serves as Bitcoin's complementary smart contract platform:

Key Features

  • 🔐 Native Bitcoin Staking: Stake Bitcoin directly using CLTV timelocks
  • ⚡ Dual Staking: Combine Bitcoin + CORE staking for enhanced yields
  • 🔗 EVM Compatible: Deploy Ethereum dApps without modification
  • 🏛️ Satoshi Plus Consensus: Combines Bitcoin mining with validator staking
  • 🌉 Cross-Chain Bridge: LayerZero-powered bridging to major chains

Bitcoin Staking

Core's unique Self-Custodial Bitcoin Staking allows Bitcoin holders to:

  1. Earn Yield: Stake Bitcoin to earn CORE token rewards
  2. Maintain Custody: Bitcoin never leaves the Bitcoin network
  3. CLTV Timelocks: Use Bitcoin-native time-bound mechanisms
  4. Validator Delegation: Choose Core validators to delegate to
  5. Dual Staking: Stake both Bitcoin and CORE for higher yields

Dual Staking Benefits

| CORE:BTC Ratio | Yield Multiplier | Example APY | | -------------- | ---------------- | ----------- | | 0:1 | 1x | 5% | | 100:1 | 1.5x | 7.5% | | 200:1 | 2x | 10% | | 500:1 | 3x | 15% |

🔧 Configuration

Environment Variables

Create a .env file in your project root:

# Core Network Configuration
CORE_RPC_URL=https://rpc.coredao.org
CORE_TESTNET_RPC_URL=https://rpc.test2.btcs.network

# Private Key (for transactions)
PRIVATE_KEY=your_private_key_here

# OpenAI API Key
OPENAI_API_KEY=your_openai_api_key_here

# Gas Configuration
DEFAULT_GAS_LIMIT=21000
DEFAULT_GAS_PRICE=20000000000

AgentKit Configuration

import {
  AgentKit,
  CoreWalletProvider,
  coreActionProvider,
} from "core-agentkit";

// Create wallet provider with configuration
const walletProvider = new CoreWalletProvider(
  process.env.PRIVATE_KEY!, // Your private key
  "core-mainnet", // or "core-testnet"
  {
    rpcUrl: "https://rpc.coredao.org", // Custom RPC if needed
    gasPrice: "20000000000", // Custom gas price
    gasLimit: 21000, // Custom gas limit
  }
);

// Create AgentKit with default actions
const agentKit = AgentKit.from(walletProvider);

// Or create with custom action providers
const customAgentKit = AgentKit.from(walletProvider, [
  coreActionProvider(),
  // Add your custom action providers here
]);

📚 Examples

Check Balance

const balanceAction = agentKit.getAction("get_balance");
const result = await balanceAction.handler({
  address: "0x742d35Cc6634C0532925a3b8D81C3f83C7A84C5e",
});
console.log(`Balance: ${result.balance} CORE`);

Transfer Tokens

const transferAction = agentKit.getAction("transfer");
const result = await transferAction.handler({
  to: "0x742d35Cc6634C0532925a3b8D81C3f83C7A84C5e",
  amount: "1.5",
});
console.log(`Transaction hash: ${result.transactionHash}`);

Stake CORE Tokens

const stakeAction = agentKit.getAction("stake");
const result = await stakeAction.handler({
  validatorAddress: "0x1234567890123456789012345678901234567890",
  amount: "10",
});
console.log(`Staking transaction: ${result.transactionHash}`);

Get Token Balance

const tokenBalanceAction = agentKit.getAction("get_token_balance");
const result = await tokenBalanceAction.handler({
  address: "0x742d35Cc6634C0532925a3b8D81C3f83C7A84C5e",
  tokenAddress: "0xA0b86a33E6417Faf8b2D3d5A7b33f1F9B8e8e8e8", // USDT
});
console.log(`Token balance: ${result.balance}`);

Framework Integration Examples

LangChain Integration

import { getLangChainTools } from "core-agentkit-langchain";
import { ChatOpenAI } from "@langchain/openai";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const tools = await getLangChainTools(agentKit);
const model = new ChatOpenAI({ temperature: 0 });
const agent = createReactAgent({ llm: model, tools });

const result = await agent.invoke({
  messages: [{ role: "user", content: "Check my CORE balance" }],
});

Vercel AI SDK Integration

import { getVercelAITools } from "core-agentkit-vercel-ai-sdk";
import { openai } from "ai";

const tools = await getVercelAITools(agentKit);

const result = await openai.chat.completions.create({
  model: "gpt-4",
  messages: [{ role: "user", content: "Transfer 1 CORE to 0x123..." }],
  tools,
});

🏗️ Custom Action Providers

Extend AgentKit with custom action providers:

import { ActionProvider, Action } from "core-agentkit";

// Define a custom action
const customAction: Action = {
  name: "custom_action",
  description: "Performs a custom operation",
  parameters: {
    type: "object",
    properties: {
      param: {
        type: "string",
        description: "A parameter for the custom action",
      },
    },
    required: ["param"],
  },
  handler: async (params) => {
    // Your custom logic here
    return { result: `Custom action executed with: ${params.param}` };
  },
};

// Create a custom action provider
const customActionProvider = (): ActionProvider => ({
  name: "custom",
  description: "Custom action provider",
  actions: [customAction],
});

// Use with AgentKit
const agentKit = AgentKit.from(walletProvider, [
  coreActionProvider(),
  customActionProvider(),
]);

🌐 Network Information

Mainnet

  • Chain ID: 1116
  • RPC URL: https://rpc.coredao.org
  • Explorer: https://scan.coredao.org
  • Bridge: https://bridge.coredao.org
  • Staking: https://stake.coredao.org

Testnet

  • Chain ID: 1114
  • RPC URL: https://rpc.test2.btcs.network
  • Explorer: https://scan.test2.btcs.network
  • Faucet: https://scan.test2.btcs.network/faucet
  • Staking: https://stake.test2.btcs.network

🔐 Security Considerations

  1. Private Keys: Never commit private keys to version control
  2. Environment Variables: Use .env files for sensitive data
  3. Testnet First: Always test on Core Testnet before mainnet
  4. Gas Limits: Monitor gas usage for complex operations
  5. Slippage: Set appropriate slippage for DEX operations

Development Setup

# Clone the repository
git clone https://github.com/core-dao/core-agentkit.git
cd core-agentkit

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

# Run examples
npm run examples

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❤️ for the Core DAO community