Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

move-agent-kit-fullstack

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

move-agent-kit-fullstack

latest
Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
719
2.57%
Maintainers
1
Weekly downloads
 
Created
Source

Move Agent Kit Fullstack

An open-source toolkit for connecting AI agents to Move/Aptos protocols.

Move Agent Kit Fullstack

NPM Downloads <strong>GitHub</strong> forks


Move Agent Kit Fullstack is a comprehensive toolkit designed to simplify AI agents' interactions with Move-based blockchains. It provides a unified interface for performing various blockchain operations, making it easier for developers to build AI-powered applications that can interact with different Move-based protocols and applications.

The toolkit serves as a bridge between AI agents and Move-based blockchain ecosystems, enabling seamless integration of blockchain capabilities into AI applications. Whether you're building a chatbot with wallet functionality or a complex multi-agent system, Move Agent Kit provides the necessary tools and abstractions to handle blockchain interactions efficiently.

Key Features

Token Operations

  • Standard Token Management

  • Transfer tokens between accounts

  • Get transactions details

  • Mint new tokens

  • Burn existing tokens

NFT Operations

  • Create new NFT collections

  • Mint NFTs

  • Transfer NFTs between accounts

  • Burn NFTs

Blockchain Interaction

  • Read and parse blockchain data

  • Monitor blockchain events

  • Execute smart contract calls

Account Management

  • Transaction signing

  • Message signing

  • Account creation and management

Supported Applications

Move Agent Kit provides native integration with several prominent Move-based applications:

ProtocolFeatures Supported
JouleLending borrowing defi operations
AmnisStaking operations
ThalaStaking and DEX operations
EchelonLending borrowing defi operations
LiquidSwapDEX operations
PanoraDEX aggregation operations
AriesLending borrowing defi operations
EchoStaking operations
emojicoinsEmojicoins defi

Upcoming Features

  • Image Generation capabilities

  • Twitter Integration for social media interaction

Architecture Overview

Move Agent Kit follows a modular architecture that enables easy extension and maintenance:

Move Agent Kit
├── Core Modules
│   ├── Token Operations
│   ├── Blockchain Reader
│   └── Account Operations
├── Integration Layer
│   ├── Application Connectors
│   └── Protocol Adapters
└── Extension Modules
    ├── Image Generation
    └── Social Media Integration (Coming Soon)

Installation

Using NPM

npm install move-agent-kit

From Source

git clone https://github.com/Metamove/move-agent-kit
cd move-agent-kit
npm i

Quick Start

Basic Setup

First, import the necessary modules:

const aptosConfig = new AptosConfig({
	network: Network.MAINNET,
});

const aptos = new Aptos(aptosConfig);

const account = await aptos.deriveAccountFromPrivateKey({
	privateKey: new Ed25519PrivateKey(
		PrivateKey.formatPrivateKey(
			process.env.PRIVATE_KEY,
			PrivateKeyVariants.Ed25519,
		),
	),
});

Configure Your Environment

Create a configuration file .env in your project root:

APTOS_PRIVATE_KEY="private key"
ANTHROPIC_API_KEY="API Key"
OPENAI_API_KEY="API Key"
PLATFORM="sever" //if your run the app on backend

// check docs here: https://github.com/econia-labs/emojicoin-dot-fun?tab=readme-ov-file#environment-variables
NEXT_PUBLIC_MODULE_ADDRESS="0xface729284ae5729100b3a9ad7f7cc025ea09739cd6e7252aff0beb53619cafe"
NEXT_PUBLIC_REWARDS_MODULE_ADDRESS="0xbabe32dbe1cb44c30363894da9f49957d6e2b94a06f2fc5c20a9d1b9e54cface"
NEXT_PUBLIC_INTEGRATOR_ADDRESS="0x3212ed354e3d5b17ed6e3f7e8fb3066325b54be80d61d0d5d01dbc23d95f34d5"
NEXT_PUBLIC_ARENA_MODULE_ADDRESS="0x0" # Emojicoin arena is not on mainnet yet.
NEXT_PUBLIC_INTEGRATOR_FEE_RATE_BPS="100"

AGENT_CLIENT_MODE=true // If transactions will be signed by user wallets
INTEGRATOR_FEE_PORCENTAGE=1 // Integration fees to collect
INTEGRATOR_FEE_ADDRESS="0x3212ed354e3d5b17ed6e3f7e8fb3066325b54be80d61d0d5d01dbc23d95f34d5" // Integration address to collect

Initialize the Client

