@tinabae/agentkit
v1.0.0
Published
A toolkit for building onchain AI agents
Downloads
82
Readme
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 URLconfig.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