1.0.0 • Published 9 months ago

onchain-agent-kit v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

AgentKit

A toolkit for building onchain AI agents. AgentKit provides a simple interface for creating AI-powered agents that can interact with blockchain networks.

Installation

npm install agentkit

Usage

const { Agent } = require('agentkit');

// Initialize agent with configuration
const agent = new Agent({
    chain: 'ethereum',
    rpcUrl: 'YOUR_RPC_URL',
    privateKey: 'YOUR_PRIVATE_KEY'
});

// Connect to blockchain
await agent.connect();

// Execute actions
const result = await agent.execute({
    type: 'transaction',
    // ... action details
});

// Analyze data
const analysis = await agent.analyze({
    // ... data to analyze
});

API Reference

Agent Class

Constructor

new Agent(config)
  • config.chain (string): Blockchain network (default: 'ethereum')
  • config.rpcUrl (string): RPC endpoint URL
  • config.privateKey (string): Private key for transactions

Methods

connect()

Establishes connection to the blockchain network.

execute(action)

Executes an action on the blockchain.

analyze(data)

Performs AI analysis on provided data.

License

MIT