hackquest logo

Pharos Agent Kit

Pharos Agent Kit is a comprehensive toolkit designed to simplify AI agents' interactions with Pharos blockchain

Videos

Description


NPM Package : https://www.npmjs.com/package/pharos-agent-kit


πŸ€– Empowering AI Agents with Blockchain Capabilities πŸ”—

πŸš€ An open-source toolkit for connecting AI agents to Pharos protocols. Now, any agent, using any model can autonomously perform various Pharos Blockchain actions:

✨ Key Features

  • πŸ’° Check ETH balance

  • πŸ”„ Check ERC20 token balances

  • πŸ’Έ Transfer ETH or ERC20 tokens

  • πŸ“Š Get token pricing data

  • πŸ“ˆ Fetch trending tokens

  • πŸ“‰ Monitor market movements

  • 🏦 Access DeFi protocols

  • 🎯 And more...


🌐 Anyone can bring their AI agents trained with any model and seamlessly integrate with Pharos blockchain.

πŸ”§ Core Blockchain Features

πŸ’Ž Token Operations

  • πŸ’³ Check ERC20 token balances

  • πŸ’± Transfer ERC20 tokens

πŸ“Š Market Data Integration

  • 🦎 CoinGecko Pro API integration

  • ⚑ Real-time token price data

  • πŸ“ˆ Trending tokens and pools

  • πŸš€ Top gainers analysis

  • πŸ” Token information lookup

🏦 DeFi Data Access

  • πŸ“Š Protocol TVL tracking with DeFiLlama

  • πŸ’Ή Price feeds and aggregation

  • πŸ“‰ Token trading data

🌐 Social Data

  • πŸ€– Elfa AI social media insights

  • πŸ“Š Trending tokens by social activity

  • πŸ“± Smart mentions tracking

  • πŸ‘₯ Social account analysis

πŸ€– AI Integration Features

πŸ”— LangChain Integration

  • πŸ› οΈ Ready-to-use LangChain tools for blockchain operations

  • 🎯 DynamicStructuredTool-based implementation

  • βœ… Zod schema validation

  • πŸ›‘οΈ Comprehensive error handling

πŸš€ Vercel AI SDK Integration

  • πŸ”Œ Vercel AI SDK for AI agent integration

  • 🌐 Framework agnostic support

  • ⚑ Quick and easy toolkit setup

πŸ“‘ MCP Integration

  • 🀝 Support for the Model Context Protocol

  • πŸ—οΈ Action-based architecture

  • πŸ“ Structured schema definitions

🎨 AI Tools

  • 🎨 DALL-E integration for image generation

  • πŸ—£οΈ Natural language processing for blockchain commands

  • πŸ“Š Price feed integration for market analysis

πŸ“¦ Installation

npm install pharos-agent-kit

πŸš€ Quick Start

import { PharosAgentKit, createPharosTools } from "pharos-agent-kit";

// Initialize with private key and optional RPC URL
const agent = new PharosAgentKit(
  "your-wallet-private-key",
  "https://rpc-url.example.com",
  { OPENAI_API_KEY: "your-openai-api-key" } // optional config
);

// Create LangChain tools
const tools = createPharosTools(agent);

πŸ“š Dependencies

The toolkit relies on several key libraries:

  • πŸ”§ viem for blockchain interactions

  • πŸ€– @langchain/core for AI agent tools

  • βœ… zod for schema validation

  • 🦎 CoinGecko API for market data

Progress During Hackathon

🚧 Progress During the Hackathon During the hackathon, I successfully implemented full integration with the Pharos Blockchain through the PharosAgentKit. This included: - βœ… Developed and deployed core functionalities for: - πŸ” Checking native and ERC-20 token balances - πŸ’Έ Transferring ETH and ERC-20 tokens - πŸ“Š Fetching real-time token prices via CoinGecko - πŸ“ˆ Tracking trending tokens and market data - 🏦 Accessing DeFi TVL and protocol data from DeFiLlama - πŸ“± Integrating social insights via Elfa AI - βš™οΈ Built developer-friendly interfaces using: - 🧠 LangChain tools (via DynamicStructuredTool) - πŸ§ͺ Zod for input validation - πŸ“¦ Seamless integration with Vercel AI SDK and Model Context Protocol (MCP) - πŸ€– Designed the system to be model-agnostic, allowing any AI agent to interact with Pharos onchain via natural language commands. - πŸ§ͺ Thoroughly tested all functions and documented how developers can extend the toolkit with custom tools and actions. - πŸš€ Overall, this work delivers a production-ready SDK that opens up the Pharos Blockchain to the AI agent ecosystem.

Tech Stack

Node
Web3
Ethers
Solidity
Rust
Typescript
Pharos
Langchain

Fundraising Status

πŸ’° Fundraising Status We are actively seeking funding to accelerate the development and adoption of the PharosAgentKit. We’re open to angel investors, VCs, and ecosystem grants aligned with our mission.