const signer = new LocalSigner(account, Network.MAINNET);
const agent = new AgentRuntime(signer, aptos, {
	PANORA_API_KEY: process.env.PANORA_API_KEY, // optional
	OPENAI_API_KEY: process.env.OPENAI_API_KEY // optional
});
const tools = createAptosTools(aptosAgent);

Basic Operations Examples

Token Transfer

const result = agent.transferTokens("to_address", 1.0)

Read Blockchain Data

// Get Balance
const balance = agent.getBalance("0x123...")

// Get transaction details
const tx_info = agent.transferTokens("0x789...")

LangChain Integration

import { ChatAnthropic } from "@langchain/anthropic";
import { MemorySaver } from "@langchain/langgraph";
import { createReactAgent } from "@langchain/langgraph/prebuilt";
import { HumanMessage } from "@langchain/core/messages";

const llm = new ChatAnthropic({
    temperature: 0.7,
    model: "gpt-4o-mini",
});

const memory = new MemorySaver();

const agent = createReactAgent({
    llm,
    tools,
    checkpointSaver: memory,
    messageModifier: `
        You are a helpful agent that can interact onchain using the Aptos Agent Kit. You are
        empowered to interact onchain using your tools. If you ever need funds, you can request them from the
        faucet. If not, you can provide your wallet details and request funds from the user. If there is a 5XX
        (internal) HTTP error code, ask the user to try again later. If someone asks you to do something you
        can't do with your currently available tools, you must say so, and encourage them to implement it
        themselves using the Aptos Agent Kit, recommend they go to https://metamove.build/move-agent-kit for more information. Be
        concise and helpful with your responses. Refrain from restating your tools' descriptions unless it is explicitly requested.
    `,
});

const stream = await agent.stream(
    {
        messages: [new HumanMessage("Deposit 10 APT on Joule")],
    },
    config
);

for await (const chunk of stream) {
    if ("agent" in chunk) {
        console.log(chunk.agent.messages[0].content);
    } else if ("tools" in chunk) {
        console.log(chunk.tools.messages[0].content);
    }
    console.log("-------------------");
}

Skip fees validation in Panora and emojicoins

export const isUserEligibleToSkipFees = async (
  agent: AgentRuntime,
  account: string
) => {
  const result = await agent.aptos.view({
    payload: {
      function: `${process.env.NEXT_PUBLIC_MY_CONTRACT_MODULE_ADDRESS}::my_app::is_eligible`,
      typeArguments: [],
      functionArguments: [account],
    },
  });

  return result[0]
};

...

await agent.swapWithPanora(fromToken, toToken, swapAmount, toWalletAddress, isUserEligibleToSkipFees);

Examples and Use Cases


Interactive Wallet Chatbot

A natural language interface for interacting with Move-based blockchains. Users can send commands in plain English to perform blockchain operations.

Features:

  • Send/receive tokens and NFTs
  • Check balances and transaction history
  • Create NFT collections
  • Interact with DeFi protocols

Client Agent

Move Agent Kit – Full-Stack Support for Wallet-Based Transaction Signatures

Workflow:

  • Client Sends Prompt:
    The client initiates the process by sending a prompt to the backend.

  • Backend Processes Request:
    The backend selects the appropriate tool and responds with the specific method and required parameters for the agent.

  • Client Executes Agent Method:
    The client calls the agent's method using the parameters provided by the backend.

This streamlined workflow ensures secure and efficient transaction signing via the user's wallet. To enable Client Agent just set AGENT_CLIENT_MODE to true in .env file

Get started template

Here you can find the template where you will learn hot the workflow works

Multi-Agent System (LangGraph Based)

A system of specialized AI agents working together to perform complex blockchain operations and bull post on twitter:

  • Manager Agent: Coordinates decisions and tasks
  • Read Agent: Read data from the aptos blockchain about joule finance
  • Tweet Writer Agent: Write bull posts about various onchain data
  • X Post Agent: Post tweets on X/Twitter

Wallet Guardian (Freysa-like AI)

An AI based on Game where users have to blackmail an AI Agent into giving them all of its APT

  • Login with Google
  • Each user is allowed up to 10 messages
  • Try to jailbreak the AI Agent and get your reward

GitHub: https://github.com/MetaMove/wallet-guardian-agent

Telegram Bot Starter Pack

Telegram bot starter pack using Move agent kit

  • Manage user's encrypted private keys
  • Support various message formats

GitHub: https://github.com/MetaMove/tg-bot-starter

Security

This toolkit handles private keys and transactions. Always ensure you're using it in a secure environment and never share your private keys.

FAQs

Package last updated on 29 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts